def test_no_cairo(): video_source = select_video_source() video_sink = gst.element_factory_make('autovideosink', 'video_sink') video_sink = gst.element_factory_make('autovideosink', 'video_sink') pipeline = gst.Pipeline() pipeline.add(video_source, video_sink) gst.element_link_many(video_source, video_sink) pipeline.set_state(gst.STATE_PLAYING) pipeline.set_state(gst.STATE_NULL)
def test_cairo(): video_source = select_video_source() video_sink = gst.element_factory_make('autovideosink', 'video_sink') video_sink = gst.element_factory_make('autovideosink', 'video_sink') pipeline = gst.Pipeline() cairo_draw = CairoDrawQueue('cairo_draw') cairo_color_in = gst.element_factory_make('ffmpegcolorspace', 'cairo_color_in') cairo_color_out = gst.element_factory_make('ffmpegcolorspace', 'cairo_color_out') pipeline.add(video_source, video_sink, cairo_draw, cairo_color_in, cairo_color_out) gst.element_link_many(video_source, cairo_color_in, cairo_draw, cairo_color_out, video_sink) pipeline.set_state(gst.STATE_PLAYING) return pipeline