def __init__(self, manager, task_queue, media_queue, pipeline_string):
        """Initialize process."""
        super(GstreamerProcess, self).__init__()
        self._state = None
        self._tags = {}
        self._manager = manager
        self._task_queue = task_queue
        self._media_queue = media_queue
        self.state = STATE_IDLE
        self._player = Gst.ElementFactory.make('playbin', 'player')
        if pipeline_string:
            sink = Gst.parse_bin_from_description(pipeline_string, True)
            self._player.set_property(PROP_AUDIO_SINK, sink)
        bus = self._player.get_bus()
        bus.add_signal_watch()
        bus.connect('message', self._on_message)
def __init__ ( self , manager , task_queue , media_queue , pipeline_string ) : super ( GstreamerProcess , self ) . __init__ ( ) self . _state = None self . _tags = { } self . _manager = manager self . _task_queue = task_queue self . _media_queue = media_queue self . state = STATE_IDLE self . _player = Gst . ElementFactory . make ( 'playbin' , 'player' ) if pipeline_string : sink = Gst . parse_bin_from_description ( pipeline_string , True ) self . _player . set_property ( PROP_AUDIO_SINK , sink ) bus = self . _player . get_bus ( ) bus . add_signal_watch ( ) bus . connect ( 'message' , self . _on_message )
Initialize process.