Reputation: 519
I am trying to write a media-player application that will run on an ARM processor using GStreamer 0.10.36. My goal is to have the transition period between two videos as short as possible with the hopes of eliminating it completely. Currently to achieve this I am using two pipelines, each with its own source and sink. The processor that I am using allows for multiple sink pads of the same type (I am using the Freescale i.MX6Q mfw_isink element). When I reach the end of the first video, I change the states of the pipelines so that the second video begins to play. There is maybe a half-second delay before the second video is seen, during which time the desktop is visible. I believe what is happening is that the second video is opening a new window before it plays. If that is true, then I need to use the XOverlay window ID in order to tell the second video what window to open in, but I am not sure what is actually necessary to do this. All of the xoverlay examples I have seen sprinkle this in with lots of GUI code, and I am having trouble determining what's what.
Could someone please explain what is needed to get/set the window ID so I can always play in the same window? I am writing this as a C++ application and can use GTK+ 2.0, but I would like to stay away from any QT approach.
Thank you in advance, Josh Kurland
Upvotes: 0
Views: 1175
Reputation: 7434
With gtk_widget_get_window()
you can get the GdkWindow
of any realized widget. If you need its X ID, use GDK_WINDOW_XID()
.
Use gtk_widget_set_window()
to set the GdkWindow
of a widget. Read the docs for the caveats.
Upvotes: 0
Reputation: 3440
gst-plugins-base/tests/examples/overlay/ has examples for how to use the overlay with various toolkits. Regarding the delay you would be better off using playbin, as this has a feature to do seamless playback. It will prepare the 2nd video when getting close to the end of the first video. Finally consider using gstreamer-1.X as 0.10 is in maintenance mode.
Upvotes: 2