Question

I am using Gnonlin to play two videos. At one moment, I would like to pause one video and run another. However, I don't want to manually pause the pipeline, as the other video also will be paused.

For example:

self.video[0].set_property("location", LOCATION_VIDEO1)
self.video[0].set_property("start", 0 * gst.SECOND)
self.video[0].set_property("duration", 5 * gst.SECOND)
self.video[0].set_property("media-start", 0 * gst.SECOND)
self.video[0].set_property("media-duration", 5 * gst.SECOND)

This video runs for five seconds. What can I do to pause it or stop playing this video for the next five seconds? Is there a way to show the same frame for five seconds?

No correct solution

OTHER TIPS

Based on this article http://www.jonobacon.com/2006/12/27/using-gnonlin-with-gstreamer-and-python/, if I'm understanding it right, I think you can write:

self.video[0].set_property("location", LOCATION_VIDEO1)
self.video[0].set_property("start", 0 * gst.SECOND)
self.video[0].set_property("duration", 5 * gst.SECOND)
self.video[0].set_property("media-start", 0 * gst.SECOND)
self.video[0].set_property("media-duration", 0 * gst.SECOND)

To get a frozen frame for 5 seconds. It may work for you...alternatively this may work:

self._playbin.set_state(gst.STATE_PAUSED) 

Other than that, I have no suggestions - documentation seems sparse. If you could point me to an API I may have a better idea.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top