[vlc-devel] [PATCH 4/4] decoder: rename input_Decoder*() to vlc_input_decoder_()
Thomas Guillem
thomas at gllm.fr
Wed Mar 18 15:10:19 CET 2020
In order to match with vlc_input_decoder_t.
---
include/vlc_decoder.h | 12 ++--
modules/stream_out/display.c | 9 +--
src/input/decoder.c | 107 ++++++++++++++++--------------
src/input/decoder.h | 48 +++++++-------
src/input/es_out.c | 125 ++++++++++++++++++-----------------
src/libvlccore.sym | 12 ++--
6 files changed, 160 insertions(+), 153 deletions(-)
diff --git a/include/vlc_decoder.h b/include/vlc_decoder.h
index 4652fbb479..94cceda61a 100644
--- a/include/vlc_decoder.h
+++ b/include/vlc_decoder.h
@@ -40,12 +40,12 @@ typedef struct input_resource_t input_resource_t;
/* */
VLC_API vlc_input_decoder_t *
-input_DecoderCreate( vlc_object_t *, const es_format_t *, input_resource_t * ) VLC_USED;
-VLC_API void input_DecoderDelete( vlc_input_decoder_t * );
-VLC_API void input_DecoderDecode( vlc_input_decoder_t *, block_t *, bool b_do_pace );
-VLC_API void input_DecoderDrain( vlc_input_decoder_t * );
-VLC_API void input_DecoderFlush( vlc_input_decoder_t * );
-VLC_API int input_DecoderSetSpuHighlight( vlc_input_decoder_t *, const vlc_spu_highlight_t * );
+vlc_input_decoder_Create( vlc_object_t *, const es_format_t *, input_resource_t * ) VLC_USED;
+VLC_API void vlc_input_decoder_Delete( vlc_input_decoder_t * );
+VLC_API void vlc_input_decoder_Decode( vlc_input_decoder_t *, block_t *, bool b_do_pace );
+VLC_API void vlc_input_decoder_Drain( vlc_input_decoder_t * );
+VLC_API void vlc_input_decoder_Flush( vlc_input_decoder_t * );
+VLC_API int vlc_input_decoder_SetSpuHighlight( vlc_input_decoder_t *, const vlc_spu_highlight_t * );
/**
* It creates an empty input resource handler.
diff --git a/modules/stream_out/display.c b/modules/stream_out/display.c
index de78a2f34d..4f9abe980c 100644
--- a/modules/stream_out/display.c
+++ b/modules/stream_out/display.c
@@ -147,7 +147,8 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
}
vlc_input_decoder_t *p_dec =
- input_DecoderCreate( VLC_OBJECT(p_stream), p_fmt, p_sys->p_resource );
+ vlc_input_decoder_Create( VLC_OBJECT(p_stream), p_fmt,
+ p_sys->p_resource );
if( p_dec == NULL )
{
msg_Err( p_stream, "cannot create decoder for fcc=`%4.4s'",
@@ -160,7 +161,7 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
static void Del( sout_stream_t *p_stream, void *id )
{
(void) p_stream;
- input_DecoderDelete( id );
+ vlc_input_decoder_Delete( id );
}
static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
@@ -185,7 +186,7 @@ static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
else
p_buffer->i_pts += p_sys->i_delay;
- input_DecoderDecode( id, p_buffer, false );
+ vlc_input_decoder_Decode( id, p_buffer, false );
}
p_buffer = p_next;
@@ -200,7 +201,7 @@ static int Control( sout_stream_t *p_stream, int i_query, va_list args )
{
vlc_input_decoder_t *p_dec = va_arg(args, void *);
void *spu_hl = va_arg(args, void *);
- return input_DecoderSetSpuHighlight( p_dec, spu_hl );
+ return vlc_input_decoder_SetSpuHighlight( p_dec, spu_hl );
}
(void) p_stream;
return VLC_EGENERIC;
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 39546b93f8..0c216bfca4 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -68,7 +68,7 @@ struct vlc_input_decoder_t
input_resource_t*p_resource;
vlc_clock_t *p_clock;
- const struct input_decoder_callbacks *cbs;
+ const struct vlc_input_decoder_callbacks *cbs;
void *cbs_userdata;
ssize_t i_spu_channel;
@@ -1648,7 +1648,7 @@ static void *DecoderThread( void *p_data )
vlc_fifo_Lock( p_owner->p_fifo );
- /* Reset flushing after DecoderThread_ProcessInput in case input_DecoderFlush
+ /* Reset flushing after DecoderThread_ProcessInput in case vlc_input_decoder_Flush
* is called again. This will avoid a second useless flush (but
* harmless). */
p_owner->flushing = false;
@@ -1803,12 +1803,12 @@ static const struct decoder_owner_callbacks dec_spu_cbs =
* \param b_packetizer instead of a decoder
* \return the decoder object
*/
-static vlc_input_decoder_t * CreateDecoder( vlc_object_t *p_parent,
- const es_format_t *fmt, vlc_clock_t *p_clock,
- input_resource_t *p_resource,
- sout_instance_t *p_sout, bool b_thumbnailing,
- const struct input_decoder_callbacks *cbs,
- void *cbs_userdata )
+static vlc_input_decoder_t *
+CreateDecoder( vlc_object_t *p_parent,
+ const es_format_t *fmt, vlc_clock_t *p_clock,
+ input_resource_t *p_resource, sout_instance_t *p_sout,
+ bool b_thumbnailing, const struct vlc_input_decoder_callbacks *cbs,
+ void *cbs_userdata )
{
decoder_t *p_dec;
vlc_input_decoder_t *p_owner;
@@ -2065,7 +2065,7 @@ static vlc_input_decoder_t *
decoder_New( vlc_object_t *p_parent, const es_format_t *fmt,
vlc_clock_t *p_clock, input_resource_t *p_resource,
sout_instance_t *p_sout, bool thumbnailing,
- const struct input_decoder_callbacks *cbs, void *userdata)
+ const struct vlc_input_decoder_callbacks *cbs, void *userdata)
{
const char *psz_type = p_sout ? N_("packetizer") : N_("decoder");
int i_priority;
@@ -2133,10 +2133,10 @@ decoder_New( vlc_object_t *p_parent, const es_format_t *fmt,
* \return the spawned decoder object
*/
vlc_input_decoder_t *
-input_DecoderNew( vlc_object_t *parent, es_format_t *fmt,
+vlc_input_decoder_New( vlc_object_t *parent, es_format_t *fmt,
vlc_clock_t *p_clock, input_resource_t *resource,
sout_instance_t *p_sout, bool thumbnailing,
- const struct input_decoder_callbacks *cbs,
+ const struct vlc_input_decoder_callbacks *cbs,
void *cbs_userdata)
{
return decoder_New( parent, fmt, p_clock, resource, p_sout, thumbnailing,
@@ -2147,7 +2147,7 @@ input_DecoderNew( vlc_object_t *parent, es_format_t *fmt,
* Spawn a decoder thread outside of the input thread.
*/
vlc_input_decoder_t *
-input_DecoderCreate( vlc_object_t *p_parent, const es_format_t *fmt,
+vlc_input_decoder_Create( vlc_object_t *p_parent, const es_format_t *fmt,
input_resource_t *p_resource )
{
return decoder_New( p_parent, fmt, NULL, p_resource, NULL, false, NULL,
@@ -2162,7 +2162,7 @@ input_DecoderCreate( vlc_object_t *p_parent, const es_format_t *fmt,
* \param p_es the es descriptor
* \return nothing
*/
-void input_DecoderDelete( vlc_input_decoder_t *p_owner )
+void vlc_input_decoder_Delete( vlc_input_decoder_t *p_owner )
{
decoder_t *p_dec = &p_owner->dec;
@@ -2197,7 +2197,7 @@ void input_DecoderDelete( vlc_input_decoder_t *p_owner )
if( p_owner->cc.b_supported )
{
for( int i = 0; i < MAX_CC_DECODERS; i++ )
- input_DecoderSetCcState( p_owner, VLC_CODEC_CEA608, i, false );
+ vlc_input_decoder_SetCcState( p_owner, VLC_CODEC_CEA608, i, false );
}
/* Delete decoder */
@@ -2211,7 +2211,8 @@ void input_DecoderDelete( vlc_input_decoder_t *p_owner )
* \param p_dec the decoder object
* \param p_block the data block
*/
-void input_DecoderDecode( vlc_input_decoder_t *p_owner, block_t *p_block, bool b_do_pace )
+void vlc_input_decoder_Decode( vlc_input_decoder_t *p_owner, block_t *p_block,
+ bool b_do_pace )
{
vlc_fifo_Lock( p_owner->p_fifo );
if( !b_do_pace )
@@ -2240,7 +2241,7 @@ void input_DecoderDecode( vlc_input_decoder_t *p_owner, block_t *p_block, bool b
vlc_fifo_Unlock( p_owner->p_fifo );
}
-bool input_DecoderIsEmpty( vlc_input_decoder_t * p_owner )
+bool vlc_input_decoder_IsEmpty( vlc_input_decoder_t * p_owner )
{
assert( !p_owner->b_waiting );
@@ -2279,7 +2280,7 @@ bool input_DecoderIsEmpty( vlc_input_decoder_t * p_owner )
* @note The function does not actually wait for draining. It just signals that
* draining should be performed once the decoder has emptied FIFO.
*/
-void input_DecoderDrain( vlc_input_decoder_t *p_owner )
+void vlc_input_decoder_Drain( vlc_input_decoder_t *p_owner )
{
vlc_fifo_Lock( p_owner->p_fifo );
p_owner->b_draining = true;
@@ -2291,7 +2292,7 @@ void input_DecoderDrain( vlc_input_decoder_t *p_owner )
* Requests that the decoder immediately discard all pending buffers.
* This is useful when seeking or when deselecting a stream.
*/
-void input_DecoderFlush( vlc_input_decoder_t *p_owner )
+void vlc_input_decoder_Flush( vlc_input_decoder_t *p_owner )
{
vlc_fifo_Lock( p_owner->p_fifo );
@@ -2336,15 +2337,16 @@ void input_DecoderFlush( vlc_input_decoder_t *p_owner )
}
}
-void input_DecoderGetCcDesc( vlc_input_decoder_t *p_owner, decoder_cc_desc_t *p_desc )
+void vlc_input_decoder_GetCcDesc( vlc_input_decoder_t *p_owner,
+ decoder_cc_desc_t *p_desc )
{
vlc_mutex_lock( &p_owner->lock );
*p_desc = p_owner->cc.desc;
vlc_mutex_unlock( &p_owner->lock );
}
-static bool input_DecoderHasCCChanFlag( vlc_input_decoder_t *p_owner,
- vlc_fourcc_t codec, int i_channel )
+static bool vlc_input_decoder_HasCCChanFlag( vlc_input_decoder_t *p_owner,
+ vlc_fourcc_t codec, int i_channel )
{
int i_max_channels;
uint64_t i_bitmap;
@@ -2364,13 +2366,13 @@ static bool input_DecoderHasCCChanFlag( vlc_input_decoder_t *p_owner,
( i_bitmap & ((uint64_t)1 << i_channel) ) );
}
-int input_DecoderSetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
- int i_channel, bool b_decode )
+int vlc_input_decoder_SetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
+ int i_channel, bool b_decode )
{
decoder_t *p_dec = &p_owner->dec;
- //msg_Warn( p_dec, "input_DecoderSetCcState: %d @%x", b_decode, i_channel );
+ //msg_Warn( p_dec, "vlc_input_decoder_SetCcState: %d @%x", b_decode, i_channel );
- if( !input_DecoderHasCCChanFlag( p_owner, codec, i_channel ) )
+ if( !vlc_input_decoder_HasCCChanFlag( p_owner, codec, i_channel ) )
return VLC_EGENERIC;
if( b_decode )
@@ -2381,7 +2383,7 @@ int input_DecoderSetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
es_format_Init( &fmt, SPU_ES, codec );
fmt.subs.cc.i_channel = i_channel;
fmt.subs.cc.i_reorder_depth = p_owner->cc.desc.i_reorder_depth;
- p_ccowner = input_DecoderNew( VLC_OBJECT(p_dec), &fmt, p_owner->p_clock,
+ p_ccowner = vlc_input_decoder_New( VLC_OBJECT(p_dec), &fmt, p_owner->p_clock,
p_owner->p_resource, p_owner->p_sout, false,
NULL, NULL );
if( !p_ccowner )
@@ -2395,7 +2397,7 @@ int input_DecoderSetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
else if( !p_ccowner->dec.p_module )
{
DecoderUnsupportedCodec( p_dec, &fmt, true );
- input_DecoderDelete(p_ccowner);
+ vlc_input_decoder_Delete(p_ccowner);
return VLC_EGENERIC;
}
p_ccowner->p_clock = p_owner->p_clock;
@@ -2414,15 +2416,15 @@ int input_DecoderSetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
vlc_mutex_unlock( &p_owner->lock );
if( p_cc )
- input_DecoderDelete(p_cc);
+ vlc_input_decoder_Delete(p_cc);
}
return VLC_SUCCESS;
}
-int input_DecoderGetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
- int i_channel, bool *pb_decode )
+int vlc_input_decoder_GetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
+ int i_channel, bool *pb_decode )
{
- if( !input_DecoderHasCCChanFlag( p_owner, codec, i_channel ) )
+ if( !vlc_input_decoder_HasCCChanFlag( p_owner, codec, i_channel ) )
return VLC_EGENERIC;
vlc_mutex_lock( &p_owner->lock );
@@ -2431,7 +2433,8 @@ int input_DecoderGetCcState( vlc_input_decoder_t *p_owner, vlc_fourcc_t codec,
return VLC_SUCCESS;
}
-void input_DecoderChangePause( vlc_input_decoder_t *p_owner, bool b_paused, vlc_tick_t i_date )
+void vlc_input_decoder_ChangePause( vlc_input_decoder_t *p_owner,
+ bool b_paused, vlc_tick_t i_date )
{
/* Normally, p_owner->b_paused != b_paused here. But if a track is added
* while the input is paused (e.g. add sub file), then b_paused is
@@ -2444,21 +2447,21 @@ void input_DecoderChangePause( vlc_input_decoder_t *p_owner, bool b_paused, vlc_
vlc_fifo_Unlock( p_owner->p_fifo );
}
-void input_DecoderChangeRate( vlc_input_decoder_t *owner, float rate )
+void vlc_input_decoder_ChangeRate( vlc_input_decoder_t *owner, float rate )
{
vlc_fifo_Lock( owner->p_fifo );
owner->request_rate = rate;
vlc_fifo_Unlock( owner->p_fifo );
}
-void input_DecoderChangeDelay( vlc_input_decoder_t *owner, vlc_tick_t delay )
+void vlc_input_decoder_ChangeDelay( vlc_input_decoder_t *owner, vlc_tick_t delay )
{
vlc_fifo_Lock( owner->p_fifo );
owner->delay = delay;
vlc_fifo_Unlock( owner->p_fifo );
}
-void input_DecoderStartWait( vlc_input_decoder_t *p_owner )
+void vlc_input_decoder_StartWait( vlc_input_decoder_t *p_owner )
{
assert( !p_owner->b_waiting );
@@ -2470,7 +2473,7 @@ void input_DecoderStartWait( vlc_input_decoder_t *p_owner )
vlc_mutex_unlock( &p_owner->lock );
}
-void input_DecoderStopWait( vlc_input_decoder_t *p_owner )
+void vlc_input_decoder_StopWait( vlc_input_decoder_t *p_owner )
{
assert( p_owner->b_waiting );
@@ -2480,7 +2483,7 @@ void input_DecoderStopWait( vlc_input_decoder_t *p_owner )
vlc_mutex_unlock( &p_owner->lock );
}
-void input_DecoderWait( vlc_input_decoder_t *p_owner )
+void vlc_input_decoder_Wait( vlc_input_decoder_t *p_owner )
{
assert( p_owner->b_waiting );
@@ -2504,7 +2507,8 @@ void input_DecoderWait( vlc_input_decoder_t *p_owner )
vlc_mutex_unlock( &p_owner->lock );
}
-void input_DecoderFrameNext( vlc_input_decoder_t *p_owner, vlc_tick_t *pi_duration )
+void vlc_input_decoder_FrameNext( vlc_input_decoder_t *p_owner,
+ vlc_tick_t *pi_duration )
{
assert( p_owner->paused );
*pi_duration = 0;
@@ -2523,7 +2527,8 @@ void input_DecoderFrameNext( vlc_input_decoder_t *p_owner, vlc_tick_t *pi_durati
vlc_mutex_unlock( &p_owner->lock );
}
-bool input_DecoderHasFormatChanged( vlc_input_decoder_t *p_owner, es_format_t *p_fmt, vlc_meta_t **pp_meta )
+bool vlc_input_decoder_HasFormatChanged( vlc_input_decoder_t *p_owner,
+ es_format_t *p_fmt, vlc_meta_t **pp_meta )
{
if( !atomic_exchange_explicit( &p_owner->b_fmt_description, false,
memory_order_acquire ) )
@@ -2547,7 +2552,7 @@ bool input_DecoderHasFormatChanged( vlc_input_decoder_t *p_owner, es_format_t *p
return true;
}
-size_t input_DecoderGetFifoSize( vlc_input_decoder_t *p_owner )
+size_t vlc_input_decoder_GetFifoSize( vlc_input_decoder_t *p_owner )
{
return block_FifoSize( p_owner->p_fifo );
}
@@ -2558,7 +2563,7 @@ static bool DecoderHasVbi( decoder_t *dec )
&& var_Type( dec, "vbi-page" ) == VLC_VAR_INTEGER;
}
-int input_DecoderGetVbiPage( vlc_input_decoder_t *owner, bool *opaque )
+int vlc_input_decoder_GetVbiPage( vlc_input_decoder_t *owner, bool *opaque )
{
decoder_t *dec = &owner->dec;
if( !DecoderHasVbi( dec ) )
@@ -2567,7 +2572,7 @@ int input_DecoderGetVbiPage( vlc_input_decoder_t *owner, bool *opaque )
return var_GetInteger( dec, "vbi-page" );
}
-int input_DecoderSetVbiPage( vlc_input_decoder_t *owner, unsigned page )
+int vlc_input_decoder_SetVbiPage( vlc_input_decoder_t *owner, unsigned page )
{
decoder_t *dec = &owner->dec;
if( !DecoderHasVbi( dec ) )
@@ -2575,7 +2580,7 @@ int input_DecoderSetVbiPage( vlc_input_decoder_t *owner, unsigned page )
return var_SetInteger( dec, "vbi-page", page );
}
-int input_DecoderSetVbiOpaque( vlc_input_decoder_t *owner, bool opaque )
+int vlc_input_decoder_SetVbiOpaque( vlc_input_decoder_t *owner, bool opaque )
{
decoder_t *dec = &owner->dec;
if( !DecoderHasVbi( dec ) )
@@ -2583,9 +2588,9 @@ int input_DecoderSetVbiOpaque( vlc_input_decoder_t *owner, bool opaque )
return var_SetBool( dec, "vbi-opaque", opaque );
}
-void input_DecoderSetVoutMouseEvent( vlc_input_decoder_t *owner,
- vlc_mouse_event mouse_event,
- void *user_data )
+void vlc_input_decoder_SetVoutMouseEvent( vlc_input_decoder_t *owner,
+ vlc_mouse_event mouse_event,
+ void *user_data )
{
assert( owner->dec.fmt_in.i_cat == VIDEO_ES );
@@ -2597,8 +2602,8 @@ void input_DecoderSetVoutMouseEvent( vlc_input_decoder_t *owner,
vlc_mutex_unlock( &owner->mouse_lock );
}
-int input_DecoderAddVoutOverlay( vlc_input_decoder_t *owner, subpicture_t *sub,
- size_t *channel )
+int vlc_input_decoder_AddVoutOverlay( vlc_input_decoder_t *owner, subpicture_t *sub,
+ size_t *channel )
{
assert( owner->dec.fmt_in.i_cat == VIDEO_ES );
assert( sub && channel );
@@ -2627,7 +2632,7 @@ int input_DecoderAddVoutOverlay( vlc_input_decoder_t *owner, subpicture_t *sub,
return VLC_SUCCESS;
}
-int input_DecoderDelVoutOverlay( vlc_input_decoder_t *owner, size_t channel )
+int vlc_input_decoder_DelVoutOverlay( vlc_input_decoder_t *owner, size_t channel )
{
assert( owner->dec.fmt_in.i_cat == VIDEO_ES );
@@ -2644,8 +2649,8 @@ int input_DecoderDelVoutOverlay( vlc_input_decoder_t *owner, size_t channel )
return VLC_SUCCESS;
}
-int input_DecoderSetSpuHighlight( vlc_input_decoder_t *p_owner,
- const vlc_spu_highlight_t *spu_hl )
+int vlc_input_decoder_SetSpuHighlight( vlc_input_decoder_t *p_owner,
+ const vlc_spu_highlight_t *spu_hl )
{
assert( p_owner->dec.fmt_in.i_cat == SPU_ES );
diff --git a/src/input/decoder.h b/src/input/decoder.h
index 6ef0dc95f6..b5a05e232e 100644
--- a/src/input/decoder.h
+++ b/src/input/decoder.h
@@ -28,7 +28,7 @@
#include <vlc_codec.h>
#include <vlc_mouse.h>
-struct input_decoder_callbacks {
+struct vlc_input_decoder_callbacks {
/* notifications */
void (*on_vout_started)(vlc_input_decoder_t *decoder, vout_thread_t *vout,
enum vlc_vout_order vout_order,
@@ -51,17 +51,17 @@ struct input_decoder_callbacks {
};
vlc_input_decoder_t *
-input_DecoderNew( vlc_object_t *parent, es_format_t *, vlc_clock_t *,
- input_resource_t *, sout_instance_t *, bool thumbnailing,
- const struct input_decoder_callbacks *cbs,
- void *userdata ) VLC_USED;
+vlc_input_decoder_New( vlc_object_t *parent, es_format_t *, vlc_clock_t *,
+ input_resource_t *, sout_instance_t *, bool thumbnailing,
+ const struct vlc_input_decoder_callbacks *cbs,
+ void *userdata ) VLC_USED;
/**
* This function changes the pause state.
* The date parameter MUST hold the exact date at which the change has been
* done for proper vout/aout pausing.
*/
-void input_DecoderChangePause( vlc_input_decoder_t *, bool b_paused, vlc_tick_t i_date );
+void vlc_input_decoder_ChangePause( vlc_input_decoder_t *, bool b_paused, vlc_tick_t i_date );
/**
* Changes the decoder rate.
@@ -70,54 +70,54 @@ void input_DecoderChangePause( vlc_input_decoder_t *, bool b_paused, vlc_tick_t
* \param dec decoder
* \param rate playback rate (default is 1)
*/
-void input_DecoderChangeRate( vlc_input_decoder_t *dec, float rate );
+void vlc_input_decoder_ChangeRate( vlc_input_decoder_t *dec, float rate );
/**
* This function changes the delay.
*/
-void input_DecoderChangeDelay( vlc_input_decoder_t *, vlc_tick_t i_delay );
+void vlc_input_decoder_ChangeDelay( vlc_input_decoder_t *, vlc_tick_t i_delay );
/**
* This function makes the decoder start waiting for a valid data block from its fifo.
*/
-void input_DecoderStartWait( vlc_input_decoder_t * );
+void vlc_input_decoder_StartWait( vlc_input_decoder_t * );
/**
* This function waits for the decoder to actually receive data.
*/
-void input_DecoderWait( vlc_input_decoder_t * );
+void vlc_input_decoder_Wait( vlc_input_decoder_t * );
/**
* This function exits the waiting mode of the decoder.
*/
-void input_DecoderStopWait( vlc_input_decoder_t * );
+void vlc_input_decoder_StopWait( vlc_input_decoder_t * );
/**
* This function returns true if the decoder fifo is empty and false otherwise.
*/
-bool input_DecoderIsEmpty( vlc_input_decoder_t * );
+bool vlc_input_decoder_IsEmpty( vlc_input_decoder_t * );
/**
* This function activates the request closed caption channel.
*/
-int input_DecoderSetCcState( vlc_input_decoder_t *, vlc_fourcc_t, int i_channel, bool b_decode );
+int vlc_input_decoder_SetCcState( vlc_input_decoder_t *, vlc_fourcc_t, int i_channel, bool b_decode );
/**
* This function returns an error if the requested channel does not exist and
* set pb_decode to the channel status(active or not) otherwise.
*/
-int input_DecoderGetCcState( vlc_input_decoder_t *, vlc_fourcc_t, int i_channel, bool *pb_decode );
+int vlc_input_decoder_GetCcState( vlc_input_decoder_t *, vlc_fourcc_t, int i_channel, bool *pb_decode );
/**
* This function get cc channels descriptions
*/
-void input_DecoderGetCcDesc( vlc_input_decoder_t *, decoder_cc_desc_t * );
+void vlc_input_decoder_GetCcDesc( vlc_input_decoder_t *, decoder_cc_desc_t * );
/**
* This function force the display of the next picture and fills the stream
* time consumed.
*/
-void input_DecoderFrameNext( vlc_input_decoder_t *p_dec, vlc_tick_t *pi_duration );
+void vlc_input_decoder_FrameNext( vlc_input_decoder_t *p_dec, vlc_tick_t *pi_duration );
/**
* This function will return true if the ES format or meta data have changed since
@@ -127,19 +127,19 @@ void input_DecoderFrameNext( vlc_input_decoder_t *p_dec, vlc_tick_t *pi_duration
* vlc_meta_Delete.
* Otherwise it will return false and will not initialize p_fmt and *pp_meta.
*/
-bool input_DecoderHasFormatChanged( vlc_input_decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta );
+bool vlc_input_decoder_HasFormatChanged( vlc_input_decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta );
/**
* This function returns the current size in bytes of the decoder fifo
*/
-size_t input_DecoderGetFifoSize( vlc_input_decoder_t *p_dec );
+size_t vlc_input_decoder_GetFifoSize( vlc_input_decoder_t *p_dec );
-int input_DecoderGetVbiPage( vlc_input_decoder_t *, bool *opaque );
-int input_DecoderSetVbiPage( vlc_input_decoder_t *, unsigned page );
-int input_DecoderSetVbiOpaque( vlc_input_decoder_t *, bool opaque );
+int vlc_input_decoder_GetVbiPage( vlc_input_decoder_t *, bool *opaque );
+int vlc_input_decoder_SetVbiPage( vlc_input_decoder_t *, unsigned page );
+int vlc_input_decoder_SetVbiOpaque( vlc_input_decoder_t *, bool opaque );
-void input_DecoderSetVoutMouseEvent( vlc_input_decoder_t *, vlc_mouse_event, void * );
-int input_DecoderAddVoutOverlay( vlc_input_decoder_t *, subpicture_t *, size_t * );
-int input_DecoderDelVoutOverlay( vlc_input_decoder_t *, size_t );
+void vlc_input_decoder_SetVoutMouseEvent( vlc_input_decoder_t *, vlc_mouse_event, void * );
+int vlc_input_decoder_AddVoutOverlay( vlc_input_decoder_t *, subpicture_t *, size_t * );
+int vlc_input_decoder_DelVoutOverlay( vlc_input_decoder_t *, size_t );
#endif
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 03a41c0b99..d6fa3e41e7 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -410,7 +410,7 @@ decoder_get_attachments(vlc_input_decoder_t *decoder,
return input_GetAttachments(p_sys->p_input, ppp_attachment);
}
-static const struct input_decoder_callbacks decoder_cbs = {
+static const struct vlc_input_decoder_callbacks decoder_cbs = {
.on_vout_started = decoder_on_vout_started,
.on_vout_stopped = decoder_on_vout_stopped,
.on_thumbnail_ready = decoder_on_thumbnail_ready,
@@ -637,7 +637,7 @@ static void EsOutTerminate( es_out_t *out )
foreach_es_then_es_slaves(es)
{
if (es->p_dec != NULL)
- input_DecoderDelete(es->p_dec);
+ vlc_input_decoder_Delete(es->p_dec);
EsTerminate(es);
EsRelease(es);
@@ -706,9 +706,9 @@ static bool EsOutDecodersIsEmpty( es_out_t *out )
foreach_es_then_es_slaves(es)
{
- if( es->p_dec && !input_DecoderIsEmpty( es->p_dec ) )
+ if( es->p_dec && !vlc_input_decoder_IsEmpty( es->p_dec ) )
return false;
- if( es->p_dec_record && !input_DecoderIsEmpty( es->p_dec_record ) )
+ if( es->p_dec_record && !vlc_input_decoder_IsEmpty( es->p_dec_record ) )
return false;
}
return true;
@@ -806,13 +806,13 @@ static int EsOutSetRecord( es_out_t *out, bool b_record )
continue;
p_es->p_dec_record =
- input_DecoderNew( VLC_OBJECT(p_input), &p_es->fmt, NULL,
- input_priv(p_input)->p_resource,
- p_sys->p_sout_record, false,
- &decoder_cbs, p_es );
+ vlc_input_decoder_New( VLC_OBJECT(p_input), &p_es->fmt, NULL,
+ input_priv(p_input)->p_resource,
+ p_sys->p_sout_record, false,
+ &decoder_cbs, p_es );
if( p_es->p_dec_record && p_sys->b_buffering )
- input_DecoderStartWait( p_es->p_dec_record );
+ vlc_input_decoder_StartWait( p_es->p_dec_record );
}
}
else
@@ -822,7 +822,7 @@ static int EsOutSetRecord( es_out_t *out, bool b_record )
if( !p_es->p_dec_record )
continue;
- input_DecoderDelete( p_es->p_dec_record );
+ vlc_input_decoder_Delete( p_es->p_dec_record );
p_es->p_dec_record = NULL;
}
#ifdef ENABLE_SOUT
@@ -884,7 +884,7 @@ static void EsOutChangeRate( es_out_t *out, float rate )
foreach_es_then_es_slaves(es)
if( es->p_dec != NULL )
- input_DecoderChangeRate( es->p_dec, rate );
+ vlc_input_decoder_ChangeRate( es->p_dec, rate );
}
static void EsOutChangePosition( es_out_t *out, bool b_flush )
@@ -898,12 +898,12 @@ static void EsOutChangePosition( es_out_t *out, bool b_flush )
if( p_es->p_dec != NULL )
{
if( b_flush )
- input_DecoderFlush( p_es->p_dec );
+ vlc_input_decoder_Flush( p_es->p_dec );
if( !p_sys->b_buffering )
{
- input_DecoderStartWait( p_es->p_dec );
+ vlc_input_decoder_StartWait( p_es->p_dec );
if( p_es->p_dec_record != NULL )
- input_DecoderStartWait( p_es->p_dec_record );
+ vlc_input_decoder_StartWait( p_es->p_dec_record );
}
}
@@ -992,9 +992,9 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
{
if( !p_es->p_dec || p_es->fmt.i_cat == SPU_ES )
continue;
- input_DecoderWait( p_es->p_dec );
+ vlc_input_decoder_Wait( p_es->p_dec );
if( p_es->p_dec_record )
- input_DecoderWait( p_es->p_dec_record );
+ vlc_input_decoder_Wait( p_es->p_dec_record );
}
msg_Dbg( p_sys->p_input, "Decoder wait done in %d ms",
@@ -1021,9 +1021,9 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
if( !p_es->p_dec )
continue;
- input_DecoderStopWait( p_es->p_dec );
+ vlc_input_decoder_StopWait( p_es->p_dec );
if( p_es->p_dec_record )
- input_DecoderStopWait( p_es->p_dec_record );
+ vlc_input_decoder_StopWait( p_es->p_dec_record );
}
}
static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, vlc_tick_t i_date )
@@ -1035,9 +1035,10 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, vlc_tick_t i
foreach_es_then_es_slaves(es)
if( es->p_dec )
{
- input_DecoderChangePause( es->p_dec, b_paused, i_date );
+ vlc_input_decoder_ChangePause( es->p_dec, b_paused, i_date );
if( es->p_dec_record )
- input_DecoderChangePause( es->p_dec_record, b_paused, i_date );
+ vlc_input_decoder_ChangePause( es->p_dec_record, b_paused,
+ i_date );
}
}
@@ -1050,9 +1051,9 @@ static bool EsOutIsExtraBufferingAllowed( es_out_t *out )
foreach_es_then_es_slaves(p_es)
{
if( p_es->p_dec )
- i_size += input_DecoderGetFifoSize( p_es->p_dec );
+ i_size += vlc_input_decoder_GetFifoSize( p_es->p_dec );
if( p_es->p_dec_record )
- i_size += input_DecoderGetFifoSize( p_es->p_dec_record );
+ i_size += vlc_input_decoder_GetFifoSize( p_es->p_dec_record );
}
//msg_Info( out, "----- EsOutIsExtraBufferingAllowed =% 5d KiB -- ", i_size / 1024 );
@@ -1092,9 +1093,9 @@ static void EsOutDecoderChangeDelay( es_out_t *out, es_out_id_t *p_es )
return;
if( p_es->p_dec )
- input_DecoderChangeDelay( p_es->p_dec, i_delay );
+ vlc_input_decoder_ChangeDelay( p_es->p_dec, i_delay );
if( p_es->p_dec_record )
- input_DecoderChangeDelay( p_es->p_dec_record, i_delay );
+ vlc_input_decoder_ChangeDelay( p_es->p_dec_record, i_delay );
}
static void EsOutProgramsChangeRate( es_out_t *out )
{
@@ -1132,7 +1133,7 @@ static void EsOutFrameNext( es_out_t *out )
}
vlc_tick_t i_duration;
- input_DecoderFrameNext( p_es_video->p_dec, &i_duration );
+ vlc_input_decoder_FrameNext( p_es_video->p_dec, &i_duration );
msg_Dbg( p_sys->p_input, "EsOutFrameNext consummed %d ms", (int)MS_FROM_VLC_TICK(i_duration) );
@@ -2120,8 +2121,8 @@ static bool EsIsSelected( es_out_id_t *es )
if( es->p_master->p_dec )
{
int i_channel = EsOutGetClosedCaptionsChannel( &es->fmt );
- input_DecoderGetCcState( es->p_master->p_dec, es->fmt.i_codec,
- i_channel, &b_decode );
+ vlc_input_decoder_GetCcState( es->p_master->p_dec, es->fmt.i_codec,
+ i_channel, &b_decode );
}
return b_decode;
}
@@ -2178,29 +2179,29 @@ static void EsOutCreateDecoder( es_out_t *out, es_out_id_t *p_es )
}
input_thread_private_t *priv = input_priv(p_input);
- dec = input_DecoderNew( VLC_OBJECT(p_input), &p_es->fmt, p_es->p_clock,
- priv->p_resource, priv->p_sout,
- priv->b_thumbnailing, &decoder_cbs, p_es );
+ dec = vlc_input_decoder_New( VLC_OBJECT(p_input), &p_es->fmt, p_es->p_clock,
+ priv->p_resource, priv->p_sout,
+ priv->b_thumbnailing, &decoder_cbs, p_es );
if( dec != NULL )
{
- input_DecoderChangeRate( dec, p_sys->rate );
+ vlc_input_decoder_ChangeRate( dec, p_sys->rate );
if( p_sys->b_buffering )
- input_DecoderStartWait( dec );
+ vlc_input_decoder_StartWait( dec );
if( !p_es->p_master && p_sys->p_sout_record )
{
p_es->p_dec_record =
- input_DecoderNew( VLC_OBJECT(p_input), &p_es->fmt, NULL,
- priv->p_resource, p_sys->p_sout_record, false,
- &decoder_cbs, p_es );
+ vlc_input_decoder_New( VLC_OBJECT(p_input), &p_es->fmt, NULL,
+ priv->p_resource, p_sys->p_sout_record,
+ false, &decoder_cbs, p_es );
if( p_es->p_dec_record && p_sys->b_buffering )
- input_DecoderStartWait( p_es->p_dec_record );
+ vlc_input_decoder_StartWait( p_es->p_dec_record );
}
if( p_es->mouse_event_cb && p_es->fmt.i_cat == VIDEO_ES )
- input_DecoderSetVoutMouseEvent( dec, p_es->mouse_event_cb,
- p_es->mouse_event_userdata );
+ vlc_input_decoder_SetVoutMouseEvent( dec, p_es->mouse_event_cb,
+ p_es->mouse_event_userdata );
}
else
{
@@ -2220,7 +2221,7 @@ static void EsOutDestroyDecoder( es_out_t *out, es_out_id_t *p_es )
assert( p_es->p_pgrm );
- input_DecoderDelete( p_es->p_dec );
+ vlc_input_decoder_Delete( p_es->p_dec );
p_es->p_dec = NULL;
if( p_es->p_pgrm->p_master_clock == p_es->p_clock )
p_es->p_pgrm->p_master_clock = NULL;
@@ -2229,7 +2230,7 @@ static void EsOutDestroyDecoder( es_out_t *out, es_out_id_t *p_es )
if( p_es->p_dec_record )
{
- input_DecoderDelete( p_es->p_dec_record );
+ vlc_input_decoder_Delete( p_es->p_dec_record );
p_es->p_dec_record = NULL;
}
@@ -2260,8 +2261,8 @@ static void EsOutSelectEs( es_out_t *out, es_out_id_t *es, bool b_force )
i_channel = EsOutGetClosedCaptionsChannel( &es->fmt );
if( i_channel == -1 ||
- input_DecoderSetCcState( es->p_master->p_dec, es->fmt.i_codec,
- i_channel, true ) )
+ vlc_input_decoder_SetCcState( es->p_master->p_dec, es->fmt.i_codec,
+ i_channel, true ) )
return;
}
else
@@ -2316,7 +2317,7 @@ static void EsOutSelectEs( es_out_t *out, es_out_id_t *es, bool b_force )
if( !es->p_master )
{
bool vbi_opaque;
- int vbi_page = input_DecoderGetVbiPage( es->p_dec, &vbi_opaque );
+ int vbi_page = vlc_input_decoder_GetVbiPage( es->p_dec, &vbi_opaque );
if( vbi_page >= 0 )
{
input_SendEventVbiPage( p_input, vbi_page );
@@ -2334,7 +2335,7 @@ static void EsOutDrainCCChannels( es_out_id_t *parent )
if( (i_bitmap & 1) == 0 || !parent->cc.pp_es[i] ||
!parent->cc.pp_es[i]->p_dec )
continue;
- input_DecoderDrain( parent->cc.pp_es[i]->p_dec );
+ vlc_input_decoder_Drain( parent->cc.pp_es[i]->p_dec );
}
}
@@ -2382,8 +2383,8 @@ static void EsOutUnselectEs( es_out_t *out, es_out_id_t *es, bool b_update )
{
int i_channel = EsOutGetClosedCaptionsChannel( &es->fmt );
if( i_channel != -1 )
- input_DecoderSetCcState( es->p_master->p_dec, es->fmt.i_codec,
- i_channel, false );
+ vlc_input_decoder_SetCcState( es->p_master->p_dec, es->fmt.i_codec,
+ i_channel, false );
}
}
else
@@ -2771,15 +2772,15 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
{
block_t *p_dup = block_Duplicate( p_block );
if( p_dup )
- input_DecoderDecode( es->p_dec_record, p_dup,
- input_priv(p_input)->b_out_pace_control );
+ vlc_input_decoder_Decode( es->p_dec_record, p_dup,
+ input_priv(p_input)->b_out_pace_control );
}
- input_DecoderDecode( es->p_dec, p_block,
- input_priv(p_input)->b_out_pace_control );
+ vlc_input_decoder_Decode( es->p_dec, p_block,
+ input_priv(p_input)->b_out_pace_control );
es_format_t fmt_dsc;
vlc_meta_t *p_meta_dsc;
- if( input_DecoderHasFormatChanged( es->p_dec, &fmt_dsc, &p_meta_dsc ) )
+ if( vlc_input_decoder_HasFormatChanged( es->p_dec, &fmt_dsc, &p_meta_dsc ) )
{
if (EsOutEsUpdateFmt( out, es, &fmt_dsc) == VLC_SUCCESS)
EsOutSendEsEvent(out, es, VLC_INPUT_ES_UPDATED, false);
@@ -2794,7 +2795,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
/* Check CC status */
decoder_cc_desc_t desc;
- input_DecoderGetCcDesc( es->p_dec, &desc );
+ vlc_input_decoder_GetCcDesc( es->p_dec, &desc );
if( var_InheritInteger( p_input, "captions" ) == 708 )
EsOutCreateCCChannels( out, VLC_CODEC_CEA708, desc.i_708_channels,
_("DTVCC Closed captions %u"), es );
@@ -2815,12 +2816,12 @@ EsOutDrainDecoder( es_out_t *out, es_out_id_t *es )
/* FIXME: This might hold the ES output caller (i.e. the demux), and
* the corresponding thread (typically the input thread), for a little
* bit too long if the ES is deleted in the middle of a stream. */
- input_DecoderDrain( es->p_dec );
+ vlc_input_decoder_Drain( es->p_dec );
EsOutDrainCCChannels( es );
while( !input_Stopped(p_sys->p_input) && !p_sys->b_buffering )
{
- if( input_DecoderIsEmpty( es->p_dec ) &&
- ( !es->p_dec_record || input_DecoderIsEmpty( es->p_dec_record ) ))
+ if( vlc_input_decoder_IsEmpty( es->p_dec ) &&
+ ( !es->p_dec_record || vlc_input_decoder_IsEmpty( es->p_dec_record ) ))
break;
/* FIXME there should be a way to have auto deleted es, but there will be
* a problem when another codec of the same type is created (mainly video) */
@@ -3406,7 +3407,7 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
p_es->mouse_event_userdata = va_arg( args, void * );
if( p_es->p_dec )
- input_DecoderSetVoutMouseEvent( p_es->p_dec,
+ vlc_input_decoder_SetVoutMouseEvent( p_es->p_dec,
p_es->mouse_event_cb, p_es->mouse_event_userdata );
return VLC_SUCCESS;
@@ -3417,7 +3418,7 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
subpicture_t *sub = va_arg( args, subpicture_t * );
size_t *channel = va_arg( args, size_t * );
if( p_es && p_es->fmt.i_cat == VIDEO_ES && p_es->p_dec )
- return input_DecoderAddVoutOverlay( p_es->p_dec, sub, channel );
+ return vlc_input_decoder_AddVoutOverlay( p_es->p_dec, sub, channel );
return VLC_EGENERIC;
}
case ES_OUT_VOUT_DEL_OVERLAY:
@@ -3425,7 +3426,7 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
es_out_id_t *p_es = va_arg( args, es_out_id_t * );
size_t channel = va_arg( args, size_t );
if( p_es && p_es->fmt.i_cat == VIDEO_ES && p_es->p_dec )
- return input_DecoderDelVoutOverlay( p_es->p_dec, channel );
+ return vlc_input_decoder_DelVoutOverlay( p_es->p_dec, channel );
return VLC_EGENERIC;
}
case ES_OUT_SPU_SET_HIGHLIGHT:
@@ -3434,7 +3435,7 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
const vlc_spu_highlight_t *spu_hl =
va_arg( args, const vlc_spu_highlight_t * );
if( p_es && p_es->fmt.i_cat == SPU_ES && p_es->p_dec )
- return input_DecoderSetSpuHighlight( p_es->p_dec, spu_hl );
+ return vlc_input_decoder_SetSpuHighlight( p_es->p_dec, spu_hl );
return VLC_EGENERIC;
}
default: vlc_assert_unreachable();
@@ -3710,7 +3711,7 @@ static int EsOutVaPrivControlLocked( es_out_t *out, int query, va_list args )
es_out_id_t *id;
foreach_es_then_es_slaves(id)
if (id->p_dec != NULL)
- input_DecoderDrain(id->p_dec);
+ vlc_input_decoder_Drain(id->p_dec);
return VLC_SUCCESS;
}
case ES_OUT_PRIV_SET_VBI_PAGE:
@@ -3726,14 +3727,14 @@ static int EsOutVaPrivControlLocked( es_out_t *out, int query, va_list args )
if( query == ES_OUT_PRIV_SET_VBI_PAGE )
{
unsigned page = va_arg( args, unsigned );
- ret = input_DecoderSetVbiPage( es->p_dec, page );
+ ret = vlc_input_decoder_SetVbiPage( es->p_dec, page );
if( ret == VLC_SUCCESS )
input_SendEventVbiPage( p_sys->p_input, page );
}
else
{
bool opaque = va_arg( args, int );
- ret = input_DecoderSetVbiOpaque( es->p_dec, opaque );
+ ret = vlc_input_decoder_SetVbiOpaque( es->p_dec, opaque );
if( ret == VLC_SUCCESS )
input_SendEventVbiTransparency( p_sys->p_input, opaque );
}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index caf4287842..66ae6f3ecd 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -164,12 +164,12 @@ image_HandlerDelete
image_Mime2Fourcc
image_Type2Fourcc
InitMD5
-input_DecoderCreate
-input_DecoderDelete
-input_DecoderDecode
-input_DecoderDrain
-input_DecoderFlush
-input_DecoderSetSpuHighlight
+vlc_input_decoder_Create
+vlc_input_decoder_Delete
+vlc_input_decoder_Decode
+vlc_input_decoder_Drain
+vlc_input_decoder_Flush
+vlc_input_decoder_SetSpuHighlight
input_item_AddInfo
input_item_AddOption
input_item_AddOptions
--
2.20.1
More information about the vlc-devel
mailing list