Review Request: Add MPRIS2 support to JuK
Alex Merry
kde at randomguy3.me.uk
Fri Apr 20 01:50:44 BST 2012
> On April 19, 2012, 10:24 p.m., Michael Pyne wrote:
> > Thanks, oddly enough Eike Hein also recently contributed some code to support MPRIS2 since Konversation will soon only support that. See http://quickgit.kde.org/index.php?p=clones%2Fjuk%2Fmpyne%2Fjuk-MPRIS.git&a=summary I didn't have a good tester for it though, and it sounds as if you've implemented more of the interfaces (so far we only have the Player interface).
>
> Eike Hein wrote:
> Michael is being a bit generous there, what I've actually done is implement MPRIS2 for Dragon, and he's doing the job of porting my Dragon code over to JuK right now.
>
> Check out git at git.kde.org:hein/scratch/dragon for that code (I'm about to update it to reflect MPRIS 2.2).
>
> I have a hunch that your next task would be to work on Dragon, so you can rest comfortably that the work is already done.
>
> Alex Merry wrote:
> Eike: I'll try running dragon through my tester program once I have a working kdelibs 4.8.3. One issue you might have to fix is that the Raise code didn't work for JuK; I used Amarok's, which uses show() instead of raise() and forceActivateWindow() instead of activateWindow().
>
> Also, I'm not sure QApplication::closeAllWindows() is the right thing to call from Quit; wouldn't QCoreApplication::quit() be better?
>
> Alex Merry wrote:
> Oh, also, your track ids shouldn't start with /org/mpris/MediaPlayer2; that's reserved for use by the spec.
>
> Eike Hein wrote:
> I call QApplication::closeAllWindows() because that's what Dragon's own KStandardAction::quit is hooked up to as well. Frankly I found it questionable too since I would expect that to break when an unclosable dialog window is open, but I figured I'd follow the Dragon developer's decision and went for consistency.
>
> As for the track IDs, basically every player I tested with used /org/mpris/MediaPlayer2 in the track IDs and the plans for 2.2 seemed to sort of codify it with the NoTrack thing (which I now realize I misunderstood), that's why I went for it. I'll change that.
>
> I also just pushed MPRIS 2.2 support, i.e. the fullscreen things, and mpyne is merging that into the JuK version.
>
> Eike Hein wrote:
> Fixed the trackids for Dragon.
>
> Eike Hein wrote:
> Regarding the raise code, Amarok calls show() because it has a system tray icon and thus its window may actually be hidden, which isn't the case for Dragon, so raise() ought to be good enough there. For JuK, show() might be better though.
>
> Using forceActiveWindow() is a bit nasty actually because it bypasses kwin's focus stealing prevention, although I suppose you can make a case that a call to the method will most likely be user intent, so in the end I decided to adopt it in Dragon, too.
WRT track IDs, we only put that restriction in to 2.2, when we put in NoTrack and realised we wanted to avoid potential clashes (Amarok has an id for "not in the playlist", for example, and it's not inconceivable the spec could get something similar at some point).
- Alex
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104681/#review12687
-----------------------------------------------------------
On April 20, 2012, 12:19 a.m., Alex Merry wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104681/
> -----------------------------------------------------------
>
> (Updated April 20, 2012, 12:19 a.m.)
>
>
> Review request for KDE Multimedia and Michael Pyne.
>
>
> Description
> -------
>
> This adds basic support for MPRIS2 to JuK (http://specifications.freedesktop.org/mpris-spec/latest/)
>
> Some (optional) things are still unsupported as I have not figured out how to make them work. Notably, it is not possible to seek, as the naive implementation (calling PlayerManager->seek()) behaves strangely (the existing D-Bus interface doesn't support seeking, either).
>
> The existing collection interface is not replicated. Most things from the existing player interface are implemented in this MPRIS2 interface (I think the only exception is that MPRIS2 does not have an "album random" option).
>
>
> Diffs
> -----
>
> CMakeLists.txt 9bd57f6c08abd9b144b0abc1775702284d6af753
> mprisproxy.h PRE-CREATION
> mprisproxy.cpp PRE-CREATION
> org.mpris.MediaPlayer2.Player.xml PRE-CREATION
> org.mpris.MediaPlayer2.xml PRE-CREATION
> playermanager.h 0eec655b487c5e0e37856b39e128087038987f05
> playermanager.cpp 54f601d19f801327f45b3157ed090aa785370583
> volumepopupbutton.h 6fb621b10c9a29f11d66869aac6451ed52935d79
> volumepopupbutton.cpp 76bd95d8e8713ace3afcba0ee510fdb19d6777b3
>
> Diff: http://git.reviewboard.kde.org/r/104681/diff/
>
>
> Testing
> -------
>
> Tested using the MPRIS2 tester application (http://github.com/randomguy3/mpristester).
>
>
> Thanks,
>
> Alex Merry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20120420/d7e5a4b5/attachment.htm>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
More information about the kde-multimedia
mailing list