Commit c5746ee2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Spell resource the English way

parent 195597f3
...@@ -308,8 +308,8 @@ SOURCES_libvlc_common = \ ...@@ -308,8 +308,8 @@ SOURCES_libvlc_common = \
input/input_internal.h \ input/input_internal.h \
input/input_interface.h \ input/input_interface.h \
input/vlm_internal.h \ input/vlm_internal.h \
input/ressource.h \ input/resource.h \
input/ressource.c \ input/resource.c \
input/stream.c \ input/stream.c \
input/stream_demux.c \ input/stream_demux.c \
input/stream_filter.c \ input/stream_filter.c \
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "input_internal.h" #include "input_internal.h"
#include "event.h" #include "event.h"
#include "ressource.h" #include "resource.h"
static void UpdateBookmarksOption( input_thread_t * ); static void UpdateBookmarksOption( input_thread_t * );
...@@ -415,7 +415,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args ) ...@@ -415,7 +415,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
case INPUT_GET_AOUT: case INPUT_GET_AOUT:
{ {
aout_instance_t *p_aout = input_ressource_HoldAout( p_input->p->p_ressource ); aout_instance_t *p_aout = input_resource_HoldAout( p_input->p->p_resource );
if( !p_aout ) if( !p_aout )
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -429,7 +429,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args ) ...@@ -429,7 +429,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
vout_thread_t ***ppp_vout = (vout_thread_t***)va_arg( args, vout_thread_t*** ); vout_thread_t ***ppp_vout = (vout_thread_t***)va_arg( args, vout_thread_t*** );
int *pi_vout = (int*)va_arg( args, int* ); int *pi_vout = (int*)va_arg( args, int* );
input_ressource_HoldVouts( p_input->p->p_ressource, ppp_vout, pi_vout ); input_resource_HoldVouts( p_input->p->p_resource, ppp_vout, pi_vout );
if( *pi_vout <= 0 ) if( *pi_vout <= 0 )
return VLC_EGENERIC; return VLC_EGENERIC;
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "clock.h" #include "clock.h"
#include "decoder.h" #include "decoder.h"
#include "event.h" #include "event.h"
#include "ressource.h" #include "resource.h"
#include "../video_output/vout_control.h" #include "../video_output/vout_control.h"
...@@ -1887,7 +1887,7 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush ...@@ -1887,7 +1887,7 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush
stats_UpdateInteger( p_dec, p_input->p->counters.p_decoded_sub, 1, NULL ); stats_UpdateInteger( p_dec, p_input->p->counters.p_decoded_sub, 1, NULL );
vlc_mutex_unlock( &p_input->p->counters.counters_lock ); vlc_mutex_unlock( &p_input->p->counters.counters_lock );
p_vout = input_ressource_HoldVout( p_input->p->p_ressource ); p_vout = input_resource_HoldVout( p_input->p->p_resource );
if( p_vout && p_owner->p_spu_vout == p_vout ) if( p_vout && p_owner->p_spu_vout == p_vout )
{ {
/* Preroll does not work very well with subtitle */ /* Preroll does not work very well with subtitle */
...@@ -1912,7 +1912,7 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush ...@@ -1912,7 +1912,7 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush
if( b_flush && p_owner->p_spu_vout ) if( b_flush && p_owner->p_spu_vout )
{ {
p_vout = input_ressource_HoldVout( p_input->p->p_ressource ); p_vout = input_resource_HoldVout( p_input->p->p_resource );
if( p_vout && p_owner->p_spu_vout == p_vout ) if( p_vout && p_owner->p_spu_vout == p_vout )
spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR,
...@@ -2041,7 +2041,7 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -2041,7 +2041,7 @@ static void DeleteDecoder( decoder_t * p_dec )
aout_DecDelete( p_owner->p_aout, p_owner->p_aout_input ); aout_DecDelete( p_owner->p_aout, p_owner->p_aout_input );
if( p_owner->p_aout ) if( p_owner->p_aout )
{ {
input_ressource_RequestAout( p_owner->p_input->p->p_ressource, input_resource_RequestAout( p_owner->p_input->p->p_resource,
p_owner->p_aout ); p_owner->p_aout );
input_SendEventAout( p_owner->p_input ); input_SendEventAout( p_owner->p_input );
p_owner->p_aout = NULL; p_owner->p_aout = NULL;
...@@ -2055,7 +2055,7 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -2055,7 +2055,7 @@ static void DeleteDecoder( decoder_t * p_dec )
vout_ChangePause( p_owner->p_vout, false, mdate() ); vout_ChangePause( p_owner->p_vout, false, mdate() );
/* */ /* */
input_ressource_RequestVout( p_owner->p_input->p->p_ressource, p_owner->p_vout, NULL, true ); input_resource_RequestVout( p_owner->p_input->p->p_resource, p_owner->p_vout, NULL, true );
input_SendEventVout( p_owner->p_input ); input_SendEventVout( p_owner->p_input );
} }
...@@ -2071,7 +2071,7 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -2071,7 +2071,7 @@ static void DeleteDecoder( decoder_t * p_dec )
{ {
vout_thread_t *p_vout; vout_thread_t *p_vout;
p_vout = input_ressource_HoldVout( p_owner->p_input->p->p_ressource ); p_vout = input_resource_HoldVout( p_owner->p_input->p->p_resource );
if( p_vout ) if( p_vout )
{ {
if( p_owner->p_spu_vout == p_vout ) if( p_owner->p_spu_vout == p_vout )
...@@ -2135,7 +2135,7 @@ static vout_thread_t *aout_request_vout( void *p_private, ...@@ -2135,7 +2135,7 @@ static vout_thread_t *aout_request_vout( void *p_private,
decoder_t *p_dec = p_private; decoder_t *p_dec = p_private;
input_thread_t *p_input = p_dec->p_owner->p_input; input_thread_t *p_input = p_dec->p_owner->p_input;
p_vout = input_ressource_RequestVout( p_input->p->p_ressource, p_vout, p_fmt, b_recyle ); p_vout = input_resource_RequestVout( p_input->p->p_resource, p_vout, p_fmt, b_recyle );
input_SendEventVout( p_input ); input_SendEventVout( p_input );
return p_vout; return p_vout;
...@@ -2199,7 +2199,7 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples ) ...@@ -2199,7 +2199,7 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
p_aout = p_owner->p_aout; p_aout = p_owner->p_aout;
if( !p_aout ) if( !p_aout )
p_aout = input_ressource_RequestAout( p_owner->p_input->p->p_ressource, NULL ); p_aout = input_resource_RequestAout( p_owner->p_input->p->p_resource, NULL );
p_aout_input = aout_DecNew( p_dec, &p_aout, p_aout_input = aout_DecNew( p_dec, &p_aout,
&format, &p_dec->fmt_out.audio_replay_gain, &request_vout ); &format, &p_dec->fmt_out.audio_replay_gain, &request_vout );
...@@ -2313,7 +2313,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec ) ...@@ -2313,7 +2313,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
p_owner->p_vout = NULL; p_owner->p_vout = NULL;
vlc_mutex_unlock( &p_owner->lock ); vlc_mutex_unlock( &p_owner->lock );
p_vout = input_ressource_RequestVout( p_owner->p_input->p->p_ressource, p_vout = input_resource_RequestVout( p_owner->p_input->p->p_resource,
p_vout, &p_dec->fmt_out.video, true ); p_vout, &p_dec->fmt_out.video, true );
vlc_mutex_lock( &p_owner->lock ); vlc_mutex_lock( &p_owner->lock );
...@@ -2401,7 +2401,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec ) ...@@ -2401,7 +2401,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec )
if( p_dec->b_die || p_dec->b_error ) if( p_dec->b_die || p_dec->b_error )
break; break;
p_vout = input_ressource_HoldVout( p_owner->p_input->p->p_ressource ); p_vout = input_resource_HoldVout( p_owner->p_input->p->p_resource );
if( p_vout ) if( p_vout )
break; break;
...@@ -2446,7 +2446,7 @@ static void spu_del_buffer( decoder_t *p_dec, subpicture_t *p_subpic ) ...@@ -2446,7 +2446,7 @@ static void spu_del_buffer( decoder_t *p_dec, subpicture_t *p_subpic )
decoder_owner_sys_t *p_owner = p_dec->p_owner; decoder_owner_sys_t *p_owner = p_dec->p_owner;
vout_thread_t *p_vout = NULL; vout_thread_t *p_vout = NULL;
p_vout = input_ressource_HoldVout( p_owner->p_input->p->p_ressource ); p_vout = input_resource_HoldVout( p_owner->p_input->p->p_resource );
if( !p_vout || p_owner->p_spu_vout != p_vout ) if( !p_vout || p_owner->p_spu_vout != p_vout )
{ {
if( p_vout ) if( p_vout )
......
...@@ -670,7 +670,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced ) ...@@ -670,7 +670,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
(int)(mdate() - i_decoder_buffering_start)/1000 ); (int)(mdate() - i_decoder_buffering_start)/1000 );
/* Here is a good place to destroy unused vout with every demuxer */ /* Here is a good place to destroy unused vout with every demuxer */
input_ressource_TerminateVout( p_sys->p_input->p->p_ressource ); input_resource_TerminateVout( p_sys->p_input->p->p_resource );
/* */ /* */
const mtime_t i_wakeup_delay = 10*1000; /* FIXME CLEANUP thread wake up time*/ const mtime_t i_wakeup_delay = 10*1000; /* FIXME CLEANUP thread wake up time*/
...@@ -2040,7 +2040,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2040,7 +2040,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
break; break;
} }
if( i >= p_sys->i_es ) if( i >= p_sys->i_es )
input_ressource_TerminateVout( p_sys->p_input->p->p_ressource ); input_resource_TerminateVout( p_sys->p_input->p->p_resource );
} }
p_sys->b_active = b; p_sys->b_active = b;
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -2317,7 +2317,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2317,7 +2317,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
/* Clean up vout after user action (in active mode only). /* Clean up vout after user action (in active mode only).
* FIXME it does not work well with multiple video windows */ * FIXME it does not work well with multiple video windows */
if( p_sys->b_active ) if( p_sys->b_active )
input_ressource_TerminateVout( p_sys->p_input->p->p_ressource ); input_resource_TerminateVout( p_sys->p_input->p->p_resource );
return i_ret; return i_ret;
} }
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "demux.h" #include "demux.h"
#include "stream.h" #include "stream.h"
#include "item.h" #include "item.h"
#include "ressource.h" #include "resource.h"
#include <vlc_sout.h> #include <vlc_sout.h>
#include "../stream_output/stream_output.h" #include "../stream_output/stream_output.h"
...@@ -66,7 +66,7 @@ static void *Run ( vlc_object_t *p_this ); ...@@ -66,7 +66,7 @@ static void *Run ( vlc_object_t *p_this );
static void *RunAndDestroy ( vlc_object_t *p_this ); static void *RunAndDestroy ( vlc_object_t *p_this );
static input_thread_t * Create ( vlc_object_t *, input_item_t *, static input_thread_t * Create ( vlc_object_t *, input_item_t *,
const char *, bool, input_ressource_t * ); const char *, bool, input_resource_t * );
static int Init ( input_thread_t *p_input ); static int Init ( input_thread_t *p_input );
static void End ( input_thread_t *p_input ); static void End ( input_thread_t *p_input );
static void MainLoop( input_thread_t *p_input ); static void MainLoop( input_thread_t *p_input );
...@@ -117,7 +117,7 @@ static void input_ChangeState( input_thread_t *p_input, int i_state ); /* TODO f ...@@ -117,7 +117,7 @@ static void input_ChangeState( input_thread_t *p_input, int i_state ); /* TODO f
*****************************************************************************/ *****************************************************************************/
static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
const char *psz_header, bool b_quick, const char *psz_header, bool b_quick,
input_ressource_t *p_ressource ) input_resource_t *p_resource )
{ {
static const char input_name[] = "input"; static const char input_name[] = "input";
input_thread_t *p_input = NULL; /* thread descriptor */ input_thread_t *p_input = NULL; /* thread descriptor */
...@@ -200,11 +200,11 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -200,11 +200,11 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->slave = NULL; p_input->p->slave = NULL;
/* */ /* */
if( p_ressource ) if( p_resource )
p_input->p->p_ressource = p_ressource; p_input->p->p_resource = p_resource;
else else
p_input->p->p_ressource = input_ressource_New(); p_input->p->p_resource = input_resource_New();
input_ressource_SetInput( p_input->p->p_ressource, p_input ); input_resource_SetInput( p_input->p->p_resource, p_input );
/* Init control buffer */ /* Init control buffer */
vlc_mutex_init( &p_input->p->lock_control ); vlc_mutex_init( &p_input->p->lock_control );
...@@ -311,8 +311,8 @@ static void Destructor( input_thread_t * p_input ) ...@@ -311,8 +311,8 @@ static void Destructor( input_thread_t * p_input )
stats_TimerDump( p_input, STATS_TIMER_INPUT_LAUNCHING ); stats_TimerDump( p_input, STATS_TIMER_INPUT_LAUNCHING );
stats_TimerClean( p_input, STATS_TIMER_INPUT_LAUNCHING ); stats_TimerClean( p_input, STATS_TIMER_INPUT_LAUNCHING );
if( p_input->p->p_ressource ) if( p_input->p->p_resource )
input_ressource_Delete( p_input->p->p_ressource ); input_resource_Delete( p_input->p->p_resource );
vlc_gc_decref( p_input->p->p_item ); vlc_gc_decref( p_input->p->p_item );
...@@ -340,11 +340,11 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, ...@@ -340,11 +340,11 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
/* */ /* */
input_thread_t *__input_CreateThreadExtended( vlc_object_t *p_parent, input_thread_t *__input_CreateThreadExtended( vlc_object_t *p_parent,
input_item_t *p_item, input_item_t *p_item,
const char *psz_log, input_ressource_t *p_ressource ) const char *psz_log, input_resource_t *p_resource )
{ {
input_thread_t *p_input; input_thread_t *p_input;
p_input = Create( p_parent, p_item, psz_log, false, p_ressource ); p_input = Create( p_parent, p_item, psz_log, false, p_resource );
if( !p_input ) if( !p_input )
return NULL; return NULL;
...@@ -440,17 +440,17 @@ void input_StopThread( input_thread_t *p_input ) ...@@ -440,17 +440,17 @@ void input_StopThread( input_thread_t *p_input )
input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL ); input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL );
} }
input_ressource_t *input_DetachRessource( input_thread_t *p_input ) input_resource_t *input_DetachRessource( input_thread_t *p_input )
{ {
assert( p_input->b_dead ); assert( p_input->b_dead );
input_ressource_t *p_ressource = p_input->p->p_ressource; input_resource_t *p_resource = p_input->p->p_resource;
input_ressource_SetInput( p_ressource, NULL ); input_resource_SetInput( p_resource, NULL );
p_input->p->p_ressource = NULL; p_input->p->p_resource = NULL;
p_input->p->p_sout = NULL; p_input->p->p_sout = NULL;
return p_ressource; return p_resource;
} }
/** /**
...@@ -829,7 +829,7 @@ static int InitSout( input_thread_t * p_input ) ...@@ -829,7 +829,7 @@ static int InitSout( input_thread_t * p_input )
char *psz = var_GetNonEmptyString( p_input, "sout" ); char *psz = var_GetNonEmptyString( p_input, "sout" );
if( psz && strncasecmp( p_input->p->p_item->psz_uri, "vlc:", 4 ) ) if( psz && strncasecmp( p_input->p->p_item->psz_uri, "vlc:", 4 ) )
{ {
p_input->p->p_sout = input_ressource_RequestSout( p_input->p->p_ressource, NULL, psz ); p_input->p->p_sout = input_resource_RequestSout( p_input->p->p_resource, NULL, psz );
if( !p_input->p->p_sout ) if( !p_input->p->p_sout )
{ {
input_ChangeState( p_input, ERROR_S ); input_ChangeState( p_input, ERROR_S );
...@@ -850,7 +850,7 @@ static int InitSout( input_thread_t * p_input ) ...@@ -850,7 +850,7 @@ static int InitSout( input_thread_t * p_input )
} }
else else
{ {
input_ressource_RequestSout( p_input->p->p_ressource, NULL, NULL ); input_resource_RequestSout( p_input->p->p_resource, NULL, NULL );
} }
free( psz ); free( psz );
...@@ -1215,12 +1215,12 @@ error: ...@@ -1215,12 +1215,12 @@ error:
es_out_Delete( p_input->p->p_es_out ); es_out_Delete( p_input->p->p_es_out );
if( p_input->p->p_es_out_display ) if( p_input->p->p_es_out_display )
es_out_Delete( p_input->p->p_es_out_display ); es_out_Delete( p_input->p->p_es_out_display );
if( p_input->p->p_ressource ) if( p_input->p->p_resource )
{ {
if( p_input->p->p_sout ) if( p_input->p->p_sout )
input_ressource_RequestSout( p_input->p->p_ressource, input_resource_RequestSout( p_input->p->p_resource,
p_input->p->p_sout, NULL ); p_input->p->p_sout, NULL );
input_ressource_SetInput( p_input->p->p_ressource, NULL ); input_resource_SetInput( p_input->p->p_resource, NULL );
} }
#ifdef ENABLE_SOUT #ifdef ENABLE_SOUT
...@@ -1339,9 +1339,9 @@ static void End( input_thread_t * p_input ) ...@@ -1339,9 +1339,9 @@ static void End( input_thread_t * p_input )
} }
/* */ /* */
input_ressource_RequestSout( p_input->p->p_ressource, input_resource_RequestSout( p_input->p->p_resource,
p_input->p->p_sout, NULL ); p_input->p->p_sout, NULL );
input_ressource_SetInput( p_input->p->p_ressource, NULL ); input_resource_SetInput( p_input->p->p_resource, NULL );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -45,44 +45,44 @@ int input_Preparse( vlc_object_t *, input_item_t * ); ...@@ -45,44 +45,44 @@ int input_Preparse( vlc_object_t *, input_item_t * );
input_stats_t *stats_NewInputStats( input_thread_t *p_input ); input_stats_t *stats_NewInputStats( input_thread_t *p_input );
/** /**
* This defines an opaque input ressource handler. * This defines an opaque input resource handler.
*/ */
typedef struct input_ressource_t input_ressource_t; typedef struct input_resource_t input_resource_t;
/** /**
* This function releases an input_ressource_t and all associated ressources. * This function releases an input_resource_t and all associated resources.
*/ */
void input_ressource_Delete( input_ressource_t * ); void input_resource_Delete( input_resource_t * );
/** /**
* This function deletes the current sout in the ressources. * This function deletes the current sout in the resources.
*/ */
void input_ressource_TerminateSout( input_ressource_t *p_ressource ); void input_resource_TerminateSout( input_resource_t *p_resource );
/** /**
* This function deletes the current vout in the ressources. * This function deletes the current vout in the resources.
*/ */
void input_ressource_TerminateVout( input_ressource_t *p_ressource ); void input_resource_TerminateVout( input_resource_t *p_resource );
/** /**
* This function return true if there is at least one vout in the ressources. * This function return true if there is at least one vout in the resources.
* *
* It can only be called on detached ressources. * It can only be called on detached resources.
*/ */
bool input_ressource_HasVout( input_ressource_t *p_ressource ); bool input_resource_HasVout( input_resource_t *p_resource );
/* input.c */ /* input.c */
#define input_CreateThreadExtended(a,b,c,d) __input_CreateThreadExtended(VLC_OBJECT(a),b,c,d) #define input_CreateThreadExtended(a,b,c,d) __input_CreateThreadExtended(VLC_OBJECT(a),b,c,d)
input_thread_t *__input_CreateThreadExtended ( vlc_object_t *, input_item_t *, const char *, input_ressource_t * ); input_thread_t *__input_CreateThreadExtended ( vlc_object_t *, input_item_t *, const char *, input_resource_t * );
/** /**
* This function detaches ressources from a dead input. * This function detaches resources from a dead input.
* *
* It MUST be called on a dead input (p_input->b_dead true) otherwise * It MUST be called on a dead input (p_input->b_dead true) otherwise
* it will assert. * it will assert.
* It does not support concurrent calls. * It does not support concurrent calls.
*/ */
input_ressource_t *input_DetachRessource( input_thread_t * ); input_resource_t *input_DetachRessource( input_thread_t * );
/* */ /* */
typedef enum typedef enum
......
...@@ -130,7 +130,7 @@ struct input_thread_private_t ...@@ -130,7 +130,7 @@ struct input_thread_private_t
input_source_t **slave; input_source_t **slave;
/* Ressources */ /* Ressources */
input_ressource_t *p_ressource; input_resource_t *p_resource;
/* Stats counters */ /* Stats counters */
struct { struct {
......
/***************************************************************************** /*****************************************************************************
* ressource.c * resource.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2008 Laurent Aimar * Copyright (C) 2008 Laurent Aimar
* $Id$ * $Id$
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
#include "../audio_output/aout_internal.h" #include "../audio_output/aout_internal.h"
#include "../video_output/vout_control.h" #include "../video_output/vout_control.h"
#include "input_interface.h" #include "input_interface.h"
#include "ressource.h" #include "resource.h"
struct input_ressource_t struct input_resource_t
{ {
/* This lock is used to serialize request and protect /* This lock is used to serialize request and protect
* our variables */ * our variables */
...@@ -53,7 +53,7 @@ struct input_ressource_t ...@@ -53,7 +53,7 @@ struct input_ressource_t
vout_thread_t *p_vout_free; vout_thread_t *p_vout_free;
aout_instance_t *p_aout; aout_instance_t *p_aout;
/* This lock is used to protect vout ressources access (for hold) /* This lock is used to protect vout resources access (for hold)
* It is a special case because of embed video (possible deadlock * It is a special case because of embed video (possible deadlock
* between vout window request and vout holds in some(qt4) interface) */ * between vout window request and vout holds in some(qt4) interface) */
vlc_mutex_t lock_vout; vlc_mutex_t lock_vout;
...@@ -62,61 +62,61 @@ struct input_ressource_t ...@@ -62,61 +62,61 @@ struct input_ressource_t
}; };
/* */ /* */
static void DestroySout( input_ressource_t *p_ressource ) static void DestroySout( input_resource_t *p_resource )
{ {
#ifdef ENABLE_SOUT #ifdef ENABLE_SOUT
if( p_ressource->p_sout ) if( p_resource->p_sout )
sout_DeleteInstance( p_ressource->p_sout ); sout_DeleteInstance( p_resource->p_sout );
#endif #endif
p_ressource->p_sout = NULL; p_resource->p_sout = NULL;
} }
static sout_instance_t *RequestSout( input_ressource_t *p_ressource, static sout_instance_t *RequestSout( input_resource_t *p_resource,
sout_instance_t *p_sout, const char *psz_sout ) sout_instance_t *p_sout, const char *psz_sout )
{ {
#ifdef ENABLE_SOUT #ifdef ENABLE_SOUT
if( !p_sout && !psz_sout ) if( !p_sout && !psz_sout )
{ {
if( p_ressource->p_sout ) if( p_resource->p_sout )
msg_Dbg( p_ressource->p_sout, "destroying useless sout" ); msg_Dbg( p_resource->p_sout, "destroying useless sout" );
DestroySout( p_ressource ); DestroySout( p_resource );
return NULL; return NULL;
} }
assert( p_ressource->p_input ); assert( p_resource->p_input );
assert( !p_sout || ( !p_ressource->p_sout && !psz_sout ) ); assert( !p_sout || ( !p_resource->p_sout && !psz_sout ) );