Changeset c90b3db3af8af023ce9d76b989a3000a896c65df
- Timestamp:
- 03/23/08 01:16:36
(5 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1206231396 +0100
- git-parent:
[05dc64af7e19036bbf6fa538345b5a2278a1d91f]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1206231396 +0100
- Message:
input: Remove input_DestroyThread() as it is now handled via vlc_object_release().
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rbf4a300 |
rc90b3db |
|
| 645 | 645 | * Prototypes |
|---|
| 646 | 646 | *****************************************************************************/ |
|---|
| | 647 | |
|---|
| | 648 | /* input_CreateThread |
|---|
| | 649 | * Release the returned input_thread_t using vlc_object_release() */ |
|---|
| 647 | 650 | #define input_CreateThread(a,b) __input_CreateThread(VLC_OBJECT(a),b) |
|---|
| 648 | 651 | VLC_EXPORT( input_thread_t *, __input_CreateThread, ( vlc_object_t *, input_item_t * ) ); |
|---|
| | 652 | |
|---|
| 649 | 653 | #define input_Preparse(a,b) __input_Preparse(VLC_OBJECT(a),b) |
|---|
| 650 | 654 | VLC_EXPORT( int, __input_Preparse, ( vlc_object_t *, input_item_t * ) ); |
|---|
| … | … | |
| 653 | 657 | VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, vlc_bool_t ) ); |
|---|
| 654 | 658 | VLC_EXPORT( void, input_StopThread, ( input_thread_t * ) ); |
|---|
| 655 | | VLC_EXPORT( void, input_DestroyThread, ( input_thread_t * ) ); |
|---|
| 656 | 659 | |
|---|
| 657 | 660 | enum input_query_e |
|---|
| rac175b3 |
rc90b3db |
|
| 136 | 136 | { |
|---|
| 137 | 137 | input_StopThread( p_sd->p_sys->pp_input[i] ); |
|---|
| 138 | | input_DestroyThread( p_sd->p_sys->pp_input[i] ); |
|---|
| | 138 | vlc_object_release( p_sd->p_sys->pp_input[i] ); |
|---|
| 139 | 139 | p_sd->p_sys->pp_input[i] = NULL; |
|---|
| 140 | 140 | } |
|---|
| … | … | |
| 176 | 176 | { |
|---|
| 177 | 177 | input_StopThread( p_sd->p_sys->pp_input[i] ); |
|---|
| 178 | | input_DestroyThread( p_sd->p_sys->pp_input[i] ); |
|---|
| | 178 | vlc_object_release( p_sd->p_sys->pp_input[i] ); |
|---|
| 179 | 179 | p_sd->p_sys->pp_input[i] = NULL; |
|---|
| 180 | 180 | REMOVE_ELEM( p_sys->pp_input, p_sys->i_input, i ); |
|---|
| r37558f4 |
rc90b3db |
|
| 93 | 93 | /* We owned this one */ |
|---|
| 94 | 94 | input_StopThread( p_input_thread ); |
|---|
| 95 | | input_DestroyThread( p_input_thread ); |
|---|
| 96 | 95 | |
|---|
| 97 | 96 | var_Destroy( p_input_thread, "drawable" ); |
|---|
| 98 | 97 | } |
|---|
| 99 | | else |
|---|
| 100 | | vlc_object_release( p_input_thread ); |
|---|
| | 98 | |
|---|
| | 99 | vlc_object_release( p_input_thread ); |
|---|
| 101 | 100 | |
|---|
| 102 | 101 | p_mi->p_input_thread = NULL; |
|---|
| … | … | |
| 423 | 422 | vlc_mutex_destroy( &p_mi->object_lock ); |
|---|
| 424 | 423 | |
|---|
| 425 | | input_DestroyThread( p_input_thread ); |
|---|
| | 424 | vlc_object_release( p_input_thread ); |
|---|
| 426 | 425 | |
|---|
| 427 | 426 | libvlc_media_descriptor_release( p_mi->p_md ); |
|---|
| r33e3f3d |
rc90b3db |
|
| 479 | 479 | } |
|---|
| 480 | 480 | |
|---|
| 481 | | /** |
|---|
| 482 | | * Clean up a dead input thread |
|---|
| 483 | | * This function does not return until the thread is effectively cancelled. |
|---|
| 484 | | * |
|---|
| 485 | | * \param the input thread to kill |
|---|
| 486 | | */ |
|---|
| 487 | | void input_DestroyThread( input_thread_t *p_input ) |
|---|
| 488 | | { |
|---|
| 489 | | /* Join the thread */ |
|---|
| 490 | | vlc_thread_join( p_input ); |
|---|
| 491 | | |
|---|
| 492 | | /* */ |
|---|
| 493 | | vlc_object_detach( p_input ); |
|---|
| 494 | | vlc_object_release( p_input ); |
|---|
| 495 | | } |
|---|
| 496 | | |
|---|
| 497 | 481 | /***************************************************************************** |
|---|
| 498 | 482 | * Run: main thread loop |
|---|
| r540c761 |
rc90b3db |
|
| 2263 | 2263 | |
|---|
| 2264 | 2264 | input_StopThread( p_input ); |
|---|
| 2265 | | input_DestroyThread( p_input ); |
|---|
| | 2265 | vlc_object_release( p_input ); |
|---|
| 2266 | 2266 | } |
|---|
| 2267 | 2267 | free( psz_output ); |
|---|
| … | … | |
| 2500 | 2500 | input_StopThread( p_instance->p_input ); |
|---|
| 2501 | 2501 | p_instance->p_sout = input_DetachSout( p_instance->p_input ); |
|---|
| 2502 | | input_DestroyThread( p_instance->p_input ); |
|---|
| | 2502 | vlc_object_release( p_instance->p_input ); |
|---|
| 2503 | 2503 | } |
|---|
| 2504 | 2504 | if( p_instance->p_sout ) |
|---|
| … | … | |
| 2584 | 2584 | input_StopThread( p_instance->p_input ); |
|---|
| 2585 | 2585 | p_instance->p_sout = input_DetachSout( p_instance->p_input ); |
|---|
| 2586 | | input_DestroyThread( p_instance->p_input ); |
|---|
| | 2586 | vlc_object_release( p_instance->p_input ); |
|---|
| 2587 | 2587 | if( !p_instance->b_sout_keep && p_instance->p_sout ) |
|---|
| 2588 | 2588 | { |
|---|
| r30b0fc0 |
rc90b3db |
|
| 128 | 128 | input_DecoderDelete |
|---|
| 129 | 129 | input_DecoderNew |
|---|
| 130 | | input_DestroyThread |
|---|
| 131 | 130 | input_GetItem |
|---|
| 132 | 131 | input_ItemAddInfo |
|---|
| r55f3a9f |
rc90b3db |
|
| 274 | 274 | |
|---|
| 275 | 275 | /* Release the playlist lock, because we may get stuck |
|---|
| 276 | | * in input_DestroyThread() for some time. */ |
|---|
| | 276 | * in vlc_object_release() for some time. */ |
|---|
| 277 | 277 | PL_UNLOCK; |
|---|
| 278 | 278 | |
|---|
| 279 | 279 | /* Destroy input */ |
|---|
| 280 | | input_DestroyThread( p_input ); |
|---|
| | 280 | vlc_object_release( p_input ); |
|---|
| 281 | 281 | |
|---|
| 282 | 282 | PL_LOCK; |
|---|
| … | … | |
| 409 | 409 | |
|---|
| 410 | 410 | /* Destroy input */ |
|---|
| 411 | | input_DestroyThread( p_input ); |
|---|
| | 411 | vlc_object_release( p_input ); |
|---|
| 412 | 412 | continue; |
|---|
| 413 | 413 | } |
|---|