[vlc-devel] Trying to fix wrong playback order after items are rearranged

David Fuhrmann david.fuhrmann at googlemail.com
Tue Jul 10 12:13:54 CEST 2012


Hello Remi,

I don't fully understand what you mean. The current item remains the same
with the patch, even if you sort the playlist. But playlist sorting isn't
the original problem here and should not be affected by the patch, as far
as I can see.

I think, the bigger problem is that this function is also called internally
at some points, therefore this would add redundant code in some code paths.

Best regards,
David

2012/7/10 Rémi Denis-Courmont <remi at remlab.net>

>    Hello,
>
> I don't think the playlist should change the current item when being
> sorted...
>
> On Monday 09 July 2012, David Fuhrmann wrote:
> > Hi Guys,
> >
> > Currently, I'm trying to fix #4397. The problem is that if you rearrange
> > playlist items in the osx gui while another item is playing, the new
> order
> > is not taken into account.
> >
> > Comparing the code from the mac osx and qt gui, I noticed that qt uses
> > playlist_TreeMoveMany for drag and drop handling, while the osx gui uses
> > playlist_NodeRemoveItem and playlist_NodeInsert.
> >
> > To fix the issue for the osx gui (and probably all other modules which
> will
> > use these functions), I came up with the below solution. But I don't know
> > the core good enough, therefore I want to ask for opinions from the core
> > experts here. Is this patch ok? Or should this problem be solved in
> > another way (using another function, e.g. TreeMoveMany as in the qt ui)?
> >
> > Now, here is the diff:
> >
> > --- a/src/playlist/tree.c
> > +++ b/src/playlist/tree.c
> > @@ -222,6 +222,9 @@ int playlist_NodeInsert( playlist_t *p_playlist,
> >                   i_position,
> >                   p_item );
> >      p_item->p_parent = p_parent;
> > +
> > +    pl_priv( p_playlist )->b_reset_currently_playing = true;
> > +    vlc_cond_signal( &pl_priv( p_playlist )->signal );
> >      return VLC_SUCCESS;
> >  }
> >
> >
> > Best regards,
> > David
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > http://mailman.videolan.org/listinfo/vlc-devel
> --
> Rémi Denis-Courmont
> http://www.remlab.info
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120710/52533909/attachment.html>


More information about the vlc-devel mailing list