Changeset 59198c7ddb54e2193636425475ba46b09b135264
- Timestamp:
- 03/10/07 02:35:13
(1 year ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1191371713 +0000
- git-parent:
[2f9a9c57a553cad6a9cba042638044a32593aed3]
- git-author:
- Rafaël Carré <funman@videolan.org> 1191371713 +0000
- Message:
playlist: fix media library loading, fix #1320.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r5b093e3 |
r59198c7 |
|
| 23 | 23 | #include <vlc/vlc.h> |
|---|
| 24 | 24 | #include <vlc_playlist.h> |
|---|
| | 25 | #include <vlc_events.h> |
|---|
| 25 | 26 | #include "playlist_internal.h" |
|---|
| 26 | 27 | #include "modules/configuration.h" |
|---|
| … | … | |
| 88 | 89 | } |
|---|
| 89 | 90 | |
|---|
| | 91 | /***************************************************************************** |
|---|
| | 92 | * A subitem has been added to the Media Library (Event Callback) |
|---|
| | 93 | *****************************************************************************/ |
|---|
| | 94 | static void input_item_subitem_added( const vlc_event_t * p_event, |
|---|
| | 95 | void * user_data ) |
|---|
| | 96 | { |
|---|
| | 97 | playlist_t *p_playlist = user_data; |
|---|
| | 98 | input_item_t *p_item = p_event->u.input_item_subitem_added.p_new_child; |
|---|
| | 99 | playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END, |
|---|
| | 100 | VLC_FALSE, VLC_FALSE ); |
|---|
| | 101 | } |
|---|
| | 102 | |
|---|
| 90 | 103 | int playlist_MLLoad( playlist_t *p_playlist ) |
|---|
| 91 | 104 | { |
|---|
| … | … | |
| 128 | 141 | goto error; |
|---|
| 129 | 142 | |
|---|
| 130 | | /* FIXME [21574] pdherbemont do we need *install_input_item_observer ? */ |
|---|
| 131 | | playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, 0, VLC_FALSE, |
|---|
| 132 | | VLC_FALSE ); |
|---|
| | 143 | p_playlist->p_ml_onelevel->p_input = |
|---|
| | 144 | p_playlist->p_ml_category->p_input = p_input; |
|---|
| | 145 | |
|---|
| | 146 | vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded, |
|---|
| | 147 | input_item_subitem_added, p_playlist ); |
|---|
| 133 | 148 | |
|---|
| 134 | 149 | p_playlist->b_doing_ml = VLC_TRUE; |
|---|
| … | … | |
| 137 | 152 | stats_TimerStop( p_playlist,STATS_TIMER_ML_LOAD ); |
|---|
| 138 | 153 | p_playlist->b_doing_ml = VLC_FALSE; |
|---|
| | 154 | |
|---|
| | 155 | vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded, |
|---|
| | 156 | input_item_subitem_added, p_playlist ); |
|---|
| 139 | 157 | |
|---|
| 140 | 158 | free( psz_uri ); |
|---|