Changeset 5b093e36f6efdc9a834532bd962eecb62161a635

Show
Ignore:
Timestamp:
09/28/07 18:08:55 (1 year ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1190995735 +0000
git-parent:

[abc92903eac6c54689270e8fc7c04848586730bf]

git-author:
Rafaël Carré <funman@videolan.org> 1190995735 +0000
Message:

Adds an input option "meta-file" to be used by input that aren't real inputs (like playlists).
Re-enables media library.
Fixes #1047 (nth attempt).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_playlist.h

    ra73e410 r5b093e3  
    447447    input_item_t *p_input; 
    448448    snprintf( psz_uri, 256+9, "file/://%s", psz_file ); 
    449     p_input = input_ItemNewExt( p_playlist, psz_uri, psz_file, 0, NULL, -1 ); 
     449    const char *const psz_option = "meta-file"; 
     450    p_input = input_ItemNewExt( p_playlist, psz_uri, psz_file, 
     451                                1, &psz_option, -1 ); 
    450452    playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, PLAYLIST_END, 
    451453                       VLC_TRUE, VLC_FALSE ); 
  • src/input/input.c

    ref4a863 r5b093e3  
    762762    vlc_mutex_init( p_input, &p_input->p->counters.counters_lock ); 
    763763 
     764    for( i = 0; i < p_input->p->input.p_item->i_options; i++ ) 
     765    { 
     766        if( !strncmp( p_input->p->input.p_item->ppsz_options[i], "meta-file", 9 ) ) 
     767        { 
     768            msg_Dbg( p_input, "Input is a meta file: disabling unneeded options" ); 
     769            var_SetString( p_input, "sout", "" ); 
     770            var_SetBool( p_input, "sout-all", VLC_FALSE ); 
     771            var_SetString( p_input, "input-slave", "" ); 
     772            var_SetInteger( p_input, "input-repeat", 0 ); 
     773            var_SetString( p_input, "sub-file", "" ); 
     774            var_SetBool( p_input, "sub-autodetect-file", VLC_FALSE ); 
     775        } 
     776    } 
     777 
    764778    if( !p_input->b_preparsing ) 
    765779    { 
  • src/playlist/loadsave.c

    rbe1cc2c r5b093e3  
    9090int playlist_MLLoad( playlist_t *p_playlist ) 
    9191{ 
    92 #if 0 
    9392    const char *psz_datadir = p_playlist->p_libvlc->psz_datadir; 
    9493    char *psz_uri = NULL; 
     
    123122    } 
    124123 
     124    const char *const psz_option = "meta-file"; 
    125125    p_input = input_ItemNewExt( p_playlist, psz_uri, 
    126                                 _("Media Library"), 0, NULL, -1 ); 
     126                                _("Media Library"), 1, &psz_option, -1 ); 
    127127    if( p_input == NULL ) 
    128128        goto error; 
     
    143143error: 
    144144    free( psz_uri ); 
    145 #endif 
    146145    return VLC_ENOMEM; 
    147146}