mirror of https://code.videolan.org/videolan/vlc
core: always build sout code
The sout code in the core is not big, no need to remove it. ENABLE_SOUT should be kept for modules and contribs, since they can be huge.
This commit is contained in:
parent
1d17c9b56b
commit
a65da7b206
|
@ -538,14 +538,12 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
if ENABLE_SOUT
|
||||
libvlccore_la_SOURCES += \
|
||||
stream_output/sap.c \
|
||||
stream_output/stream_output.c stream_output/stream_output.h
|
||||
if ENABLE_VLM
|
||||
libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
|
||||
endif
|
||||
endif
|
||||
|
||||
if UPDATE_CHECK
|
||||
libvlccore_la_SOURCES += \
|
||||
|
|
|
@ -1038,8 +1038,6 @@ static inline void DecoderUpdatePreroll( vlc_tick_t *pi_preroll, const vlc_frame
|
|||
*pi_preroll = __MIN( *pi_preroll, p->i_pts );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
|
||||
static void DecoderSendSubstream(vlc_input_decoder_t *p_owner)
|
||||
{
|
||||
decoder_t *p_dec = &p_owner->dec;
|
||||
|
@ -1153,7 +1151,6 @@ static void DecoderThread_ProcessSout( vlc_input_decoder_t *p_owner, vlc_frame_t
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void DecoderPlayCc( vlc_input_decoder_t *p_owner, vlc_frame_t *p_cc,
|
||||
const decoder_cc_desc_t *p_desc )
|
||||
|
@ -1600,13 +1597,11 @@ static void DecoderThread_ProcessInput( vlc_input_decoder_t *p_owner, vlc_frame_
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
if( p_owner->p_sout != NULL )
|
||||
{
|
||||
DecoderThread_ProcessSout( p_owner, frame );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if( packetize )
|
||||
{
|
||||
vlc_frame_t *packetized_frame;
|
||||
|
@ -2024,14 +2019,12 @@ static void DeleteDecoder( vlc_input_decoder_t *p_owner, enum es_format_category
|
|||
block_FifoEmpty( p_owner->p_fifo );
|
||||
|
||||
/* Cleanup */
|
||||
#ifdef ENABLE_SOUT
|
||||
if( p_owner->p_sout_input )
|
||||
{
|
||||
sout_InputDelete( p_owner->p_sout, p_owner->p_sout_input );
|
||||
if( p_owner->cc.p_sout_input )
|
||||
sout_InputDelete( p_owner->p_sout, p_owner->cc.p_sout_input );
|
||||
}
|
||||
#endif
|
||||
|
||||
switch( i_cat )
|
||||
{
|
||||
|
@ -2140,7 +2133,6 @@ decoder_New( vlc_object_t *p_parent, const struct vlc_input_decoder_cfg *cfg )
|
|||
|
||||
assert( p_dec->fmt_in->i_cat != UNKNOWN_ES );
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
/* Do not delay sout creation for SPU or DATA. */
|
||||
if( cfg->sout && cfg->fmt->b_packetized &&
|
||||
(cfg->fmt->i_cat != VIDEO_ES && cfg->fmt->i_cat != AUDIO_ES) )
|
||||
|
@ -2153,7 +2145,6 @@ decoder_New( vlc_object_t *p_parent, const struct vlc_input_decoder_cfg *cfg )
|
|||
p_owner->error = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if( !vlc_input_decoder_IsSynchronous( p_owner ) )
|
||||
{
|
||||
|
@ -2294,12 +2285,9 @@ bool vlc_input_decoder_IsEmpty( vlc_input_decoder_t * p_owner )
|
|||
|
||||
bool b_empty;
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
if( p_owner->p_sout_input != NULL )
|
||||
b_empty = true;
|
||||
else
|
||||
#endif
|
||||
if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->p_vout != NULL )
|
||||
else if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->p_vout != NULL )
|
||||
b_empty = vout_IsEmpty( p_owner->p_vout );
|
||||
else if( p_owner->fmt.i_cat == AUDIO_ES && p_owner->p_astream != NULL )
|
||||
b_empty = vlc_aout_stream_IsDrained( p_owner->p_astream );
|
||||
|
@ -2361,9 +2349,7 @@ void vlc_input_decoder_Flush( vlc_input_decoder_t *p_owner )
|
|||
|
||||
if ( p_owner->p_sout_input != NULL )
|
||||
{
|
||||
#ifdef ENABLE_SOUT
|
||||
sout_InputFlush( p_owner->p_sout, p_owner->p_sout_input );
|
||||
#endif
|
||||
}
|
||||
else if( cat == AUDIO_ES )
|
||||
{
|
||||
|
@ -2739,11 +2725,9 @@ int vlc_input_decoder_SetSpuHighlight( vlc_input_decoder_t *p_owner,
|
|||
{
|
||||
assert( p_owner->dec.fmt_in->i_cat == SPU_ES );
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
if( p_owner->p_sout_input )
|
||||
sout_InputControl( p_owner->p_sout, p_owner->p_sout_input,
|
||||
SOUT_INPUT_SET_SPU_HIGHLIGHT, spu_hl );
|
||||
#endif
|
||||
|
||||
vlc_fifo_Lock(p_owner->p_fifo);
|
||||
if( !p_owner->p_vout )
|
||||
|
|
|
@ -800,9 +800,7 @@ static int EsOutSetRecord( es_out_t *out, bool b_record, const char *dir_path )
|
|||
if( !psz_sout )
|
||||
return VLC_EGENERIC;
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
p_sys->p_sout_record = sout_NewInstance( p_input, psz_sout );
|
||||
#endif
|
||||
free( psz_sout );
|
||||
|
||||
if( !p_sys->p_sout_record )
|
||||
|
@ -841,9 +839,7 @@ static int EsOutSetRecord( es_out_t *out, bool b_record, const char *dir_path )
|
|||
vlc_input_decoder_Delete( p_es->p_dec_record );
|
||||
p_es->p_dec_record = NULL;
|
||||
}
|
||||
#ifdef ENABLE_SOUT
|
||||
sout_StreamChainDelete( p_sys->p_sout_record, NULL );
|
||||
#endif
|
||||
p_sys->p_sout_record = NULL;
|
||||
}
|
||||
|
||||
|
@ -2957,7 +2953,6 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
|
|||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
/* Check for sout mode */
|
||||
if( input_priv(p_input)->p_sout )
|
||||
{
|
||||
|
@ -2969,7 +2964,6 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
|
|||
input_priv(p_input)->b_out_pace_control = async;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Decode */
|
||||
if( es->p_dec_record )
|
||||
|
@ -3365,12 +3359,10 @@ static int EsOutVaControlLocked( es_out_t *out, input_source_t *source,
|
|||
}
|
||||
input_thread_private_t *priv = input_priv(p_sys->p_input);
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
if ( priv->p_sout != NULL )
|
||||
{
|
||||
sout_StreamSetPCR( priv->p_sout, i_pcr );
|
||||
}
|
||||
#endif
|
||||
/* TODO do not use vlc_tick_now() but proper stream acquisition date */
|
||||
const bool b_low_delay = priv->b_low_delay;
|
||||
bool b_extra_buffering_allowed = !b_low_delay && EsOutIsExtraBufferingAllowed( out );
|
||||
|
|
|
@ -739,7 +739,6 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
static int InitSout( input_thread_t * p_input )
|
||||
{
|
||||
input_thread_private_t *priv = input_priv(p_input);
|
||||
|
@ -782,7 +781,6 @@ static int InitSout( input_thread_t * p_input )
|
|||
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void InitProperties( input_thread_t *input )
|
||||
{
|
||||
|
@ -805,12 +803,7 @@ static void InitProperties( input_thread_t *input )
|
|||
if( !master->b_rescale_ts && !master->b_can_pace_control && master->b_can_rate_control )
|
||||
capabilities |= VLC_INPUT_CAPABILITIES_REWINDABLE;
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
capabilities |= VLC_INPUT_CAPABILITIES_RECORDABLE;
|
||||
#else
|
||||
if( master->b_can_stream_record )
|
||||
capabilities |= VLC_INPUT_CAPABILITIES_RECORDABLE;
|
||||
#endif
|
||||
|
||||
input_SendEventCapabilities( input, capabilities );
|
||||
|
||||
|
@ -1275,10 +1268,8 @@ static int Init( input_thread_t * p_input )
|
|||
var_SetBool( p_input, "sub-autodetect-file", false );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
if( InitSout( p_input ) )
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
/* Create es out */
|
||||
priv->p_es_out = input_EsOutTimeshiftNew( p_input, priv->p_es_out_display, priv->rate );
|
||||
|
@ -1327,14 +1318,12 @@ static int Init( input_thread_t * p_input )
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
if( priv->type != INPUT_TYPE_PREPARSING && priv->p_sout )
|
||||
{
|
||||
priv->b_out_pace_control = sout_StreamIsSynchronous(priv->p_sout);
|
||||
msg_Dbg( p_input, "starting in %ssync mode",
|
||||
priv->b_out_pace_control ? "a" : "" );
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!input_item_IsPreparsed(input_priv(p_input)->p_item))
|
||||
{
|
||||
|
@ -1814,7 +1803,6 @@ static void ControlNav( input_thread_t *p_input, int i_type )
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOUT
|
||||
static void ControlUpdateRenderer( input_thread_t *p_input, bool b_enable )
|
||||
{
|
||||
if( b_enable )
|
||||
|
@ -1843,8 +1831,6 @@ static void ControlInsertDemuxFilter( input_thread_t* p_input, const char* psz_d
|
|||
msg_Dbg(p_input, "Failed to create demux filter %s", psz_demux_chain);
|
||||
}
|
||||
|
||||
#endif // ENABLE_SOUT
|
||||
|
||||
void input_SetProgramId(input_thread_t *input, int group_id)
|
||||
|
||||
{
|
||||
|
@ -2365,7 +2351,6 @@ static bool Control( input_thread_t *p_input,
|
|||
|
||||
case INPUT_CONTROL_SET_RENDERER:
|
||||
{
|
||||
#ifdef ENABLE_SOUT
|
||||
vlc_renderer_item_t *p_item = param.val.p_address;
|
||||
input_thread_private_t *p_priv = input_priv( p_input );
|
||||
// We do not support switching from a renderer to another for now
|
||||
|
@ -2396,7 +2381,6 @@ static bool Control( input_thread_t *p_input,
|
|||
}
|
||||
}
|
||||
es_out_StartAllEs( priv->p_es_out_display, context );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case INPUT_CONTROL_SET_VBI_PAGE:
|
||||
|
@ -2805,10 +2789,8 @@ static int InputSourceInit( input_source_t *in, input_thread_t *p_input,
|
|||
/* Set record capabilities */
|
||||
if( demux_Control( in->p_demux, DEMUX_CAN_RECORD, &in->b_can_stream_record ) )
|
||||
in->b_can_stream_record = false;
|
||||
#ifdef ENABLE_SOUT
|
||||
if( !var_GetBool( p_input, "input-record-native" ) )
|
||||
in->b_can_stream_record = false;
|
||||
#endif
|
||||
|
||||
demux_Control( in->p_demux, DEMUX_CAN_PAUSE, &in->b_can_pause );
|
||||
|
||||
|
|
|
@ -135,14 +135,12 @@ vout_resource_Remove(struct vout_resource *vout_rsc)
|
|||
/* */
|
||||
static void DestroySout( input_resource_t *p_resource )
|
||||
{
|
||||
#ifdef ENABLE_SOUT
|
||||
if( p_resource->p_sout )
|
||||
{
|
||||
msg_Dbg( p_resource->p_parent, "destroying stream output" );
|
||||
sout_StreamChainDelete( p_resource->p_sout, NULL );
|
||||
free(p_resource->psz_sout);
|
||||
}
|
||||
#endif
|
||||
p_resource->p_sout = NULL;
|
||||
}
|
||||
|
||||
|
@ -595,7 +593,6 @@ sout_stream_t *input_resource_RequestSout( input_resource_t *p_resource, const c
|
|||
|
||||
assert(psz_sout != NULL);
|
||||
vlc_mutex_lock( &p_resource->lock );
|
||||
#ifdef ENABLE_SOUT
|
||||
/* Check the validity of the sout */
|
||||
if (p_resource->p_sout != NULL
|
||||
&& strcmp(p_resource->psz_sout, psz_sout) != 0)
|
||||
|
@ -624,9 +621,6 @@ sout_stream_t *input_resource_RequestSout( input_resource_t *p_resource, const c
|
|||
free(p_resource->psz_sout);
|
||||
}
|
||||
}
|
||||
#else
|
||||
sout = NULL;
|
||||
#endif
|
||||
vlc_mutex_unlock( &p_resource->lock );
|
||||
return sout;
|
||||
}
|
||||
|
|
128
src/missing.c
128
src/missing.c
|
@ -37,134 +37,6 @@
|
|||
#include <vlc_common.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef ENABLE_SOUT
|
||||
# include <vlc_sout.h>
|
||||
|
||||
_Noreturn int sout_AccessOutControl(sout_access_out_t *out, int query, ...)
|
||||
{
|
||||
VLC_UNUSED (out); VLC_UNUSED (query);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn void sout_AccessOutDelete(sout_access_out_t *out)
|
||||
{
|
||||
VLC_UNUSED (out);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
#undef sout_AccessOutNew
|
||||
sout_access_out_t *sout_AccessOutNew (vlc_object_t *obj,
|
||||
const char *access, const char *name)
|
||||
{
|
||||
VLC_UNUSED (access); VLC_UNUSED (name);
|
||||
msg_Err (obj, "Output support not compiled-in!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_Noreturn ssize_t sout_AccessOutRead(sout_access_out_t *out, block_t *block)
|
||||
{
|
||||
VLC_UNUSED (out); VLC_UNUSED (block);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn int sout_AccessOutSeek(sout_access_out_t *out, uint64_t offset)
|
||||
{
|
||||
VLC_UNUSED (out); VLC_UNUSED (offset);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn ssize_t sout_AccessOutWrite(sout_access_out_t *out, block_t *block)
|
||||
{
|
||||
VLC_UNUSED (out); VLC_UNUSED (block);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
#undef sout_AnnounceRegisterSDP
|
||||
session_descriptor_t *sout_AnnounceRegisterSDP (vlc_object_t *obj,
|
||||
const char *sdp,
|
||||
const char *dst)
|
||||
{
|
||||
VLC_UNUSED (sdp); VLC_UNUSED (dst);
|
||||
msg_Err (obj, "SDP export not compiled-in!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef sout_AnnounceUnRegister
|
||||
_Noreturn void sout_AnnounceUnRegister(vlc_object_t *obj,
|
||||
session_descriptor_t *d)
|
||||
{
|
||||
VLC_UNUSED (obj); VLC_UNUSED (d);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
#undef sout_EncoderCreate
|
||||
encoder_t *sout_EncoderCreate( vlc_object_t *p_this, size_t owner_size )
|
||||
{
|
||||
(void)owner_size;
|
||||
msg_Err (p_this, "Encoding support not compiled-in!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_Noreturn sout_input_t *sout_MuxAddStream(sout_mux_t *mux,
|
||||
const es_format_t *fmt)
|
||||
{
|
||||
VLC_UNUSED (mux); VLC_UNUSED (fmt);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn void sout_MuxDelete(sout_mux_t *mux)
|
||||
{
|
||||
VLC_UNUSED (mux);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn void sout_MuxDeleteStream(sout_mux_t *mux, sout_input_t *input)
|
||||
{
|
||||
VLC_UNUSED (mux); VLC_UNUSED (input);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn int sout_MuxGetStream(sout_mux_t *mux, unsigned n, vlc_tick_t *date)
|
||||
{
|
||||
(void) mux; (void) n; (void) date;
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn sout_mux_t *sout_MuxNew(sout_access_out_t *out, const char *mux)
|
||||
{
|
||||
VLC_UNUSED(out); VLC_UNUSED(mux);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn int sout_MuxSendBuffer(sout_mux_t *mux, sout_input_t *input,
|
||||
block_t *block)
|
||||
{
|
||||
VLC_UNUSED (mux); VLC_UNUSED (input); VLC_UNUSED (block);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn void sout_MuxFlush(sout_mux_t *mux, sout_input_t *input)
|
||||
{
|
||||
VLC_UNUSED (mux); VLC_UNUSED (input);
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn void sout_StreamChainDelete(sout_stream_t *first,
|
||||
sout_stream_t *end)
|
||||
{
|
||||
(void) first; (void) end;
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
|
||||
_Noreturn sout_stream_t *sout_StreamChainNew(vlc_object_t *sout,
|
||||
const char *chain,
|
||||
sout_stream_t *next)
|
||||
{
|
||||
(void) sout; (void) chain; (void) next;
|
||||
vlc_assert_unreachable ();
|
||||
}
|
||||
#endif /* !ENABLE_SOUT */
|
||||
|
||||
#ifndef ENABLE_VLM
|
||||
# include <vlc_vlm.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue