<div dir="ltr">Has there been any more traction on MPRIS v2.3?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 4:32 PM, Alex Merry <span dir="ltr"><<a href="mailto:kde@randomguy3.me.uk" target="_blank">kde@randomguy3.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/04/13 02:16, mirsal wrote:<br>
> Hello !<br>
><br>
> On Thu, 2013-04-04 at 17:04 +0100, Alex Merry wrote:<br>
>> We've got some things proposed for a possible MPRIS v2.3 [1], and I'd<br>
>> like to get some feedback about which, if any, we want in.<br>
><br>
> I think these points are all sensible, though they are also rather<br>
> tricky in a way and there are quite a lot of things to discuss before a<br>
> draft can be produced.<br>
<br>
</span>I suppose I should reply to this...  Someone's proposing an extention to<br>
Amarok's D-Bus interface for editing the rating, and it already has an<br>
extension for Mute.<br>
<span class=""><br>
>> First up is a Mute property [2], as this is often orthogonal to volume;<br>
>> this should be on the Player interface:<br>
>> property b Mute<br>
>>  - emits PropertiesChanged<br>
><br>
> Indeed, though I think we should define how the media players should<br>
> behave with regards to the Volume property, that is, we should either<br>
> have all media players treating muting as orthogonal to the volume or<br>
> have changing the volume affect Mute in all of them.<br>
><br>
> Mute and Volume being orthogonal seems rather natural to me, although it<br>
> might force media players to keep some state for the only sake of the<br>
> mpris if they handle muting internally as simply setting the volume to<br>
> zero.<br>
><br>
> (That point is probably moot as these media players might simply choose<br>
> not to implement Mute instead, however I think the spec should not leave<br>
> any ambiguity about that)<br>
<br>
</span>I agree on all fronts (including that media players that don't want to<br>
implement Mute as orthogonal can simply not implement it).<br>
<span class=""><br>
>> Second is metadata editing [3], on both Player and TrackList:<br>
>> method UpdateMetadata(in a{sv} updatedEntries, in as deletedEntries)<br>
>> - what happens to entries appearing in both arguments is undefined<br>
>> - wait for PropertiesChanged on Metadata to see if it worked<br>
>> property as EditableMetadataEntries<br>
>>  - emits PropertiesChanged<br>
><br>
> This looks racy to me.<br>
> Maybe the old value should be supplied along with the new one ?<br>
<br>
</span>That's not the sort of race we need to be concerned about.  But you're<br>
right, it is racy: we should have the track id as an argument.<br>
<span class=""><br>
> I don't really like the fact that there would be no way to detect<br>
> failure besides an arbitrary timeout (adding tracks has the same issue<br>
> though and there might not be much we can do)<br>
<br>
</span>On the basis that clients are most likely to want to change properties<br>
one-at-a-time, we could instead have<br>
method SetMetadataField(in s field, in v value, in o trackId)<br>
and<br>
method DeleteMetadataField(in s field, in o trackId)<br>
which could either be allowed to return a D-Bus error or have an "out b<br>
success" argument.<br>
<br>
With the existing modification methods in the spec (AddTrack, for<br>
example, or setting properties) we are either silent about whether<br>
errors can be raised or explicitly forbid errors (unless Can* is false).<br>
 In retrospect, I'm not sure that was a sensible decision, but we can't<br>
really demand that errors be raised now.<br>
<span class=""><br>
>> Third is HasPlaylists, which should make it easier for clients to see<br>
>> whether there is a Playlists interface implemented (fewer round trips if<br>
>> they use GetAll).  Not certain whether this is worth it, but we already<br>
>> have HasTrackList.<br>
>> property b HasPlaylists<br>
><br>
> I think the right question to ask is: Would changes at runtime need to<br>
> be signaled ?<br>
><br>
> If not the case, then dbus introspection should suffice.<br>
<br>
</span>True, I guess.  One extra roundtrip for those clients that care about<br>
Playlists isn't that much; they can just try to get the properties on<br>
the Playlists interface and see if it works.  In fact, that's probably<br>
the approach we should take with all new interfaces.<br>
<span class=""><br>
>> Fourth is a variant of Raise with a timestamp, which helps avoid<br>
>> focus-stealing prevention in window managers.<br>
>> method RaiseWithTimestamp(in x timestamp)<br>
><br>
> Yes, that is definitely needed, however RaiseWithTimestamp as a name<br>
> would probably feel very awkward to client application developers not<br>
> familiar with focus stealing prevention mechanisms' implementations.<br>
> Maybe calling it something like Focus and explaining the difference in<br>
> terms of effects (merely requiring attention in the case of Raise with<br>
> focus stealing prevention vs sending the to the front unconditionally<br>
> for Focus/RaiseWithTimestamp) would be a bit better.<br>
<br>
</span>OTOH, you need to know something about focus stealing prevention to<br>
correctly use this API.  That timestamp is supposed to come from a user<br>
interaction message, and the name is meant to mirror what toolkits like<br>
GTK+ use.<br>
<br>
Also, the difference in behaviour is down to window managers.  The<br>
timestamp is used to decide whether to allow the window to be raised;<br>
including it does not unconditionally raise it.<br>
<span class=""><br>
>> - arg is unix timestamp of the input event that triggered the call<br>
>><br>
>> property b HasRaiseWithTimestamp<br>
>> - introspection parsing sucks; use in combination with CanRaise<br>
><br>
> I agree that it sucks though the bindings should get fixed instead of<br>
> the MPRIS working around their lacks.<br>
<br>
</span>I suppose.<br>
<span class=""><br>
> I don't think it makes sense for this to change at runtime independently<br>
> of CanRaise.<br>
<br>
</span>Yeah, it wasn't meant to change.<br>
<span class="HOEnZb"><font color="#888888"><br>
Alex<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
MPRIS mailing list<br>
<a href="mailto:MPRIS@lists.freedesktop.org">MPRIS@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mpris" rel="noreferrer" target="_blank">http://lists.freedesktop.org/<wbr>mailman/listinfo/mpris</a><br>
</div></div></blockquote></div><br></div>