Changeset def34b917dc0694ae650f3962662e79e63f22924
- Timestamp:
- 06/14/08 15:11:41
(3 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1213449101 +0200
- git-parent:
[966feba166c6a6abe77fc2660da9da4549b4d104]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1213449101 +0200
- Message:
playlist: de-inline p_input setters.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r966feba |
rdef34b9 |
|
| 203 | 203 | vlc_mutex_unlock( &p_playlist->gc_lock ); |
|---|
| 204 | 204 | } |
|---|
| | 205 | |
|---|
| | 206 | /* Internals */ |
|---|
| | 207 | void playlist_release_current_input( playlist_t * p_playlist ) |
|---|
| | 208 | { |
|---|
| | 209 | vlc_assert_locked( &p_playlist->object_lock ); |
|---|
| | 210 | |
|---|
| | 211 | if( !p_playlist->p_input ) return; |
|---|
| | 212 | |
|---|
| | 213 | input_thread_t * p_input = p_playlist->p_input; |
|---|
| | 214 | p_playlist->p_input = NULL; |
|---|
| | 215 | |
|---|
| | 216 | /* Release the playlist lock, because we may get stuck |
|---|
| | 217 | * in vlc_object_release() for some time. */ |
|---|
| | 218 | PL_UNLOCK; |
|---|
| | 219 | vlc_object_release( p_input ); |
|---|
| | 220 | PL_LOCK; |
|---|
| | 221 | } |
|---|
| | 222 | |
|---|
| | 223 | void playlist_set_current_input( |
|---|
| | 224 | playlist_t * p_playlist, input_thread_t * p_input ) |
|---|
| | 225 | { |
|---|
| | 226 | vlc_assert_locked( &p_playlist->object_lock ); |
|---|
| | 227 | |
|---|
| | 228 | playlist_release_current_input( p_playlist ); |
|---|
| | 229 | |
|---|
| | 230 | if( p_input ) |
|---|
| | 231 | { |
|---|
| | 232 | vlc_object_yield( p_input ); |
|---|
| | 233 | p_playlist->p_input = p_input; |
|---|
| | 234 | } |
|---|
| | 235 | } |
|---|
| | 236 | |
|---|
| | 237 | /** |
|---|
| | 238 | * @} |
|---|
| | 239 | */ |
|---|
| 205 | 240 | |
|---|
| 206 | 241 | /** |
|---|
| r966feba |
rdef34b9 |
|
| 111 | 111 | int playlist_ItemDelete ( playlist_item_t * ); |
|---|
| 112 | 112 | |
|---|
| 113 | | static inline void playlist_release_current_input( playlist_t * p_playlist ) |
|---|
| 114 | | { |
|---|
| 115 | | vlc_assert_locked( &p_playlist->object_lock ); |
|---|
| 116 | | |
|---|
| 117 | | if( !p_playlist->p_input ) return; |
|---|
| 118 | | |
|---|
| 119 | | input_thread_t * p_input = p_playlist->p_input; |
|---|
| 120 | | p_playlist->p_input = NULL; |
|---|
| 121 | | |
|---|
| 122 | | /* Release the playlist lock, because we may get stuck |
|---|
| 123 | | * in vlc_object_release() for some time. */ |
|---|
| 124 | | PL_UNLOCK; |
|---|
| 125 | | vlc_object_release( p_input ); |
|---|
| 126 | | PL_LOCK; |
|---|
| 127 | | } |
|---|
| 128 | | |
|---|
| 129 | | static inline void playlist_set_current_input( |
|---|
| 130 | | playlist_t * p_playlist, input_thread_t * p_input ) |
|---|
| 131 | | { |
|---|
| 132 | | vlc_assert_locked( &p_playlist->object_lock ); |
|---|
| 133 | | |
|---|
| 134 | | playlist_release_current_input( p_playlist ); |
|---|
| 135 | | |
|---|
| 136 | | if( p_input ) |
|---|
| 137 | | { |
|---|
| 138 | | vlc_object_yield( p_input ); |
|---|
| 139 | | p_playlist->p_input = p_input; |
|---|
| 140 | | } |
|---|
| 141 | | } |
|---|
| 142 | | |
|---|
| | 113 | void playlist_release_current_input( playlist_t * p_playlist ); |
|---|
| | 114 | void playlist_set_current_input( |
|---|
| | 115 | playlist_t * p_playlist, input_thread_t * p_input ); |
|---|
| 143 | 116 | |
|---|
| 144 | 117 | /** |
|---|