[vlc-commits] [Git][videolan/vlc][master] 6 commits: core: always build sout code
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Jun 20 08:55:14 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a65da7b2 by Thomas Guillem at 2023-06-20T08:39:23+00:00
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.
- - - - -
d3d8466d by Thomas Guillem at 2023-06-20T08:39:23+00:00
input: remove CAPABILITIES_RECORDABLE
It was not even used by the player.
- - - - -
d3a5f136 by Thomas Guillem at 2023-06-20T08:39:23+00:00
qt: always enable transcode dialogs
Since the core is now always built with sout support.
- - - - -
5c70cdcb by Thomas Guillem at 2023-06-20T08:39:23+00:00
test: always test stream_out_pcr_sync
It doesn't depend on sout modules.
- - - - -
9bcaec32 by Thomas Guillem at 2023-06-20T08:39:23+00:00
test: transcode: skip test if !ENABLE_SOUT
- - - - -
963a01e5 by Thomas Guillem at 2023-06-20T08:39:23+00:00
test: always test tls and transcode
These tests will be skipped if sout modules are not build.
Before this commit, those 2 tests were silently skipped.
After this commit, signal that these 2 tests are skipped.
- - - - -
10 changed files:
- modules/gui/qt/menus/menus.cpp
- src/Makefile.am
- src/input/decoder.c
- src/input/es_out.c
- src/input/input.c
- src/input/input_internal.h
- src/input/resource.c
- src/missing.c
- test/Makefile.am
- test/modules/stream_out/transcode.c
Changes:
=====================================
modules/gui/qt/menus/menus.cpp
=====================================
@@ -209,13 +209,11 @@ void VLCMenuBar::FileMenu(qt_intf_t *p_intf, QMenu *menu)
addDPStaticEntry( menu, qfut( I_PL_SAVE ), "", &DialogsProvider::savePlayingToPlaylist,
"Ctrl+Y" );
-#ifdef ENABLE_SOUT
addDPStaticEntry( menu, qtr( "Conve&rt / Save..." ), "",
&DialogsProvider::openAndTranscodingDialogs, "Ctrl+R" );
addDPStaticEntry( menu, qtr( "&Stream..." ),
":/menu/stream.svg", &DialogsProvider::openAndStreamingDialogs, "Ctrl+S" );
menu->addSeparator();
-#endif
action = addMPLStaticEntry( p_intf, menu, qtr( "Quit at the end of playlist" ), "",
&PlaylistControllerModel::playAndExitChanged );
=====================================
src/Makefile.am
=====================================
@@ -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 += \
=====================================
src/input/decoder.c
=====================================
@@ -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 )
=====================================
src/input/es_out.c
=====================================
@@ -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 );
=====================================
src/input/input.c
=====================================
@@ -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,13 +803,6 @@ 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 );
int i_attachment;
@@ -1275,10 +1266,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 +1316,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 +1801,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 +1829,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 +2349,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 +2379,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 +2787,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 );
=====================================
src/input/input_internal.h
=====================================
@@ -155,7 +155,6 @@ typedef enum input_event_type_e
#define VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1)
#define VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2)
#define VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3)
-#define VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4)
struct vlc_input_event_state
{
=====================================
src/input/resource.c
=====================================
@@ -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;
}
=====================================
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>
=====================================
test/Makefile.am
=====================================
@@ -51,18 +51,16 @@ check_PROGRAMS = \
test_modules_demux_timestamps_filter \
test_modules_demux_ts_pes \
test_modules_playlist_m3u \
+ test_modules_stream_out_pcr_sync \
+ test_modules_tls \
+ test_modules_stream_out_transcode \
$(NULL)
if HAVE_DARWIN
check_PROGRAMS += test_src_misc_image_cvpx
endif
-if ENABLE_SOUT
-check_PROGRAMS += test_modules_tls \
- test_modules_stream_out_transcode \
- test_modules_stream_out_pcr_sync
-endif
if UPDATE_CHECK
check_PROGRAMS += test_src_crypto_update
endif
=====================================
test/modules/stream_out/transcode.c
=====================================
@@ -403,6 +403,10 @@ VLC_EXPORT const vlc_plugin_cb vlc_static_modules[] = {
int main( int argc, char **argv )
{
(void)argc; (void)argv;
+#ifndef ENABLE_SOUT
+ (void) libvlc_playlist_play;
+ return 77;
+#endif
test_init();
const char * const args[] = {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1d17c9b56b2d8c16d14dcec1e02e96d5234e9157...963a01e57fbe3ca5fa36f13e248ae2a225c24e50
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1d17c9b56b2d8c16d14dcec1e02e96d5234e9157...963a01e57fbe3ca5fa36f13e248ae2a225c24e50
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list