Changeset 5b093e36f6efdc9a834532bd962eecb62161a635
- 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
| ra73e410 |
r5b093e3 |
|
| 447 | 447 | input_item_t *p_input; |
|---|
| 448 | 448 | 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 ); |
|---|
| 450 | 452 | playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, PLAYLIST_END, |
|---|
| 451 | 453 | VLC_TRUE, VLC_FALSE ); |
|---|
| ref4a863 |
r5b093e3 |
|
| 762 | 762 | vlc_mutex_init( p_input, &p_input->p->counters.counters_lock ); |
|---|
| 763 | 763 | |
|---|
| | 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 | |
|---|
| 764 | 778 | if( !p_input->b_preparsing ) |
|---|
| 765 | 779 | { |
|---|
| rbe1cc2c |
r5b093e3 |
|
| 90 | 90 | int playlist_MLLoad( playlist_t *p_playlist ) |
|---|
| 91 | 91 | { |
|---|
| 92 | | #if 0 |
|---|
| 93 | 92 | const char *psz_datadir = p_playlist->p_libvlc->psz_datadir; |
|---|
| 94 | 93 | char *psz_uri = NULL; |
|---|
| … | … | |
| 123 | 122 | } |
|---|
| 124 | 123 | |
|---|
| | 124 | const char *const psz_option = "meta-file"; |
|---|
| 125 | 125 | p_input = input_ItemNewExt( p_playlist, psz_uri, |
|---|
| 126 | | _("Media Library"), 0, NULL, -1 ); |
|---|
| | 126 | _("Media Library"), 1, &psz_option, -1 ); |
|---|
| 127 | 127 | if( p_input == NULL ) |
|---|
| 128 | 128 | goto error; |
|---|
| … | … | |
| 143 | 143 | error: |
|---|
| 144 | 144 | free( psz_uri ); |
|---|
| 145 | | #endif |
|---|
| 146 | 145 | return VLC_ENOMEM; |
|---|
| 147 | 146 | } |
|---|