Changeset ed2a403f13bf8265d16ec5a721f8b27e07945e79
- Timestamp:
- 04/06/08 18:51:09
(4 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1212598269 +0300
- git-parent:
[4d50cccae6bd757cfc3db77f515827a8c94dac21]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1212598220 +0300
- Message:
Remove redumdant b_play code
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r26c146e |
red2a403 |
|
| 55 | 55 | |
|---|
| 56 | 56 | /* Thread properties and locks */ |
|---|
| 57 | | bool b_play; |
|---|
| 58 | 57 | bool b_should_run_on_first_thread; |
|---|
| 59 | 58 | |
|---|
| r3527f69 |
red2a403 |
|
| 109 | 109 | p_intf->p_sys->o_sendport = [[NSPort port] retain]; |
|---|
| 110 | 110 | p_intf->p_sys->p_sub = msg_Subscribe( p_intf ); |
|---|
| 111 | | p_intf->b_play = true; |
|---|
| 112 | 111 | p_intf->pf_run = Run; |
|---|
| 113 | 112 | p_intf->b_should_run_on_first_thread = true; |
|---|
| … | … | |
| 561 | 560 | p_playlist = pl_Yield( p_intf ); |
|---|
| 562 | 561 | |
|---|
| 563 | | /* Check if we need to start playing */ |
|---|
| 564 | | if( p_intf->b_play ) |
|---|
| 565 | | { |
|---|
| 566 | | playlist_Control( p_playlist, PLAYLIST_PLAY, false ); |
|---|
| 567 | | } |
|---|
| 568 | 562 | var_Create( p_playlist, "fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT); |
|---|
| 569 | 563 | val.b_bool = false; |
|---|
| r5e15258 |
red2a403 |
|
| 236 | 236 | p_intf->p_sys->p_sub = msg_Subscribe( p_intf ); |
|---|
| 237 | 237 | |
|---|
| 238 | | /* We support play on start */ |
|---|
| 239 | | p_intf->b_play = true; |
|---|
| 240 | | |
|---|
| 241 | 238 | return VLC_SUCCESS; |
|---|
| 242 | 239 | } |
|---|
| … | … | |
| 354 | 351 | #endif //ENABLE_NLS |
|---|
| 355 | 352 | |
|---|
| 356 | | /* Start playing if needed */ |
|---|
| 357 | | if( !p_intf->pf_show_dialog && p_intf->b_play ) |
|---|
| 358 | | { |
|---|
| 359 | | playlist_Control( THEPL, PLAYLIST_PLAY, false ); |
|---|
| 360 | | } |
|---|
| 361 | | |
|---|
| 362 | 353 | /* Explain to the core how to show a dialog :D */ |
|---|
| 363 | 354 | p_intf->pf_show_dialog = ShowDialog; |
|---|
| r3561b9b |
red2a403 |
|
| 164 | 164 | ThemeRepository::instance( p_intf ); |
|---|
| 165 | 165 | |
|---|
| 166 | | // We support play on start |
|---|
| 167 | | p_intf->b_play = true; |
|---|
| 168 | | |
|---|
| 169 | 166 | return( VLC_SUCCESS ); |
|---|
| 170 | 167 | } |
|---|
| … | … | |
| 252 | 249 | // Get the instance of OSLoop |
|---|
| 253 | 250 | OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop(); |
|---|
| 254 | | |
|---|
| 255 | | // Check if we need to start playing |
|---|
| 256 | | if( p_intf->b_play ) |
|---|
| 257 | | { |
|---|
| 258 | | playlist_t *p_playlist = |
|---|
| 259 | | (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, |
|---|
| 260 | | FIND_ANYWHERE ); |
|---|
| 261 | | if( p_playlist ) |
|---|
| 262 | | { |
|---|
| 263 | | playlist_Control( p_playlist, PLAYLIST_PLAY, false ); |
|---|
| 264 | | vlc_object_release( p_playlist ); |
|---|
| 265 | | } |
|---|
| 266 | | } |
|---|
| 267 | 251 | |
|---|
| 268 | 252 | // Enter the main event loop |
|---|
| r3561b9b |
red2a403 |
|
| 254 | 254 | vlc_thread_ready( p_intf ); |
|---|
| 255 | 255 | |
|---|
| 256 | | /* Check if we need to start playing */ |
|---|
| 257 | | if( !p_intf->pf_show_dialog && p_intf->b_play ) |
|---|
| 258 | | { |
|---|
| 259 | | playlist_t *p_playlist = |
|---|
| 260 | | (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, |
|---|
| 261 | | FIND_ANYWHERE ); |
|---|
| 262 | | if( p_playlist ) |
|---|
| 263 | | { |
|---|
| 264 | | playlist_Play( p_playlist ); |
|---|
| 265 | | vlc_object_release( p_playlist ); |
|---|
| 266 | | } |
|---|
| 267 | | } |
|---|
| 268 | | |
|---|
| 269 | 256 | // Main message loop |
|---|
| 270 | 257 | while( GetMessage( &msg, NULL, 0, 0 ) > 0 ) |
|---|
| r3561b9b |
red2a403 |
|
| 209 | 209 | p_intf->pf_show_dialog = NULL; |
|---|
| 210 | 210 | |
|---|
| 211 | | /* We support play on start */ |
|---|
| 212 | | p_intf->b_play = true; |
|---|
| 213 | | |
|---|
| 214 | 211 | p_intf->p_sys->b_video_autosize = |
|---|
| 215 | 212 | config_GetInt( p_intf, "wx-autosize" ); |
|---|
| … | … | |
| 390 | 387 | /* OK, initialization is over */ |
|---|
| 391 | 388 | vlc_thread_ready( p_intf ); |
|---|
| 392 | | |
|---|
| 393 | | /* Check if we need to start playing */ |
|---|
| 394 | | if( !p_intf->pf_show_dialog && p_intf->b_play ) |
|---|
| 395 | | { |
|---|
| 396 | | playlist_t *p_playlist = |
|---|
| 397 | | (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, |
|---|
| 398 | | FIND_ANYWHERE ); |
|---|
| 399 | | if( p_playlist ) |
|---|
| 400 | | { |
|---|
| 401 | | playlist_Control( p_playlist, PLAYLIST_PLAY, false ); |
|---|
| 402 | | vlc_object_release( p_playlist ); |
|---|
| 403 | | } |
|---|
| 404 | | } |
|---|
| 405 | 389 | |
|---|
| 406 | 390 | /* Return TRUE to tell program to continue (FALSE would terminate) */ |
|---|
| r2e40b4c |
red2a403 |
|
| 100 | 100 | p_intf->pf_release_window = NULL; |
|---|
| 101 | 101 | p_intf->pf_control_window = NULL; |
|---|
| 102 | | p_intf->b_play = false; |
|---|
| 103 | 102 | p_intf->b_interaction = false; |
|---|
| 104 | 103 | p_intf->b_should_run_on_first_thread = false; |
|---|
| … | … | |
| 225 | 224 | } |
|---|
| 226 | 225 | |
|---|
| 227 | | /* Reset play on start status */ |
|---|
| 228 | | p_intf->b_play = false; |
|---|
| 229 | | |
|---|
| 230 | 226 | if( !p_intf->psz_switch_intf ) |
|---|
| 231 | 227 | { |
|---|
| ra62595b |
red2a403 |
|
| 1134 | 1134 | |
|---|
| 1135 | 1135 | /* Try to run the interface */ |
|---|
| 1136 | | p_intf->b_play = false; /* TODO: remove b_play completely */ |
|---|
| 1137 | 1136 | i_err = intf_RunThread( p_intf ); |
|---|
| 1138 | 1137 | if( i_err ) |
|---|