LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-03-2012, 05:16 AM   #1
Takido
LQ Newbie
 
Registered: Jun 2012
Location: France
Distribution: Crunchbang, Ubuntu, Xbian
Posts: 12

Rep: Reputation: Disabled
Using giostreamsink


Hello,

I'm currently trying to write a Gstreamer plugin to write an audio stream into a shared memory area so that it can be read by another (non Gstreamer linked) application.
I chose to use the giostreamsink and am just, to begin, trying to test the following code, the only example I found about giostreamsink :
Quote:
#include <gst/gst.h>
#include <gio/gio.h>

int main(int arg, char * argv)
{
GstElement *sink;
GMemoryOuputStream *stream;
guint8 *out_data;

stream = G_MEMORY_OUTPUT_STREAM (g_memory_output_stream_new (NULL, 0,
(GReallocFunc) g_realloc, (GDestroyNotify) g_free));
sink = gst_element_factory_make ("giostreamsink", "sink");
g_object_set (G_OBJECT (sink), "stream", stream, NULL);

out_data = g_memory_ouput_stream_get_data (G_MEMORY_OUTPUT_STREAM (stream));
}
However, I get these errors while compiling, that I can't understand :
Quote:
test.c: In function ‘main’:
test.c:7: error: ‘GMemoryOuputStream’ undeclared (first use in this function)
test.c:7: error: (Each undeclared identifier is reported only once
test.c:7: error: for each function it appears in.)
test.c:7: error: ‘stream’ undeclared (first use in this function)
Does someone know where this problem could come from ?

Thanks.
 
Old 07-03-2012, 05:56 AM   #2
Takido
LQ Newbie
 
Registered: Jun 2012
Location: France
Distribution: Crunchbang, Ubuntu, Xbian
Posts: 12

Original Poster
Rep: Reputation: Disabled
Update : GMemoryOuputStream means nothing, but GMemoryOutputStream has a meaning.

The first problem is solved, but...
Quote:
test.c: In function ‘main’:
test.c:16: warning: assignment makes pointer from integer without a cast
/tmp/ccNr3Ugg.o: In function `main':
test.c: undefined reference to `g_memory_output_stream_get_type'
test.c: undefined reference to `g_free'
test.c: undefined reference to `g_realloc'
test.c: undefined reference to `g_memory_output_stream_new'
test.c: undefined reference to `g_type_check_instance_cast'
test.c: undefined reference to `gst_element_factory_make'
test.c: undefined reference to `g_type_check_instance_cast'
test.c: undefined reference to `g_object_set'
test.c: undefined reference to `g_memory_output_stream_get_type'
test.c: undefined reference to `g_type_check_instance_cast'
test.c: undefined reference to `g_memory_ouput_stream_get_data'
collect2: ld returned 1 exit status
An idea ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration