Beispiel #1
0
    def chain(self, this, buffer):
        timestamp = buffer.contents.timestamp * 0.000000001
        albuffer = openal.buffer_pool.get(timestamp)
        size = buffer.contents.size
        al.alBufferData(albuffer, self.format, 
                        buffer.contents.data, size,
                        self.rate)
        gst.gst_mini_object_unref(buffer)

        self.element._add_buffer(albuffer, size / self.bytes_per_second)
        return gstreamer.GST_FLOW_OK
Beispiel #2
0
 def chain(self, this, buffer):
     self.element._add_frame(buffer.contents.data, 
                             buffer.contents.size,
                             buffer.contents.timestamp * 0.000000001)
     gst.gst_mini_object_unref(buffer)
     return gstreamer.GST_FLOW_OK