summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
483b52d)
Later versions of the Python GStreamer bindings lack a binding for
`gst_element_link_many' -- because that would make things too easy or
something -- so prepare by introducing and using a utility function.
No functional change.
elt.set_properties(**props)
return elt
elt.set_properties(**props)
return elt
+def link_elements(elts):
+ "Link the elements ELTS together, in order."
+ GS.element_link_many(*elts)
+
class GStreamerProgressEyecandy (ProgressEyecandy):
"""
Provide amusement while GStreamer is busy doing something.
class GStreamerProgressEyecandy (ProgressEyecandy):
"""
Provide amusement while GStreamer is busy doing something.
elt.link_pads(pad.get_name(), sink, 'sink')
dpaid = decoder.connect('pad-added', decoder_pad_arrived)
me._pipe.add(source, decoder, sink)
elt.link_pads(pad.get_name(), sink, 'sink')
dpaid = decoder.connect('pad-added', decoder_pad_arrived)
me._pipe.add(source, decoder, sink)
- GS.element_link_many(source, decoder)
+ link_elements([source, decoder])
## Arrange to collect tags from the pipeline's bus as they're reported.
## If we reuse the pipeline later, we'll want different bus-message
## Arrange to collect tags from the pipeline's bus as they're reported.
## If we reuse the pipeline later, we'll want different bus-message
elts = me.encoder_chain()
bin = GS.Bin()
bin.add(*elts)
elts = me.encoder_chain()
bin = GS.Bin()
bin.add(*elts)
- GS.element_link_many(*elts)
bin.add_pad(GS.GhostPad('sink', elts[0].get_pad('sink')))
bin.add_pad(GS.GhostPad('src', elts[-1].get_pad('src')))
return bin
bin.add_pad(GS.GhostPad('sink', elts[0].get_pad('sink')))
bin.add_pad(GS.GhostPad('src', elts[-1].get_pad('src')))
return bin
encoder = me.encoder()
sink = make_element('filesink', 'sink', location = new)
pipe.add(source, decoder, convert, encoder, sink)
encoder = me.encoder()
sink = make_element('filesink', 'sink', location = new)
pipe.add(source, decoder, convert, encoder, sink)
- GS.element_link_many(source, decoder)
- GS.element_link_many(convert, encoder, sink)
+ link_elements([source, decoder])
+ link_elements([convert, encoder, sink])
## Some decoders (e.g., the AC3 decoder) include channel-position
## indicators in their output caps. The Vorbis encoder interferes with
## Some decoders (e.g., the AC3 decoder) include channel-position
## indicators in their output caps. The Vorbis encoder interferes with