[vlc-commits] [Git][videolan/vlc][master] 8 commits: schroedinger: disable video encoder if sout is disabled

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Apr 23 11:20:51 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ecb7a61e by Steve Lhomme at 2024-04-23T09:15:06+00:00
schroedinger: disable video encoder if sout is disabled

- - - - -
70f44994 by Steve Lhomme at 2024-04-23T09:15:06+00:00
png: disable video encoder if sout is disabled

- - - - -
329fc1bb by Steve Lhomme at 2024-04-23T09:15:06+00:00
jpeg: disable video encoder if sout is disabled

- - - - -
eab6de4d by Steve Lhomme at 2024-04-23T09:15:06+00:00
omxil: disable video encoder if sout is disabled

- - - - -
bf434537 by Steve Lhomme at 2024-04-23T09:15:06+00:00
dmo: disable audio/video encoders if sout is disabled

- - - - -
90cdc592 by Steve Lhomme at 2024-04-23T09:15:06+00:00
mft: disable audio/video encoders if sout is disabled

- - - - -
a264d136 by Steve Lhomme at 2024-04-23T09:15:06+00:00
codec: don't build modules that only contain video encoders if sout is disabled

This is already the case for many of them.

- - - - -
ff1773cc by Steve Lhomme at 2024-04-23T09:15:06+00:00
codec: don't build modules that only contain audio encoders if sout is disabled

This is already the case for many of them.

- - - - -


7 changed files:

- modules/codec/Makefile.am
- modules/codec/dmo/dmo.c
- modules/codec/jpeg.c
- modules/codec/mft.cpp
- modules/codec/omxil/omxil.c
- modules/codec/png.c
- modules/codec/schroedinger.c


Changes:

=====================================
modules/codec/Makefile.am
=====================================
@@ -524,7 +524,9 @@ libx265_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x265)
 libx265_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_x265) -rpath '$(codecdir)'
 libx265_plugin_la_LIBADD = $(LIBS_x265)
 EXTRA_LTLIBRARIES += libx265_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx265)
+endif
 
 libx262_plugin_la_SOURCES = codec/x264.c
 libx262_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_X262
@@ -532,7 +534,9 @@ libx262_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x262)
 libx262_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS) -rpath '$(codecdir)'
 libx262_plugin_la_LIBADD = $(LIBS_x262) $(LIBM)
 EXTRA_LTLIBRARIES += libx262_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx262)
+endif
 
 libx264_plugin_la_SOURCES = codec/x264.c
 libx264_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_x264) -DPLUGIN_X264
@@ -540,7 +544,9 @@ libx264_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x264)
 libx264_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS) -rpath '$(codecdir)'
 libx264_plugin_la_LIBADD = $(LIBS_x264) $(LIBM)
 EXTRA_LTLIBRARIES += libx264_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx264)
+endif
 
 libx26410b_plugin_la_SOURCES = codec/x264.c
 libx26410b_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_X264_10B
@@ -548,7 +554,9 @@ libx26410b_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x26410b)
 libx26410b_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS) -rpath '$(codecdir)'
 libx26410b_plugin_la_LIBADD = $(LIBS_x26410b) $(LIBM)
 EXTRA_LTLIBRARIES += libx26410b_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx26410b)
+endif
 
 
 ### Misc encoders ###
@@ -558,13 +566,17 @@ libfdkaac_plugin_la_CFLAGS = $(AM_CFLAGS) $(FDKAAC_CFLAGS)
 libfdkaac_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
 libfdkaac_plugin_la_LIBADD = $(FDKAAC_LIBS)
 EXTRA_LTLIBRARIES += libfdkaac_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBfdkaac)
+endif
 
 libshine_plugin_la_SOURCES = codec/shine.c
 libshine_plugin_la_CFLAGS = $(AM_CFLAGS) $(SHINE_CFLAGS)
 libshine_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' $(SHINE_LIBS)
 EXTRA_LTLIBRARIES += libshine_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBshine)
+endif
 
 libvpx_plugin_la_SOURCES = codec/vpx.c
 libvpx_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
@@ -599,7 +611,9 @@ librav1e_plugin_la_CFLAGS = $(AM_CFLAGS) $(RAV1E_CFLAGS)
 librav1e_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
 librav1e_plugin_la_LIBADD = $(RAV1E_LIBS)
 EXTRA_LTLIBRARIES += librav1e_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBrav1e)
