Код: Выделить всё
# init Gst and create pipeline
Gst.init(None)
self.player = Gst.Pipeline.new()
self.playbin = Gst.ElementFactory.make("playbin", "player")
self.imagesink = Gst.ElementFactory.make("glimagesink")
self.imagesink.set_property("sync", True)
if self.imagesink:
self.playbin.set_property("video-sink", self.imagesink)
else:
self.logger.error("Failed to create GTK sink for video.")
if not self.playbin:
raise Exception("Failed to create the playbin. Check if GStreamer is installed properly.")
self.playbin.set_property("flags", (1
Подробнее здесь: [url]https://stackoverflow.com/questions/78791305/project-issue-with-pipelines[/url]