Changeset 4b295c7cb26de39368086af8dc901df6bd29d135

Show
Ignore:
Timestamp:
23/12/07 23:23:25 (10 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1198448605 +0000
git-parent:

[0212c5155653272d0125e3b788a2ed4db09876de]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1198448605 +0000
Message:

Allow specifying options specific to each url in the shout service discovery.
Make it possible to inherit the m3u-extvlcopt option in the m3u parser.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/playlist/m3u.c

    rf3903fc r4b295c7  
    110110    int        i_options = 0; 
    111111    vlc_bool_t b_cleanup = VLC_FALSE; 
    112     vlc_bool_t b_enable_extvlcopt = config_GetInt( p_demux, "m3u-extvlcopt" ); 
     112    vlc_bool_t b_enable_extvlcopt = var_CreateGetInteger( p_demux, 
     113                                                          "m3u-extvlcopt" ); 
    113114    input_item_t *p_input; 
    114115 
     
    221222    } 
    222223    HANDLE_PLAY_AND_RELEASE; 
     224    var_Destroy( p_demux, "m3u-extvlcopt" ); 
    223225    return 0; /* Needed for correct operation of go back */ 
    224226} 
  • modules/services_discovery/shout.c

    r0212c51 r4b295c7  
    4444    const char *psz_url; 
    4545    const char *psz_name; 
     46    const char *ppsz_options[2]; 
    4647} p_items[] = { 
    4748    { "http/shout-winamp://www.shoutcast.com/sbin/newxml.phtml", 
    48       N_("Shoutcast Radio") }, 
     49      N_("Shoutcast Radio"), { NULL } }, 
    4950    { "http/shout-winamp://www.shoutcast.com/sbin/newtvlister.phtml?alltv=1", 
    50       N_("Shoutcast TV") }, 
     51      N_("Shoutcast TV"), { NULL } }, 
    5152    { "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u", 
    52       N_("Freebox TV") }, 
     53      N_("Freebox TV"), { "m3u-extvlcopt=1", NULL } }, 
    5354}; 
    5455 
     
    129130{ 
    130131    enum type_e i_type = (enum type_e)p_sd->p_sys; 
     132    int i; 
    131133    input_item_t *p_input = input_ItemNewExt( p_sd, 
    132134                        p_items[i_type].psz_url, _(p_items[i_type].psz_name), 
    133135                        0, NULL, -1 ); 
     136    for( i = 0; p_items[i_type].ppsz_options[i] != NULL; i++ ) 
     137        input_ItemAddOption( p_input, p_items[i_type].ppsz_options[i] ); 
    134138    input_ItemAddOption( p_input, "no-playlist-autostart" ); 
     139 
    135140 
    136141    vlc_gc_incref( p_input );