Adding key-frame and bitrate target option in vp8 encoder.
[libre-streamer.git] / gstpipeline.py
CommitLineData
6fdd41d9
DT
1#!/usr/bin/env python3.4
2
3from gi.repository import Gst
4
5
6def constructpipeline (self):
7
8
9 """Add and link elements in a GStreamer pipeline"""
10
11 # Create the pipelines instance.
12 self.streampipe = Gst.Pipeline()
13 self.storepipe_hi = Gst.Pipeline()
14 self.storepipe_lo = Gst.Pipeline()
15
16 # Define pipeline elements.
17## The next line will NOT display the camera's video feed
18## self.videosrc = Gst.ElementFactory.make('location', 'rtsp://192.168.48.2:554')
19 self.videosrc = Gst.ElementFactory.make('videotestsrc', 'source')
20
21 self.queue = Gst.ElementFactory.make('queue')
22
23## self.oggstreamsink = Gst.ElementFactory.make()
24## self.oggdisksink = Gst.ElementFactory.make()
25
26## self.jpegdisksink = Gst.ElementFactory.make()
27
28 self.screensink = Gst.ElementFactory.make('sink', 'xvimagesink')
29
30## self.webmdisksink = Gst.ElementFactory.make()
31## self.webmstreamsink = Gst.ElementFactory.make()
32
33 # Add the elements to the pipeline.
34 self.streampipe.add(self.videosrc,
35 self.queue,
36 self.screensink,)
37
38 # Link the elements in the pipeline.
39
40constructpipeline()
41streampipe.set_state(Gst.State.PLAYING)