<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hello,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>After discussing with Richard and Jens, we came to the conclusion
that the MediaObject::currentSourceChanged is not emitted at the right time.<o:p></o:p></p>
<p class=MsoNormal>What happens is that it is emitted in response to the
aboutToFinish signal emitted by the backend. The problem is that this is done
before the actual current source changes to leave some time to the backend to
load the source.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>So what could happen is that you’re playing source1
and enqueue source2. You want a gapless playback and the backend fire
aboutToFinish 2 senconds before the end of source 1.<o:p></o:p></p>
<p class=MsoNormal>The result of this is that Phonon::MediaObject calls
setNextSource on the backend, removes source2 from the queue and emits
currentSourceChanged. This will only be true in 2 seconds.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>The attached patch fixes this by introducing a new signal
currentSourceChanged from the backend because only the backend accurately knows
when it changed the current source.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>If anyone has a comment on the code, don’t hesitate.
It is binary compatible, so no need to ask for a BIC.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Regards,<o:p></o:p></p>
<p class=MsoNormal>Thierry<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>PS: I would also like to change the way prefinishmarkreached
is emitted because it is quite tricky from the backend side to know if the
current source is the final one. This logic belongs to the frontend. With the
attached change this will be very easy to achieve.<o:p></o:p></p>
</div>
</body>
</html>