Getting sample rate / sample format/ channels cound of playbin in python

Pavel Hofman pavel.hofman at ivitera.com
Fri Dec 8 18:29:27 UTC 2017


Hi Tim,

Dne 8.12.2017 v 10:47 Tim Müller napsal(a):
> On Fri, 2017-12-08 at 08:01 +0100, Pavel Hofman wrote:
> 
> 
> Ah, I think something like this should work (untested).
> 
>    pad = playbin.emit('get-audio-pad', 0)

Works like charm, thanks a lot! Please when is the proper time to check 
the caps of the pad? When pad.get_current_caps() is called too early, 
the result is None. Is there a specific message in which handler to get 
the caps the caps? Is there perhaps a way to register a callback and 
monitor these capabilities for change? I need to send a message further 
down my system when the audio parameters change.

Please what specific pad of the whole pipeline graph does the 
"get-audio-pad" signal returns? Is it the pad which my audio sink is 
attached to in playbin by calling

playbin.set_property('audio-sink', audio_sink) ?

Thanks a lot.

>> I will take a look at playbin3, my project needs no backward
>> compatibility. Is playbin3 stable enough?
> 
> Depends what you're doing exactly, but should be, yes. Please file any
> issues you're encountering in bugzilla.

Thanks a lot, I will try to install playbin3 into my mint and test it.

Best regards,

Pavel.


More information about the gstreamer-devel mailing list