[vlc-devel] commit: Fix ffmpeg when !ENABLE_SOUT ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu May 1 19:40:35 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu May  1 20:27:14 2008 +0300| [bbb0de54422babf3b764f8ee92841fd45ad0d3d1]

Fix ffmpeg when !ENABLE_SOUT

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bbb0de54422babf3b764f8ee92841fd45ad0d3d1
---

 modules/codec/ffmpeg/Modules.am |   12 ++++++++++--
 modules/codec/ffmpeg/ffmpeg.c   |    6 ++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/modules/codec/ffmpeg/Modules.am b/modules/codec/ffmpeg/Modules.am
index 921f0b8..ea38699 100644
--- a/modules/codec/ffmpeg/Modules.am
+++ b/modules/codec/ffmpeg/Modules.am
@@ -6,12 +6,20 @@ SOURCES_ffmpeg = \
 	video_filter.c \
 	deinterlace.c \
 	chroma.c \
-	encoder.c \
 	postprocess.c \
 	demux.c \
-	mux.c \
 	scale.c \
 	$(NULL)
+EXTRA_libffmpeg_plugin_la_SOURCES = \
+	mux.c \
+	encoder.c \
+	$(NULL)
+
+if ENABLE_SOUT
+SOURCES_ffmpeg += mux.c encoder.c
+endif
+libvlc_LTLIBRARIES += $(LTLIBffmpeg)
+EXTRA_LTLIBRARIES += libffmpeg_plugin.la
 
 SOURCES_ffmpegaltivec = \
 	ffmpeg.c \
diff --git a/modules/codec/ffmpeg/ffmpeg.c b/modules/codec/ffmpeg/ffmpeg.c
index 66fc99c..28bb32a 100644
--- a/modules/codec/ffmpeg/ffmpeg.c
+++ b/modules/codec/ffmpeg/ffmpeg.c
@@ -73,8 +73,10 @@ static int  nloopf_list[] = { 0, 1, 2, 3, 4 };
 static const char *nloopf_list_text[] =
   { N_("None"), N_("Non-ref"), N_("Bidir"), N_("Non-key"), N_("All") };
 
+#ifdef ENABLE_SOUT
 static const char *enc_hq_list[] = { "rd", "bits", "simple" };
 static const char *enc_hq_list_text[] = { N_("rd"), N_("bits"), N_("simple") };
+#endif
 
 #if defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
 static int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
@@ -139,6 +141,7 @@ vlc_module_begin();
     add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
                  true );
 
+#ifdef ENABLE_SOUT
     /* encoder submodule */
     add_submodule();
     set_section( N_("Encoding") , NULL );
@@ -203,6 +206,7 @@ vlc_module_begin();
     add_string( ENC_CFG_PREFIX "aac-profile", "main", NULL,
                 ENC_PROFILE_TEXT, ENC_PROFILE_LONGTEXT, true );
 #endif
+#endif /* ENABLE_SOUT */
 
 #if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
 
@@ -212,6 +216,7 @@ vlc_module_begin();
     set_capability( "demux", 2 );
     set_callbacks( E_(OpenDemux), E_(CloseDemux) );
 
+#ifdef ENABLE_SOUT
     /* mux submodule */
     add_submodule();
     set_description( _("FFmpeg muxer" ) );
@@ -220,6 +225,7 @@ vlc_module_begin();
                 MUX_LONGTEXT, true );
     set_callbacks( E_(OpenMux), E_(CloseMux) );
 #endif
+#endif
 
 #if defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
     /* video filter submodule */




More information about the vlc-devel mailing list