如何向总线发送EOS消息
好的,我有这样的事情:
self.pipeline = gst.Pipeline()
self.tee = gst.element_factory_make
self.source = gst.element_factory_make('subdevsrc')
self.source.set_property('viewfinder-mode', 1)
self.source.set_property('camera-device', 1)
self.capsfilter = gst.element_factory_make('capsfilter')
caps = 'video/x-raw-yuv, width=640, height=480'
self.capsfilter.set_property('caps', gst.caps_from_string(caps))
self.tee = gst.element_factory_make('tee')
self.queue1 = gst.element_factory_make('queue')
self.queue2 = gst.element_factory_make('queue')
self.encoder = gst.element_factory_make('dsphdmp4venc')
self.muxer = gst.element_factory_make('mp4mux')
self.imagesink = gst.element_factory_make('xvimagesink')
self.filesink = gst.element_factory_make('filesink')
self.filesink.set_property('location', '/dev/null')
self.pipeline.add(self.source, self.capsfilter, self.tee, self.queue1, self.queue2, self.encoder, self.muxer, self.imagesink, self.filesink)
gst.element_link_many(self.source, self.capsfilter, self.tee, self.queue1, self.imagesink)
gst.element_link_many(self.tee, self.queue2, self.encoder, self.muxer, self.filesink)
self.bus = self.pipeline.get_bus()
我想停止(EOS)处于就绪状态的流,更改位置等等.. 帮助?
self.bus.emit('eos') 给我 TypeError: : 未知信号名称: eos
ok, I have something like this:
self.pipeline = gst.Pipeline()
self.tee = gst.element_factory_make
self.source = gst.element_factory_make('subdevsrc')
self.source.set_property('viewfinder-mode', 1)
self.source.set_property('camera-device', 1)
self.capsfilter = gst.element_factory_make('capsfilter')
caps = 'video/x-raw-yuv, width=640, height=480'
self.capsfilter.set_property('caps', gst.caps_from_string(caps))
self.tee = gst.element_factory_make('tee')
self.queue1 = gst.element_factory_make('queue')
self.queue2 = gst.element_factory_make('queue')
self.encoder = gst.element_factory_make('dsphdmp4venc')
self.muxer = gst.element_factory_make('mp4mux')
self.imagesink = gst.element_factory_make('xvimagesink')
self.filesink = gst.element_factory_make('filesink')
self.filesink.set_property('location', '/dev/null')
self.pipeline.add(self.source, self.capsfilter, self.tee, self.queue1, self.queue2, self.encoder, self.muxer, self.imagesink, self.filesink)
gst.element_link_many(self.source, self.capsfilter, self.tee, self.queue1, self.imagesink)
gst.element_link_many(self.tee, self.queue2, self.encoder, self.muxer, self.filesink)
self.bus = self.pipeline.get_bus()
I want to stop (EOS) the stream in ready state, change the location and so..
help?
self.bus.emit('eos')
gives me TypeError: : unknown signal name: eos
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我以某种方式解决了它:
我添加了
三种方法:
well I solved it somehow:
I added
and three methods: