Page 1 of 1

MediaView with DBus mpris control

Posted: Tuesday 7th February 2023 6:48pm
by BruceSteers
I've been trying to make a mpris enabled MediaView control

https://gitlab.com/bsteers4/gb.mediaview.mpris

It needs some folks with more gb.DBus knowledge than me i think.

It is a copy of the MediaView control with a few modifications like accessing the internal MediaPlayer control to get State.

Plus a dbus class for the mpris.MediaPlayer2 that can control the MediaView

Todo: the MediaView does not fire property changes correctly and inform DBus of state changes.


Cinnamon media controller applet can play/pause and read the metadata
(it seems glitchy though and it's play button does not change to pause as it does not get the property change)

My own media controller application can play/pause/seek/position/set volume

but it sometimes reads Null when getting the dbus properties from this application (not others).

If you want to help on this project then find it here..
https://gitlab.com/bsteers4/gb.mediaview.mpris

Re: MediaView with DBus mpris control

Posted: Friday 10th February 2023 10:25pm
by BruceSteers
ooh it's coming along now :)

Still pretty WIP but getting up to standard

I figured out how to send dbus property change signals.
now the player is pretty fully controllable by Cinnamon sound applet and it notices the players state changes

(This post has been deleted as is now irrelevant, see posts below)

(attachment of old version removed, see below for new version)

Re: MediaView with DBus mpris control

Posted: Friday 10th February 2023 10:37pm
by BruceSteers
Here's a clip of me using my own controller and the Cinnamon one to show the metadata info and control the MediaView player via DBus


Re: MediaView with DBus mpris control

Posted: Friday 24th February 2023 10:43pm
by BruceSteers
Big update.

Changes...

Introduced an MPRIS_Metadata.class to handle all the metadata fields

This is heading out of WIP now and heading to Beta.

the server class is fully functional and seems to work well.

now the test app has a "Remote control" button that opens up a window using the MPRIS_Interface.class to control other players.

Added a ton of stuff to the readme. and a bunch of comments in the source.
https://gitlab.com/bsteers4/gb.mediavie ... /README.md

Re: MediaView with DBus mpris control

Posted: Wednesday 10th January 2024 5:02pm
by BruceSteers
I have submitted a merge request...
https://gitlab.com/gambas/gambas/-/merge_requests/326

This would add gb.media.mpris2 as a component for gambas that includes the following...

* create gb.media.mpris2 component to support DBus MPRIS2 media control
* MPRIS_Interface, detect and control available interfaces.
* MPRIS_DBusObject, The DBus object specific routines.
* MPRIS_Server, create an interface and send/recieve MPRIS control data.
* MPRISView , a MediaView control clone that has it's own MPRIS_Server to be controlled by mpris controllers.
* MPRIS_Metadata.class, to handle metadata specific data.
* 2 Test/Example programs. MprisView (MediaView clone) and MprisReader controller.

I'm 100% sure it's not good enough for Benoit ;) lol
But he said he would take a look at it. Hopefully he's on board with the concept and he'll tell me what he does not like so i can make changes to suit.

then everyone could easily make mpris2 enabled players :)