示例#1
0
    def _new_audio_pad(self, pad, channels, depth, sample_rate):
        # Connect the decoded audio pad to the audioconvert
        convertpad = gst.gst_element_get_pad(self.convert, 'sink')
        gst.gst_pad_link(pad, convertpad)
        gst.gst_object_unref(convertpad)

        self._has_audio = True
示例#2
0
    def _new_audio_pad(self, pad, channels, depth, sample_rate):
        '''Create and connect the sink for the given source pad.'''
        convertpad = gst.gst_element_get_pad(self.convert, 'sink')
        gst.gst_pad_link(pad, convertpad)
        gst.gst_object_unref(convertpad)

        self._sound = openal.OpenALStreamingSound()
        self._sound._buffer_time = self._buffer_time
示例#3
0
    def _new_audio_pad(self, pad, channels, depth, sample_rate):
        '''Create and connect the sink for the given source pad.'''
        convertpad = gst.gst_element_get_pad(self.convert, 'sink')
        gst.gst_pad_link(pad, convertpad)
        gst.gst_object_unref(convertpad)

        sink = self.sink
        pysink = OpenALStreamingSinkElement.get_instance(self.sink)
        pysink.init(self)
示例#4
0
 def _new_video_pad(self, pad):
     sinkpad = gst.gst_element_get_pad(self.videoconvert, 'sink')
     gst.gst_pad_link(pad, sinkpad)
     gst.gst_object_unref(sinkpad)