]> git.sesse.net Git - vlc/commit
Options as infos were bad in several ways: it broke PLAYLIST_GO, used
authorClément Stenac <zorglub@videolan.org>
Thu, 29 Jan 2004 17:51:08 +0000 (17:51 +0000)
committerClément Stenac <zorglub@videolan.org>
Thu, 29 Jan 2004 17:51:08 +0000 (17:51 +0000)
commit499a384591d4238957f08348471fab5f36747fe7
treeb0814c726a97b9c5f42c10c327b61094c2a5d4c6
parent6dc60921e4ccc73903b9b2d07dab30b546c6366f
Options as infos were bad in several ways: it broke PLAYLIST_GO, used
much memory, and was inconsistent, especially with input_CreateThread
taking an array of options

* Revert to using array of options

* To add an item with options:
    - either use playlist_ItemNew, ItemAddOption, and then AddItem
      (useful if you don't have all your options in an array)
    - either use playlist_AddExt (use this if all your options are
      already in an array)

* To add an item without options: use playlist_Add

You can still add options after an item has been added by using either
playlist_AddOption or playlist_ItemAddOption

* Attempt to improve API and solve thread safety issues.
  - playlist_Item* functions allow to touch items only.
    p_item->lock must be used when needed
    (playlist_ItemNew, playlist_ItemDelete, playlist_Item*Info,
     playlist_ItemSet* )

  - playlist_ItemGetById and ItemGetByPos give you playlist_items
    for GetByPos, you should have the playlist lock

At the moment, the playlist_Set* and playlist_*Info functions are kept (they work with position) but should be avoided.
22 files changed:
include/vlc_playlist.h
modules/access/cdda/access.c
modules/access/vcdx/access.c
modules/codec/speex.c
modules/codec/theora.c
modules/codec/vorbis.c
modules/control/http.c
modules/demux/util/id3tag.c
modules/gui/pda/pda_callbacks.c
modules/gui/wxwindows/iteminfo.cpp
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/streamwizard.cpp
modules/misc/sap.c
src/input/input.c
src/libvlc.c
src/misc/win32_specific.c
src/playlist/info.c
src/playlist/item-ext.c
src/playlist/item.c
src/playlist/loadsave.c
src/playlist/playlist.c