linux - GStreamer:如何循环播放 1 个文件?

标签 linux gstreamer python-gstreamer

这样:

import gst
self.player = gst.element_factory_make("playbin", "player")
self.player.set_property('uri','file:///test.ogg))
self.player.set_state(gst.STATE_PLAYING)

如何强制 test.ogg 文件无限循环?

最佳答案

这是代码:

def _loop(self, message):
    self.player.set_property('uri', 'file://your_file_path')

self.player = Gst.ElementFactory.make(PLAYBIN, "player")
self.player.connect("about-to-finish", self._loop)
self.player.set_property('uri', 'file://your_file_path')

干杯!

关于linux - GStreamer:如何循环播放 1 个文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29377472/

相关文章:

python - 从后台 python 进程捕获和使用输入事件,而不通知焦点窗口

ubuntu - ubuntu 16.04 中的 Gstreamer gst-launch udpsrc 不起作用

linux - 带有 CAM8200-U 的两个 RIoT 板之间通过 UDP 的 Gstreamer

python - 使用 gstreamer/Python 剪切视频的一部分(gnonlin?)

linux - 在python gstreamer中寻找大的原始视频文件

linux - 查找包含匹配项和提取字段的段落

linux - 如何找出 linux 驱动程序中定义的预处理器

linux - 如何确定目的MAC地址

python - 如何使用 Gstreamer 和 Python RTSP 流式传输视频?

python - 使用 python-gstreamer 指定声卡