Comments (12)
Hi,
I can't reproduce with 2.0.1-0-gf432547
Don't know how it can happen. You may install d-feet and check that there is only one 'org.mpris.MediaPlayer2.vlc' bus name.
from gnome-shell-extensions-mediaplayer.
Thanks for looking into this.
I'm seeing two entries org.mpris.MediaPlayer2.vlc
and org.mpris.MediaPlayer2.vlc-14568
. It looks like 144568
is the PID of the process.
Not sure if this is helpful, but I've gone through VLC's advanced settings and tried toggling things that looked like it had to do with notifications or "D-Bus control interface". I've also tried running cvlc
from the command line. But I'm still seeing VLC listed twice.
from gnome-shell-extensions-mediaplayer.
Ah funny :)
Your vlc owns two bus for MPRIS and that is not normal, this why it is listed twice. Seems you've found a VLC bug ;)
from gnome-shell-extensions-mediaplayer.
It is actually part of the spec to claim multiple bus names, although VLC doesn't implement it correctly (despite the spec being written by VLC team...)
In the case where the media player allows multiple instances running simultaneously, each additional instance should request a unique bus name, adding a dot and a unique identifier to its usual bus name, such as one based on a UNIX process id. For example, this could be:
org.mpris.MediaPlayer2.vlc.instance7389
The extension could deal with this by comparing the owner PIDs, or if possible the "unique names" of the name owners. (There might be several processes queued up for the "main" ...MediaPlayer2.vlc
name, however; this may need to be handled by the NameOwnerChanged
signal.)
from gnome-shell-extensions-mediaplayer.
Yes but if I understand correctly Douglas is running only one instance of vlc so there should be only one bus name for the instance not two
from gnome-shell-extensions-mediaplayer.
No; a multi-instance program would claim both a "master" name (.vlc
) and an "instance" name (.vlc.instance7389
).
from gnome-shell-extensions-mediaplayer.
Hmm you're right
So I guess a bug must be open for VLC cause they should have .vlc and .vlc.instance14568 (not .vlc-14568)
And we should update the player detection code to handle multiple payer instances
from gnome-shell-extensions-mediaplayer.
Personally, I would go the simplest way – only show the "master" name, which usually corresponds to the first instance launched, and discard all "instance" names.
Proper multi-instance support could be implemented later, although I can't figure out a good way to detect duplicates... Either way, VLC needs to be fixed to use correct instance names.
from gnome-shell-extensions-mediaplayer.
Don't know in which order instances are discovered but if the master (vlc) is found first then the instance (vlc-14568) I would just try to see if any bus name already in the _players object matches the new instance. If yes, don't add the new instance
Could be done here in the addPlayer function https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer/blob/master/src/extension.js#L633 I guess
from gnome-shell-extensions-mediaplayer.
That is the largest problem – the player can register its names in any order it wants, and if the master name is registered first, then the extension cannot immediately know whether a player supports multiple instances or not.
However, every DBus client also has "unique name" in the form of :id
(e.g. :1.7
); these would be very reliable for duplicate checks. I tried playing around with this in grawity/gnome-shell-extensions-mediaplayer@37b5529 and grawity/gnome-shell-extensions-mediaplayer@3b636c7 in the grawity/multi-instance branch – although I hadn't had a chance to test it.
(The current code uses the term "owner" for the player's well-known name, but the term actually means the unique name in DBus itself. This is going to cause some confusion, since the multi-instance additions deal with both names at once.)
from gnome-shell-extensions-mediaplayer.
Tried VLC version 2.1.0-git Rincewind (1.3.0-git-2431-g7f9b3ef) today
Seems the instances names are now correct (I got something like org.mpris.MediaPlayer2.vlc.instance12961) but when starting VLC the org.mpris.MediaPlayer2.vlc.instance12961 busname is taken before org.mpris.MediaPlayer2.vlc so my patch doesn't work at all ;)
If vlc is already started and then the extension is enabled the busname org.mpris.MediaPlayer2.vlc is discovered first
from gnome-shell-extensions-mediaplayer.
@grawity your branch + 03974e02 work fine with multiple vlc instances
from gnome-shell-extensions-mediaplayer.
Related Issues (20)
- Integration Telegram Desktop HOT 2
- Make cover art in panel resizable. HOT 2
- failed to open file (schemas/gschemas.compiled not found) HOT 1
- Any way to reverse the scrolling behaviour? HOT 3
- Hide extension icon HOT 4
- Widgets misaligned in Gnome 3.28 HOT 34
- Add Logitech Media Server to the list of compatible players HOT 2
- Feature request
- [Feature request] Change gnome background to album cover HOT 2
- Add explicit support for gnome shell 3.28 HOT 6
- Name of song now showing up when playing in the top bar HOT 1
- no track duration for added tracks HOT 1
- Official extensions badge HOT 1
- Extra space appears after status text HOT 6
- No Animations in tray HOT 1
- Align the popup to the left HOT 1
- Doesn't work with gnome-shell 3.31.90 HOT 2
- Needs Update for GNOME 3.32 HOT 10
- This extension is set to be retired HOT 8
- Don't work on fedora 30 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnome-shell-extensions-mediaplayer.