Changeset 65892ac8249cd60f0f2ae25e138a76c76436e9e3
- Timestamp:
- 06/04/08 20:14:30
(3 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1212603270 +0300
- git-parent:
[bed1fe1b898a0721a58461fe7c97f0eb376ac1d2]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1212603227 +0300
- Message:
Handle sout-keep from the playlist engine
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rcc01f68 |
r65892ac |
|
| 238 | 238 | vlc_object_t *p_interaction; ///< interface interaction object |
|---|
| 239 | 239 | httpd_t *p_httpd; ///< HTTP daemon (src/network/httpd.c) |
|---|
| | 240 | |
|---|
| | 241 | /* Private playlist data (FIXME - playlist_t is too public...) */ |
|---|
| | 242 | sout_instance_t *p_sout; ///< kept sout instance (for playlist) |
|---|
| 240 | 243 | } libvlc_priv_t; |
|---|
| 241 | 244 | |
|---|
| rbed1fe1 |
r65892ac |
|
| 465 | 465 | { |
|---|
| 466 | 466 | input_item_t *p_input = p_item->p_input; |
|---|
| | 467 | sout_instance_t **pp_sout = &libvlc_priv(p_playlist->p_libvlc)->p_sout; |
|---|
| 467 | 468 | int i_activity = var_GetInteger( p_playlist, "activity" ) ; |
|---|
| 468 | 469 | |
|---|
| … | … | |
| 476 | 477 | var_SetInteger( p_playlist, "activity", i_activity + |
|---|
| 477 | 478 | DEFAULT_INPUT_ACTIVITY ); |
|---|
| 478 | | p_playlist->p_input = input_CreateThread( p_playlist, p_input ); |
|---|
| | 479 | p_playlist->p_input = |
|---|
| | 480 | input_CreateThreadExtended( p_playlist, p_input, NULL, *pp_sout ); |
|---|
| | 481 | *pp_sout = NULL; |
|---|
| 479 | 482 | |
|---|
| 480 | 483 | char *psz_uri = input_item_GetURI( p_item->p_input ); |
|---|
| r3527f69 |
r65892ac |
|
| 27 | 27 | #endif |
|---|
| 28 | 28 | |
|---|
| | 29 | #include <assert.h> |
|---|
| 29 | 30 | #include <vlc_common.h> |
|---|
| 30 | 31 | #include <vlc_vout.h> |
|---|
| … | … | |
| 264 | 265 | int i_activity; |
|---|
| 265 | 266 | input_thread_t *p_input; |
|---|
| | 267 | sout_instance_t **pp_sout = |
|---|
| | 268 | &libvlc_priv(p_playlist->p_libvlc)->p_sout; |
|---|
| | 269 | |
|---|
| 266 | 270 | PL_DEBUG( "dead input" ); |
|---|
| 267 | 271 | |
|---|
| 268 | 272 | p_input = p_playlist->p_input; |
|---|
| 269 | 273 | p_playlist->p_input = NULL; |
|---|
| | 274 | assert( *pp_sout == NULL ); |
|---|
| | 275 | if( var_CreateGetBool( p_input, "sout-keep" ) ) |
|---|
| | 276 | *pp_sout = input_DetachSout( p_input ); |
|---|
| 270 | 277 | |
|---|
| 271 | 278 | /* Release the playlist lock, because we may get stuck |
|---|
| … | … | |
| 405 | 412 | PL_UNLOCK; |
|---|
| 406 | 413 | |
|---|
| | 414 | /* sout-keep: no need to anything here. |
|---|
| | 415 | * The last input will destroy its sout, if any, by itself */ |
|---|
| | 416 | |
|---|
| 407 | 417 | /* Destroy input */ |
|---|
| 408 | 418 | vlc_object_release( p_input ); |
|---|
| … | … | |
| 430 | 440 | |
|---|
| 431 | 441 | #ifdef ENABLE_SOUT |
|---|
| 432 | | /* close all remaining sout */ |
|---|
| 433 | | while( ( p_obj = vlc_object_find( p_playlist, |
|---|
| 434 | | VLC_OBJECT_SOUT, FIND_CHILD ) ) ) |
|---|
| 435 | | { |
|---|
| 436 | | vlc_object_detach( p_obj ); |
|---|
| 437 | | vlc_object_release( p_obj ); |
|---|
| 438 | | sout_DeleteInstance( (sout_instance_t*)p_obj ); |
|---|
| 439 | | } |
|---|
| | 442 | /* close the remaining sout-keep (if there was no input atm) */ |
|---|
| | 443 | sout_instance_t *p_sout = libvlc_priv (p_playlist->p_libvlc)->p_sout; |
|---|
| | 444 | if (p_sout) |
|---|
| | 445 | sout_DeleteInstance( p_sout ); |
|---|
| 440 | 446 | #endif |
|---|
| 441 | 447 | |
|---|