Window does not appear
Stefan Sauer
ensonic at hora-obscura.de
Sun Apr 15 12:17:32 PDT 2012
On 04/11/2012 09:53 AM, padam wrote:
> 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
This is a local document you are referencing.
> 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,e client and the server on the same machine?
>
> If not, check the firewall; anyway, tryt will allow
Which is expected, as you replaced the video sink with a sink that will
pass the frames to your application.
> 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!!!
What is that you want to do? If you need the frames in your application
*and* see them on the screen, you obviously need two video sinks.
Stefan
> 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.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list