[GST-DEVEL]Re: Using xvimagesink playing video in a fullscreen

Wesley J. Miller WMiller at sdr.com
Tue Aug 30 13:11:59 PDT 2011

>gtk uses the gstreamer's main loop.
>In the EoS i am quitting the main loop. When i commented the
>quit_main_loop(), the window was hidden.
>So what i did was , I included the statement, that hides the gtk window,
>before the main loop, but even then, the window was not hidden??
>Why so?

You need to wait long enough for the window to close before stopping the
loop.  The loop and other stuff may not even be in the same thread so
whoever goes first may/should get done sooner.  Something to remember, you
can put the pipeline in some non-playing state and the loop can still run!

Try waiting on gtk to notify you that the window has closed.  I have no
idea how that works but  my gut says you can either issue a blocking call
to the close_window function or you can need to wait on a signal.  One
other way it to find a way of checking if the window's handle is valid and
wait until it isn't.

And, lastly, you could just sleep for a second and assume everything got
done.  Not very good style, but highly practical.

You might also consider putting the loop in your main thread and letting
it be closed by the return to the OS.  Remember, the loop itself is NOT
part of Gstreamer.  Gstreamer uses the loop but is not the "provider" of
the loop.  That's why the loop functions don't start with "gst_".  Don't
forget to unref() your loop when you really are done with it.



This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.

More information about the gstreamer-devel mailing list