+endif
 
 libtwolame_plugin_la_SOURCES = codec/twolame.c
 libtwolame_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DLIBTWOLAME_STATIC
@@ -607,7 +621,9 @@ libtwolame_plugin_la_CFLAGS = $(AM_CFLAGS) $(TWOLAME_CFLAGS)
 libtwolame_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
 libtwolame_plugin_la_LIBADD = $(TWOLAME_LIBS) $(LIBM)
 EXTRA_LTLIBRARIES += libtwolame_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBtwolame)
+endif
 
 libdav1d_plugin_la_SOURCES = codec/dav1d.c \
 	packetizer/av1_obu.c packetizer/av1_obu.h


=====================================
modules/codec/dmo/dmo.c
=====================================
@@ -57,10 +57,12 @@ static int  DecoderOpen  ( vlc_object_t * );
 static void DecoderClose ( vlc_object_t * );
 static int DecodeBlock ( decoder_t *, block_t * );
 static void *DecoderThread( void * );
+#ifdef ENABLE_SOUT
 static void EncoderClose ( encoder_t * );
 static block_t *EncodeBlock( encoder_t *, void * );
 
 static int  EncOpen  ( vlc_object_t * );
+#endif // !ENABLE_SOUT
 
 static int LoadDMO( vlc_object_t *, HINSTANCE *, IMediaObject **,
                     const es_format_t *, bool );
@@ -1000,6 +1002,7 @@ static void *DecoderThread( void *data )
 }
 
 
+#ifdef ENABLE_SOUT
 /****************************************************************************
  * Encoder descriptor declaration
  ****************************************************************************/
@@ -1623,6 +1626,7 @@ void EncoderClose( encoder_t *p_enc )
 
     free( p_sys );
 }
+#endif // !ENABLE_SOUT
 
 vlc_module_begin ()
     set_description( N_("DirectMedia Object decoder") )
@@ -1636,6 +1640,7 @@ vlc_module_begin ()
     set_capability( "audio decoder", 1 )
     set_callbacks(DecoderOpen, DecoderClose)
 
+#ifdef ENABLE_SOUT
     add_submodule ()
     set_description( N_("DirectMedia Object encoder") )
     add_shortcut( "dmo" )
@@ -1647,4 +1652,5 @@ vlc_module_begin ()
     add_shortcut( "dmo" )
     set_capability( "audio encoder", 10 )
     set_callback( EncoderOpenAudio )
+#endif
 vlc_module_end ()


=====================================
modules/codec/jpeg.c
=====================================
@@ -115,6 +115,7 @@ vlc_module_begin()
     set_callbacks(OpenDecoder, CloseDecoder)
     add_shortcut("jpeg")
 
+#ifdef ENABLE_SOUT
     /* video encoder submodule */
     add_submodule()
     add_shortcut("jpeg")
@@ -124,6 +125,7 @@ vlc_module_begin()
     set_callback(OpenEncoder)
     add_integer_with_range(ENC_CFG_PREFIX "quality", 95, 0, 100,
                            ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT)
+#endif
     /* image encoder submodule */
     add_submodule()
     add_shortcut("jpeg")


=====================================
modules/codec/mft.cpp
=====================================
@@ -94,6 +94,7 @@ vlc_module_begin()
     set_capability("audio decoder", 1)
     set_callbacks(Open, Close)
 
+#ifdef ENABLE_SOUT
     add_submodule()
     add_shortcut("mft")
     set_capability("audio encoder", 10) // less than DMO for now
@@ -103,6 +104,7 @@ vlc_module_begin()
     add_shortcut("mft")
     set_capability("video encoder", 10) // less than DMO for now
     set_callback(OpenMFTVideoEncoder)
+#endif
 vlc_module_end()
 
 class mft_sys_t : public vlc_mft_ref
@@ -1933,6 +1935,7 @@ HRESULT mft_enc_video::ProcessOutput(vlc_logger *logger, block_t * & output)
     return S_OK;
 }
 
+#ifdef ENABLE_SOUT
 static block_t *EncodeVideoAsync(encoder_t *p_enc, picture_t *p_pic)
 {
     mft_enc_video *p_sys = static_cast<mft_enc_video*>(p_enc->p_sys);
@@ -2582,6 +2585,7 @@ error:
     EncoderClose(p_enc);
     return VLC_ENOTSUP;
 }
