[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
SMPlayer Support Forum • View topic - DBUS Support

This forum is deprecated. Please visit https://github.com/smplayer-dev/smplayer/discussions

DBUS Support

Forum to talk about the development of SMPlayer (code, patches...).

DBUS Support

Postby KevinA » Thu Sep 13, 2012 7:08 am

I'm writing MPRIS dbus support for SMPlayer. I've gotten two of the four interfaces up, and i have two questions, one simple, one not so much.

Simple Question:
Does it make sense to implement Tracklist?
I don't think it does, since smplayer doesn't really have a media library.

Other Question:
How are commands passed back and forth within the application?
IE: how do i from my quit, next, or pause methods, send a command to smplayer to quit, next, or pause?
I don't need a complete answer, maybe just a good place to start?

Thanks
Kevin
KevinA
 
Posts: 2
Joined: Thu Sep 13, 2012 6:57 am

Re: DBUS Support

Postby bigfoot71 » Mon Oct 22, 2012 5:14 am

I know this is late, but I too would support something like this. Not sure how far you may have gotten, but as far as somewhere to possibly start, there are command-line options that can be passed to SMplayer. For example "smplayer -send-action stop" will send stop. Not sure how MPRIS works, but maybe this would be somewhere to start?
bigfoot71
 
Posts: 3
Joined: Mon Oct 22, 2012 5:11 am

Re: DBUS Support

Postby KevinA » Mon Oct 22, 2012 7:12 pm

I have the two mandotory interfaces written, except 'the QUIT'' method. I am going to implement playlist, i am not going to implement tracklist( no videoplayer i looked at implemented it). But im knee deep in my final semestar, and i dont have the free time at the momment.

Also Im not sure where to submit the patch.
KevinA
 
Posts: 2
Joined: Thu Sep 13, 2012 6:57 am

Re: DBUS Support

Postby rvm » Mon Oct 22, 2012 9:09 pm

I already got the patch you send me by email, but I still didn't have time to review it. Sorry.
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: DBUS Support

Postby sl1pkn07 » Thu Apr 11, 2013 8:55 pm

alguna noticia sobre esto?

en el smplayer2 está implementado desde hace un año

https://github.com/lachs0r/SMPlayer2/co ... df78.patch
https://github.com/lachs0r/SMPlayer2/co ... 19fb.patch
no he encontrado más referencias en el repositorio, me supongo que solo es eso

aplicandolos tal cual no va, así que he hecho unas correcciones y he intentado adaptarlo smplayer SVN

(smplayer2 usa cmake en vez de qmake/make)

el parche es este:

http://sl1pkn07.no-ip.com/paste/view/eab7c4d5

compila sin problemas tampoco errores relacionados con la parte mpirs2) en la revision 5306 del SVN de assembla

pero a la hora de ejecutar el smplayer no lo hace funcionar, no da ningun error al ver videos ni nada por el estilo, simplemente no muestra ninguna información, como si no existiera

qdbusviewer tampoco salen referencias de mpris2 ni de smplayer

saludos y perdonad el español, pero como el devel principal es de españa (como yo) es más facil de entendernos

he de decir que no soy programador, ni amateur ni profesional, solo me he fijado en como está contruido el .pro para añadir las sources y aplicar los parches. cual quier cosa relaccionada con codigo no se responder
sl1pkn07
 
Posts: 2
Joined: Thu Apr 11, 2013 8:35 pm
Location: Spanishtán

Re: DBUS Support

Postby bigfoot71 » Sat Jul 20, 2013 9:09 pm

Has their been any update on MPRIS support? I tried adapting the smplayer2 patch with smplayer a while back, but it looks like they're doing something slightly different (one the files it's trying to patch doesn't exist)

Just curious.
bigfoot71
 
Posts: 3
Joined: Mon Oct 22, 2012 5:11 am

Re: DBUS Support

Postby rvm » Sat Jul 20, 2013 10:35 pm

No.
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: DBUS Support

Postby WiseLord » Fri Mar 14, 2014 12:38 pm

Attachments
smplayer-mpris2-support.patch.zip
(3.84 KiB) Downloaded 693 times
Last edited by WiseLord on Sat Mar 15, 2014 4:40 pm, edited 1 time in total.
Russian translator
WiseLord
 
Posts: 25
Joined: Sat Jan 16, 2010 8:46 am

Re: DBUS Support

Postby rvm » Sat Mar 15, 2014 5:02 am

I'll try to add your patch in the future.

Unfortunately there's no kdeconnect in ubuntu precise, that's a problem for me.
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: DBUS Support

Postby VlaoMao » Fri Mar 06, 2015 7:54 pm

When the patch is accepted? 2015 already, all self-respecting player has got support MPRIS2

//Forget to add:

patch need some patching, first look:

diff -u a/smplayer-mpris2-support.patch b/smplayer-mpris2-support.patch
--- a/smplayer-mpris2-support.patch 2014-03-14 14:43:12.000000000 +0400
+++ b/smplayer-mpris2-support.patch 2015-03-07 09:09:50.936709609 +0300
@@ -248,7 +248,7 @@
+ return metaData;
+
+ metaData["mpris:trackid"] = QVariant::fromValue<QDBusObjectPath>(QDBusObjectPath(makeTrackId(m_core->mdat.filename).constData()));
-+ metaData["mpris:length"] = m_core->mdat.duration;
++ metaData["mpris:length"] = m_core->mdat.duration * 1000000;
+
+ if (m_core->mdat.type == TYPE_STREAM)
+ metaData["xesam:url"] = m_core->mdat.stream_url;
@@ -283,7 +283,7 @@
+
+qlonglong MediaPlayer2Player::Position() const
+{
-+ return static_cast<qlonglong>(m_core->mset.current_sec);
++ return static_cast<qlonglong>(m_core->mset.current_sec * 1000000);
+}
+
+double MediaPlayer2Player::MinimumRate() const
VlaoMao
 
Posts: 1
Joined: Fri Mar 06, 2015 7:52 pm

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 16 guests