about a patch

Matthias Kretz kretz at kde.org
Mon Nov 24 10:49:04 CET 2008


Hi Thierry,

I had to revert it because it broke behaviour compatibility, resulting in 
phonon-xine not emitting finished() anymore.

The reason that backend needs this call is that it works completely 
asynchronously, so when it emits aboutToFinish it needs to get some answer 
whether another MediaSource from the queue is to be used or not. With the 
setNextSource call removed, phonon-xine was waiting forever for an answer, not 
emitting finished as it didn't know whether something else was to be played.

I think I can change phonon-xine to also work right with the call removed, but 
then at least the revert in the branch has to stay (don't want to break 
behavior compat in the branch).

On Monday 24 November 2008 09:54:56 thierry.bastian at nokia.com wrote:
> Hi Matthias,
>
> I just saw that you reverted a patch we submitted last week, namely this:
>
> @@ -422,6 +422,7 @@ void MediaObjectPrivate::_k_aboutToFinish()
>      if (sourceQueue.isEmpty()) {
>          emit q->aboutToFinish();
>          if (sourceQueue.isEmpty()) {
> +            pINTERFACE_CALL(setNextSource(MediaSource()));
>              return;
>          }
>      }
>
> I was wondering why...
> The idea behind removing that is that one can call
> setMediaSource(MediaSource()) and it will unload the current source. To
> make it consistent with the way queuing works you could imagine enqueuing
> an invalid mediaSource to unload the last source when it is finished
> playing.

OK, I didn't know your motivation behind it. And as it broke some parts of KDE 
(when using the xine backend) quite badly I had to do a quick revert.

> On the backend side we then need to know if the user/programmer
> explicitly has queued an invalid media source. Applying this patch makes
> that this information is no more available. Plus I wonder why it should do
> that. Any specific reason for it? Our backends don't need that.
>
> Thanks for any insight.
>
> Regards,
> Thierry

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de



More information about the Phonon-backends mailing list