• zorglub's avatar
    Options as infos were bad in several ways: it broke PLAYLIST_GO, used · 499a3845
    zorglub authored
    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.
    499a3845
libvlc.c 51.4 KB