[mpris] MPRIS misdesigns

Lennart Poettering lennart at poettering.net
Wed Feb 25 07:16:57 CET 2009


On Tue, 24.02.09 18:25, Rémi Denis-Courmont (rem at videolan.org) wrote:

Heya!

> You mentioned that gstreamer would be notified of the audio output preemption 
> inline. Why would other players not be notified as well, assuming they use 
> PulseAudio in the first place? Silently muting ALSA emulation users seems 
> like an acceptable limitation. On the other hand, VLC could well 
> be "outputting" to a file or to the network. We don't want PulseAudio to 
> blindly pause the media stream in that case.

All applications that link against libpulse or GStreamer can handle
the pause/unpause requests directly.

However we simply have to acknowledge the fact that not everyone links
against libpulse directly and won't for the next future. For example
everyone who goes thorugh the alsa compat stuff won't be able to use
this functionality.  The MPRIS logic in PA is intended as a somewhat
clean approach to overcome this for now.

The logic currently implemented in PA is to send out the pause request
as well as immediately muting in case the application does not comply.

I don't think your point with "outputting to a file" is really
valid. Firstly, after all the MP in MPRIS stands for "media player"
and not "hard disk decoder" or anything like that. Media players play
media, i.e. show video and/or audio. If an app doesn't do that it
should not register a MPRIS service. Secondly, we'd of course only
pause MPRIS services where we find an associated audio stream
for. After all, our primary objective is to make audio pause, not so
much stop everything we can possible pause.

> Moreover, a completely separate notification channel will probably come with 
> race conditions of its own.

I don't think so.

> This is a questionable design choice. As you can guess, it only allows one 
> instance of a given media player at a time.

And is that a problem? 

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the mpris mailing list