Skip to content

Instantly share code, notes, and snippets.

@markwingerd
Created November 20, 2014 22:51
Show Gist options
  • Save markwingerd/8f0e72318f3f30d08f51 to your computer and use it in GitHub Desktop.
Save markwingerd/8f0e72318f3f30d08f51 to your computer and use it in GitHub Desktop.
GStreamer Tutorial 3: Part 3/4 - Streams and splits multimedia using Playbin2
# Request pads to manually link the tee Element.
tee_audio_pad = tee.get_request_pad('src%d')
tee_wavescope_pad = tee.get_request_pad('src%d')
tee_file_pad = tee.get_request_pad('src%d')
print 'Obtained request pad %s for audio branch.'% tee_audio_pad.get_name()
print 'Obtained request pad %s for audio branch.'% tee_wavescope_pad.get_name()
print 'Obtained request pad %s for audio branch.'% tee_file_pad.get_name()
# Manually link the tee pads to the queue pads.
queue_audio_pad = audio_queue.get_static_pad('sink')
queue_wavescope_pad = wavescope_queue.get_static_pad('sink')
queue_file_pad = file_queue.get_static_pad('sink')
if (tee_audio_pad.link(queue_audio_pad) != gst.PAD_LINK_OK or
tee_wavescope_pad.link(queue_wavescope_pad) != gst.PAD_LINK_OK or
tee_file_pad.link(queue_file_pad) != gst.PAD_LINK_OK):
print 'Tee could not be linked.'
exit(-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment