Playback of a video stream is slow under GTK
pisymbol .
pisymbol at gmail.com
Mon Jul 29 23:47:56 UTC 2019
On Mon, Jul 29, 2019 at 5:51 PM Mathieu Duponchelle <mathieu at centricular.com>
wrote:
> I've never seen that, but a test case would probably be helpful :)
>
Not sure what exactly to share:
Here is the gist of the code:
class GstPlayerWdiget(Gtk.Box):
....
self.play_pipeline = Gst.Pipeline()
factory = self.play_pipeline.get_factory()
gtksink = Gst.ElementFactory.make('gtksink', None)
gtksink.set_property("sync", False)
self.ghostpad = Gst.GhostPad.new("sink",
self.vc.get_static_pad('src'))
self.play_bin.add_pad(self.ghostpad)
self.play_pipeline.add(gtksink)
self.play_pipeline.add(self.play_bin)
self.play_bin.link(gtksink)
self.pack_start(gtksink.props.widget, True, True, 0)
# We automatically start playing as soon as we are drawn on the
screen
bus = self.play_pipeline.get_bus()
bus.add_signal_watch()
bus.enable_sync_message_emission()
bus.connect("sync-message::element", self.on_sync_message)
self.play_pipeline.set_state(Gst.State.PLAYING)
gtksink.props.widget.show_all()
> Also, you should always use
> queues after demuxers.
>
>
Threading them out always going to be faster?
-aps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190729/54194e06/attachment.html>
More information about the gstreamer-devel
mailing list