Created
November 19, 2014 23:11
-
-
Save markwingerd/9bb7d2cc0669fe1a410a to your computer and use it in GitHub Desktop.
GStreamer Tutorial 2: Part 2/3 - Streams multimedia using Playbin2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add elements to our bin | |
output_bin.add(decode, convert, solarize, video_sink) | |
# Link decodebin with autoconvert when its source pad has been created. | |
decode.connect('new-decoded-pad', on_new_decoded_pad) | |
# Callback function to link decodebin to autoconvert. | |
def on_new_decoded_pad(dbin, pad, islast): | |
decode = pad.get_parent() | |
pipeline = decode.get_parent() | |
convert = pipeline.get_by_name('convert') | |
decode.link(convert) | |
print 'linked!' | |
# Link the rest of our elements together. | |
if not gst.element_link_many(convert, solarize, video_sink): | |
print 'Not all elements could link.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment