[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: Review Request: Add support for mpris2 in nowlistening-plugin
From: "Lamarque Souza" <lamarque () kde ! org>
Date: 2012-05-31 17:07:16
Message-ID: 20120531170716.835.18267 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On May 31, 2012, 4:29 p.m., Lamarque Souza wrote:
> > /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningpreferences.cpp, \
> > line 27 <http://svn.reviewboard.kde.org/r/6960/diff/2/?file=48041#file48041line27>
> >
> > Send the change to klistwidget in a different review please. They will be applied \
> > in different commits so it will be easier if they were in different reviews.
>
> Cyberbeat wrote:
> If you don't mind, I would leave it here, but I would make the two different \
> commits to svn (for my luck the changesets are distinct). Is there a possibility to \
> track different changes in svn without having two different checkouts?
I do not think it is possible to do that with svn.
> On May 31, 2012, 4:29 p.m., Lamarque Souza wrote:
> > /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nlmpris2.cpp, line 94
> > <http://svn.reviewboard.kde.org/r/6960/diff/2/?file=48039#file48039line94>
> >
> > Hmmm we have a problem. The nowplaying plugin assume the ::update() method is \
> > synchronous, so we cannot use QDBusPendingReply here or it will cause undesired \
> > side effects. I think we will have to use the old version of this patch until \
> > someone fix that in the nowplaying plugin.
>
> Cyberbeat wrote:
> mhm, in this case it won't have bad side effects, because the track information is \
> stored in local variables, which are retrieved after calling update. Only thing \
> that happens is, that updates eventually reach the caller 5 seconds later.
and that is what can cause side effects. Look at the now playing plugin code, it \
calls player->update() and right after that it calls player->playing() or \
player->newTrack(). The value used by playing() and newTrack() can be outdated now \
since player->update() is asynchronous (the player->update() call will return before \
the player state is updated, which is not what player->playing() and \
player->newTrack() expect). One solution for that is making ::update() emit a signal \
indicating when the song info is really updated (when both QDBusWatchers in the \
player backend in this patch finish). But that requires updates in all player \
backends.
- Lamarque
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6960/#review10809
-----------------------------------------------------------
On May 31, 2012, 4:22 p.m., Cyberbeat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6960/
> -----------------------------------------------------------
>
> (Updated May 31, 2012, 4:22 p.m.)
>
>
> Review request for Kopete.
>
>
> Description
> -------
>
> Add support for mpris2 in nowlistening-plugin
>
>
> Diffs
> -----
>
> /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/CMakeLists.txt 1297322
> /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nlmpris2.h PRE-CREATION
> /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nlmpris2.cpp PRE-CREATION
> /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningplugin.cpp 1297322
> /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningpreferences.cpp \
> 1297322
> /trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningprefs.ui 1297322
>
> Diff: http://svn.reviewboard.kde.org/r/6960/diff/
>
>
> Testing
> -------
>
> works for me (banshee)
>
>
> Thanks,
>
> Cyberbeat
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/6960/">http://svn.reviewboard.kde.org/r/6960/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On May 31st, 2012, 4:29 p.m., <b>Lamarque \
Souza</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://svn.reviewboard.kde.org/r/6960/diff/2/?file=48039#file48039line94" \
style="color: black; font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nlmpris2.cpp</a> <span \
style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td> <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void NLmpris2::update()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">94</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="tb"> </span><span class="n">QDBusPendingCall</span> <span \
class="n">mprisStatus</span> <span class="o">=</span> <span \
class="n">m_client</span><span class="o">-></span><span \
class="n">asyncCall</span><span class="p">(</span> <span \
class="s">"Get"</span><span class="p">,</span> <span \
class="s">"org.mpris.MediaPlayer2.Player"</span><span class="p">,</span> \
<span class="s">"PlaybackStatus"</span> <span \
class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hmmm we have a problem. \
The nowplaying plugin assume the ::update() method is synchronous, so we cannot use \
QDBusPendingReply here or it will cause undesired side effects. I think we will have \
to use the old version of this patch until someone fix that in the nowplaying \
plugin.</pre> </blockquote>
<p>On May 31st, 2012, 4:39 p.m., <b>Cyberbeat</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">mhm, in this case it \
won't have bad side effects, because the track information is stored in local \
variables, which are retrieved after calling update. Only thing that happens is, that \
updates eventually reach the caller 5 seconds later.</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">and that is \
what can cause side effects. Look at the now playing plugin code, it calls \
player->update() and right after that it calls player->playing() or \
player->newTrack(). The value used by playing() and newTrack() can be outdated now \
since player->update() is asynchronous (the player->update() call will return \
before the player state is updated, which is not what player->playing() and \
player->newTrack() expect). One solution for that is making ::update() emit a \
signal indicating when the song info is really updated (when both QDBusWatchers in \
the player backend in this patch finish). But that requires updates in all player \
backends.</pre> <br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On May 31st, 2012, 4:29 p.m., <b>Lamarque \
Souza</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://svn.reviewboard.kde.org/r/6960/diff/2/?file=48041#file48041line27" \
style="color: black; font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningpreferences.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">27</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#include \
<k<span class="hl">3</span>list<span class="hl">box</span>.h></span></pre></td> \
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">27</font></th> <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cp">#include <klist<span class="hl">widget</span>.h></span></pre></td> \
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Send the change to \
klistwidget in a different review please. They will be applied in different commits \
so it will be easier if they were in different reviews.</pre> </blockquote>
<p>On May 31st, 2012, 4:39 p.m., <b>Cyberbeat</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If you don't mind, I \
would leave it here, but I would make the two different commits to svn (for my luck \
the changesets are distinct). Is there a possibility to track different changes in \
svn without having two different checkouts?</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I do not \
think it is possible to do that with svn.</pre> <br />
<p>- Lamarque</p>
<br />
<p>On May 31st, 2012, 4:22 p.m., Cyberbeat wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kopete.</div>
<div>By Cyberbeat.</div>
<p style="color: grey;"><i>Updated May 31, 2012, 4:22 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Add support for mpris2 in nowlistening-plugin</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">works for me (banshee)</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/CMakeLists.txt <span \
style="color: grey">(1297322)</span></li>
<li>/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nlmpris2.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nlmpris2.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningplugin.cpp <span \
style="color: grey">(1297322)</span></li>
<li>/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningpreferences.cpp \
<span style="color: grey">(1297322)</span></li>
<li>/trunk/KDE/kdenetwork/kopete/plugins/nowlistening/nowlisteningprefs.ui <span \
style="color: grey">(1297322)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6960/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic