Window does not appear
padam
skaromana at wp.pl
Wed Apr 11 00:53:41 PDT 2012
Hi guys (or girls),
That how i prepare player:
loop = g_main_loop_new(NULL, FALSE);
pipeline = gst_element_factory_make("playbin2", "player");
GstCaps *caps;
pl.sink = gst_element_factory_make("appsink", "sink");
caps = gst_caps_new_simple ("video/x-raw-rgb",
"width", G_TYPE_INT, 384,
"height", G_TYPE_INT, 288,
"framerate", GST_TYPE_FRACTION, 25, 1,
"bpp", G_TYPE_INT, 16,
"depth", G_TYPE_INT, 16,
"endianness", G_TYPE_INT, G_BYTE_ORDER,
NULL);
gst_app_sink_set_caps(GST_APP_SINK(pl.sink), caps);
gst_caps_unref(caps);
if(pl.sink)
gst_base_sink_set_sync(GST_BASE_SINK(pl.sink), 1);
gst_app_sink_set_drop(GST_APP_SINK(pl.sink), 1);
g_object_set(G_OBJECT(pl.pipeline), "video-sink", pl.sink, (void*)NULL);
pl.audioSink = gst_element_factory_make("gconfaudiosink", NULL);
g_object_set(G_OBJECT(pl.pipeline), "audio-sink", pl.audioSink,
(void*)NULL);
I made it based on
file:///C:/Documents%20and%20Settings/sartymowski/Pulpit/ZAPISANE%20STRONY/ofGstUtils_8cpp_source.html
and my thread function
void *StartMainLoop(void *threadid)
{
GstAppSinkCallbacks gstCallbacks;
short int i = (short int)threadid;
pl.bFrameByFrame = 1;
g_object_set(G_OBJECT(pl.sink), "emit-signals", FALSE, "sync",
!pl.bFrameByFrame, (void*)NULL);
if(!pl.bFrameByFrame)
{
//gstCallbacks.eos
}
g_main_loop_run(pl.loop);
gst_element_set_state(GST_ELEMENT(pl.pipeline), GST_STATE_NULL);
/*gst_object_unref(GST_OBJECT(pipeline));*/
pthread_exit(NULL);
}
but after run main loop the windows does not appear, and i have no idea why,
when i comment out this line
g_object_set(G_OBJECT(pl.pipeline), "video-sink", pl.sink, (void*)NULL);
everything is working except getting actual frame, są i need this!!!
Does anybody know what i should do? I am working on Windows XP
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Window-does-not-appear-tp4548215p4548215.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list