[vlc-devel] [PATCH] - Added ability to move to previous item in Media List Player, also added playback modes to enable looping and repeating of playlist items.

Niles Bindel zaggal69 at gmail.com
Thu Aug 27 19:08:06 CEST 2009


> Have you considered adding some test code for the new functions? (So that
it doesn't regress one day) it's in vlc/test/libvlc/.

Yes, I had done my testing using a hacked up version of what was already in
there.  I've cleaned it up and added two new testing functions.

I've updated the patch to include this new testing functionality.  I also
resolved a race condition related to the pause function that was showing up
sporadically during the testing process and added the same protection to the
play function to ensure a similar issue did not happen when trying to use
that.

> Given the code duplication we do here, do you think there could be some
kind of factorization done?

I initially set out to create a unified function that would traverse
arbitrary distances in either direction.  However, after encountering some
difficulty trying to manage the media list paths.  I opted to just scale
back my scope and went for the simplified approach that I'm currently
submitting.  My comments about the media paths in the original post were
related to this difficulty and I feel that if someone is going to invest
time into traversing the media list further, it should probably be done in a
more thorough rewrite.  With that said, I think the overlap is actually
pretty minimal at this point and will probably be refactored away when a
better tree traversal mechanism is in place.

Niles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090827/8e2622be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-ability-to-move-to-previous-item-in-the-media-.patch
Type: application/octet-stream
Size: 25489 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090827/8e2622be/attachment.obj>


More information about the vlc-devel mailing list