预定在农林的休息时间 [英] Scheduled pause in Gnonlin
问题描述
我正在使用Gnonlin播放两个视频.有一刻,我想暂停一个视频,然后播放另一个视频.但是,我不想手动暂停管道,因为其他视频也将暂停.
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.
例如:
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?
推荐答案
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)
获取冻结的帧5秒钟.它可能对您有用...或者这可能对您有用:
To get a frozen frame for 5 seconds. It may work for you...alternatively this may work:
self._playbin.set_state(gst.STATE_PAUSED)
除此之外,我没有任何建议-文档似乎很少.如果您可以将我指向API,则可能会有更好的主意.
Other than that, I have no suggestions - documentation seems sparse. If you could point me to an API I may have a better idea.
这篇关于预定在农林的休息时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!