mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
resource: add input_resource_ResetAout()
This commit is contained in:
parent
147ccd1bab
commit
b1ff0c7e29
@ -663,4 +663,9 @@ VLC_API audio_output_t *input_resource_GetAout( input_resource_t * );
|
||||
*/
|
||||
VLC_API void input_resource_PutAout( input_resource_t *, audio_output_t * );
|
||||
|
||||
/**
|
||||
* Prevents the existing audio output (if any) from being recycled.
|
||||
*/
|
||||
VLC_API void input_resource_ResetAout( input_resource_t * );
|
||||
|
||||
#endif
|
||||
|
@ -392,12 +392,14 @@ audio_output_t *input_resource_HoldAout( input_resource_t *p_resource )
|
||||
return p_aout;
|
||||
}
|
||||
|
||||
static void input_resource_TerminateAout( input_resource_t *p_resource )
|
||||
void input_resource_ResetAout( input_resource_t *p_resource )
|
||||
{
|
||||
audio_output_t *p_aout;
|
||||
audio_output_t *p_aout = NULL;
|
||||
|
||||
vlc_mutex_lock( &p_resource->lock_hold );
|
||||
p_aout = p_resource->p_aout;
|
||||
if( !p_resource->b_aout_busy )
|
||||
p_aout = p_resource->p_aout;
|
||||
|
||||
p_resource->p_aout = NULL;
|
||||
p_resource->b_aout_busy = false;
|
||||
vlc_mutex_unlock( &p_resource->lock_hold );
|
||||
@ -507,7 +509,7 @@ void input_resource_TerminateSout( input_resource_t *p_resource )
|
||||
void input_resource_Terminate( input_resource_t *p_resource )
|
||||
{
|
||||
input_resource_TerminateSout( p_resource );
|
||||
input_resource_TerminateAout( p_resource );
|
||||
input_resource_ResetAout( p_resource );
|
||||
input_resource_TerminateVout( p_resource );
|
||||
}
|
||||
|
||||
|
@ -220,6 +220,7 @@ input_resource_Terminate
|
||||
input_resource_GetAout
|
||||
input_resource_HoldAout
|
||||
input_resource_PutAout
|
||||
input_resource_ResetAout
|
||||
input_Start
|
||||
input_Stop
|
||||
input_vaControl
|
||||
|
Loading…
Reference in New Issue
Block a user