#!/usr/bin/env python3.4 from gi.repository import Gst def constructpipeline (self): """Add and link elements in a GStreamer pipeline""" # Create the pipelines instance. self.streampipe = Gst.Pipeline() self.storepipe_hi = Gst.Pipeline() self.storepipe_lo = Gst.Pipeline() # Define pipeline elements. ## The next line will NOT display the camera's video feed ## self.videosrc = Gst.ElementFactory.make('location', 'rtsp://192.168.48.2:554') self.videosrc = Gst.ElementFactory.make('videotestsrc', 'source') self.queue = Gst.ElementFactory.make('queue') ## self.oggstreamsink = Gst.ElementFactory.make() ## self.oggdisksink = Gst.ElementFactory.make() ## self.jpegdisksink = Gst.ElementFactory.make() self.screensink = Gst.ElementFactory.make('sink', 'xvimagesink') ## self.webmdisksink = Gst.ElementFactory.make() ## self.webmstreamsink = Gst.ElementFactory.make() # Add the elements to the pipeline. self.streampipe.add(self.videosrc, self.queue, self.screensink,) # Link the elements in the pipeline. constructpipeline() streampipe.set_state(Gst.State.PLAYING)