request for comments: plan for audio/video policy integration in gstreamer

Alexander Kanavin alexander.kanavin at intel.com
Tue Oct 16 04:10:54 PDT 2012


On 10/12/2012 04:54 PM, Wim Taymans wrote:

> Why no use pulseaudio? I believe it can do all this already. It doesn't
> sound like something that GStreamer should do.
>
> Also, you can't pause the pipeline from an element. We have a REQUEST_STATE
> message for this purpose (which pulseaudio sends to the pipeline when a
> policy requires you to pause a stream).

We're using pulseaudio already :) and we've hit limits with it that can 
be addressed by moving policy support to gstreamer:

1) It's not just about audio policy - we also need to have a policy for 
video playback. Doing that in pulseaudio would be rather odd, while 
gstreamer pipeline is a natural, common spot for it. There's also a 
possibility of playing videos that don't have audio.

2) REQUEST_STATE message is supposed to be handled by applications, not 
by pipeline. I couldn't find a single application that's actually acting 
on it - except gst-launch. It's not realistic to go out and fix them 
all, or to track all new applications that are written. Also, we need to 
enforce the policy, not to leave it up to applications.

3) While it's possible to use 'pactl suspend-sink 0 1' to pause the 
playback, applications that use gstreamer get no notification about it, 
or a reason why it has happened. The pipeline just silently stops. 
That's not a good user experience.


As for pausing the pipeline from an element, it could be done by 
obtaining the top-level pipeline object via gst_element_get_parent() in 
a loop and issuing a state change request on that. Is there a technical 
reason why this wouldn't work?

Regards,
Alex


More information about the gstreamer-devel mailing list