def createSink(self): sink = Gst.ElementFactory.make(videosink_factory.get_name(), None) if videosink_factory.get_name() == "gtksink": self.info("Using gtksink") return sink sinkbin = Gst.ElementFactory.make("glsinkbin", None) sinkbin.props.sink = sink return sinkbin
def create_sink(self): sink = Gst.ElementFactory.make(videosink_factory.get_name(), None) self.sink_widget = sink.props.widget if videosink_factory.get_name() == "gtksink": self.info("Using gtksink") self.video_sink = sink else: self.info("Using glsinkbin around %s", videosink_factory.get_name()) sinkbin = Gst.ElementFactory.make("glsinkbin", None) sinkbin.props.sink = sink self.video_sink = sinkbin
def create_sink(self): sink = Gst.ElementFactory.make(videosink_factory.get_name(), None) self.sink_widget = sink.props.widget if videosink_factory.get_name() == "gtksink": self.info("Using gtksink") self.video_sink = sink else: self.info("Using glsinkbin around %s", videosink_factory.get_name()) sinkbin = Gst.ElementFactory.make("glsinkbin", None) sinkbin.props.sink = sink self.video_sink = sinkbin
def create_sink(self): """Creates a video sink and a widget for displaying it. Returns: (Gst.Element, Gtk.Widget): An element of type Gst.ElementFlags.SINK and a widget connected to it. """ factory_name = videosink_factory.get_name() sink = Gst.ElementFactory.make(factory_name, None) widget = sink.props.widget if factory_name == "gtksink": self.info("Using gtksink") video_sink = sink else: self.info("Using glsinkbin around %s", videosink_factory.get_name()) video_sink = Gst.ElementFactory.make("glsinkbin", None) video_sink.props.sink = sink return video_sink, widget