<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="https://git.reviewboard.kde.org/r/116940/">https://git.reviewboard.kde.org/r/116940/</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 8th, 2014, 9:45 p.m. UTC, <b>David Edmundson</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="https://git.reviewboard.kde.org/r/116940/diff/11/?file=271992#file271992line128" style="color: black; font-weight: bold; text-decoration: underline;">status-handler.cpp</a>
<span style="font-weight: normal;">
(Diff revision 11)
</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; ">void StatusHandler::onPluginActivated(bool active)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">128</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">// presence. This also helps with misbehaving plugins, in particular the mpris2 plugin ticks and outputs every second.</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">117</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">// presence. This also helps with misbehaving plugins, in particular the mpris2 plugin ticks and outputs every second.</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;">Martin, is this true?
This seems really bad</pre>
</blockquote>
<p>On May 9th, 2014, 9:32 a.m. UTC, <b>Martin Klapetek</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;">This was not added by me -->
commit fffcc2e011b6380a5478a9833d4dcd331b7906e6
Author: James Smith <smithjd15@gmail.com>
Date: Thu Feb 13 11:22:40 2014 +0100
Fix delayed status update for KTp
Fixes bug where state changes are slow to be returned to user-set values
after autoaway / screensaveraway interruption.
REVIEW: 114569
...however it was reviewed by me.
Patch: https://git.reviewboard.kde.org/r/114569/diff/</pre>
</blockquote>
<p>On May 9th, 2014, 11:45 p.m. UTC, <b>James Smith</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;">I don't know if this is necessarily bad, but a consequence of mpris2 polling. I think the mpris2 plugin needs to be re-worked to better take into account multiple players and then it might also be possible to filter the extra ticks in the plugin. It's not a bad addition here.</pre>
</blockquote>
<p>On May 9th, 2014, 11:58 p.m. UTC, <b>David Edmundson</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;">Seems you're right. Good spot.
Fixed properly hopefully.</pre>
</blockquote>
<p>On May 10th, 2014, 7:56 p.m. UTC, <b>Martin Klapetek</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;">What mpris polling are you talking about? It's fully signal based, there is no polling...</pre>
</blockquote>
<p>On May 11th, 2014, 6:10 a.m. UTC, <b>James Smith</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;">The Juk player combined with the VLC Phonon backend emits > 20 presence changes per track change. This is a fairly bad state of affairs. There should be a lower-level filter to prevent flooding MC account plugins with presence message updates.</pre>
</blockquote>
<p>On May 11th, 2014, 7:03 a.m. UTC, <b>Martin Klapetek</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;">Right; that's that player's bug and should be fixed there in the first place. Have you filed a bug? Does any other player have similar problems?</pre>
</blockquote>
<p>On May 12th, 2014, 6:10 p.m. UTC, <b>James Smith</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;">Most of the players I tested with GStreamer + Phonon emitted a track change between twice and six times. It varies between players with the general trend being no less than two emits per track change. Dragon, Juk, Clementine, Tomahawk all had this problem. Juk with VLC Phonon backend was the worst performer with ~26 track change emits, the VLC backend was often similarly performing with different players, emitting close to the same number of re-signals. The results were sometimes different between first play and later plays. Overall, I think wide variations in implementing the mpris2 specification cause this issue, and the best possible way to ignore it is by making sure that the presence change is only emitted once. A number of players even cause a presence change re-signal upon opening with no file playing. I don't know if it's worth going to the trouble of filing bugs, simply because of the massive number of players involved that implement mpris2 in any number of different languages to varying degrees of compliance.</pre>
</blockquote>
<p>On May 12th, 2014, 10:06 p.m. UTC, <b>Martin Klapetek</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;">I just tested it - you're right. Juk is broken (or some part underneath), it sends "PropertiesChanged" signal which change different properties, but metadata actually stay the same (and for some reason are part of the dbus message). Couldn't reproduce at all with Clementine.
Anyways, I've pushed a fix for this in both 0.8 branch and master, so should be fixed now.</pre>
</blockquote>
<p>On May 13th, 2014, 12:12 p.m. UTC, <b>James Smith</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;">Excessive PropertiesChanged signals might have been implicated in bug #334492.</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;">bug #334492 wasn't completely fixed by this commit, either. It looks like the kded module gets itself into a race condition with QtTelepathy where the boolean isn't properly set when used in onPresenceChanged to check for status message plugin enabled. Occasionally the isActiveStatusMessagePlugin() boolean returns inactive and the global presence is from a status message plugin. This is usually accompanied by unusually large numbers of status message changes from the now Playing plugin, but occurs much quicker with multiple players and large numbers of multiple mpris2 events where the kded module is processing a recent change of the global presence and the now Playing plugin has also recently setActive'd false. This allows the status-message-altered global presence to be saved to disk as user-set. Meanwhile the status message plugin could have yet another status change with an activate() in-progress to disable the now playing plugin or possibly a next track event involving a setActive to true with an activate(), both factors that could cause a global presence saturation and allow the isActiveStatusMessagePlugin() boolean to be out-of-sync with the global presence. With more than one player it must be easier to catch a false isActiveStatusMessagePlugin() with an active status-plugin-message-set status message part of the session's current global requested/current presence. This issue was also seen with the current code from master, not using boolean checks.</pre>
<br />
<p>- James</p>
<br />
<p>On May 14th, 2014, 11:56 p.m. UTC, James Smith wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Telepathy.</div>
<div>By James Smith.</div>
<p style="color: grey;"><i>Updated May 14, 2014, 11:56 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=332082">332082</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=334492">334492</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=334542">334542</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ktp-kded-module
</div>
<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;">This patch returns the ability to engage status message plug-ins from custom status messages. Also working is the disabling of non-visible status message plug-ins. State-affinity in the 95% of previously noted cases has been vastly improved also, the few remaining issues should be due to "lite" protocols that don't have a full complement of on-line presences.</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;">Disconnect / reconnect, autoconnect / no autoconnect, suspend / resume. Enable / disable via kcm module. Added a new custom presence and engaged the now playing plugin in the contact list from the new presence. Disabled the plugin by activating another presence.</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>status-handler.h <span style="color: grey">(06240ff)</span></li>
<li>status-handler.cpp <span style="color: grey">(4b9c25a)</span></li>
<li>telepathy-kded-module-plugin.h <span style="color: grey">(4c16169)</span></li>
<li>telepathy-kded-module-plugin.cpp <span style="color: grey">(daf73c6)</span></li>
<li>telepathy-mpris.cpp <span style="color: grey">(69e8562)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/116940/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>