+#endif // !ENABLE_SOUT
 
 static int Open(vlc_object_t *p_this)
 {


=====================================
modules/codec/omxil/omxil.c
=====================================
@@ -94,11 +94,13 @@ vlc_module_begin ()
     set_callbacks(OpenDecoder, CloseGeneric)
 #endif
 
+#ifdef ENABLE_SOUT
     add_submodule ()
     set_section( N_("Encoding") , NULL )
     set_description( N_("Video encoder (using OpenMAX IL)") )
     set_capability( "video encoder", 0 )
     set_callback( OpenEncoder )
+#endif
 vlc_module_end ()
 
 /*****************************************************************************
@@ -895,6 +897,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     return VLC_SUCCESS;
 }
 
+#ifdef ENABLE_SOUT
 static void CloseEncoder( encoder_t *p_enc )
 {
     CloseGeneric( VLC_OBJECT(p_enc) );
@@ -923,6 +926,7 @@ static int OpenEncoder( vlc_object_t *p_this )
 
     return VLC_SUCCESS;
 }
+#endif
 
 /*****************************************************************************
  * OpenGeneric: Create the generic decoder/encoder instance
@@ -1627,6 +1631,7 @@ error:
     return VLCDEC_SUCCESS;
 }
 
+#ifdef ENABLE_SOUT
 /*****************************************************************************
  * EncodeVideo: Called to encode one frame
  *****************************************************************************/
@@ -1724,6 +1729,7 @@ error:
     p_sys->b_error = true;
     return NULL;
 }
+#endif // !ENABLE_SOUT
 
 /*****************************************************************************
  * CloseGeneric: omxil decoder destruction


=====================================
modules/codec/png.c
=====================================
@@ -91,6 +91,7 @@ vlc_module_begin ()
     set_callback( OpenDecoder )
     add_shortcut( "png" )
 
+#ifdef ENABLE_SOUT
     /* video encoder submodule */
     add_submodule()
     add_shortcut("png")
@@ -98,6 +99,7 @@ vlc_module_begin ()
     set_description(N_("PNG video encoder"))
     set_capability("video encoder", 1000)
     set_callback(OpenEncoder)
+#endif
 
     /* image encoder submodule */
     add_submodule()


=====================================
modules/codec/schroedinger.c
=====================================
@@ -47,6 +47,7 @@
  *****************************************************************************/
 static int        OpenDecoder  ( vlc_object_t * );
 static void       CloseDecoder ( vlc_object_t * );
+#ifdef ENABLE_SOUT
 static int        OpenEncoder  ( vlc_object_t * );
 static void       CloseEncoder ( encoder_t * );
 
@@ -354,6 +355,7 @@ static const char *const ppsz_enc_options[] = {
     ENC_ME_GLOBAL_MOTION, ENC_ME_PHASECORR, ENC_SCD, ENC_FORCE_PROFILE,
     NULL
 };
+#endif // !ENABLE_SOUT
 
 
 /* Module declaration */
@@ -366,6 +368,7 @@ vlc_module_begin ()
     set_callbacks( OpenDecoder, CloseDecoder )
     add_shortcut( "schroedinger" )
 
+#ifdef ENABLE_SOUT
     /* encoder */
     add_submodule()
     set_section( N_("Encoding") , NULL )
@@ -518,6 +521,7 @@ vlc_module_begin ()
     add_string( ENC_CFG_PREFIX ENC_FORCE_PROFILE, NULL,
                 ENC_FORCE_PROFILE_TEXT, NULL )
     change_string_list( enc_profile_list, enc_profile_list_text )
+#endif // !ENABLE_SOUT
 
 vlc_module_end ()
 
@@ -871,6 +875,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
     }
 }
 
+#ifdef ENABLE_SOUT
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -1604,3 +1609,4 @@ static void CloseEncoder( encoder_t *p_enc )
     /* We need to reset p_sys since CloseEncoder is also called during error. */
     p_enc->p_sys = NULL;
 }
+#endif // !ENABLE_SOUT



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dfc16c8578d9e235cec8ae36bf169df48670d6ca...ff1773cc4a333637e50226a12b8b197602daeffb

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dfc16c8578d9e235cec8ae36bf169df48670d6ca...ff1773cc4a333637e50226a12b8b197602daeffb
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