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.