Commit 475451fd authored by Jean-Paul Saman's avatar Jean-Paul Saman

modules/codec/x264.c: allow ubuntu v10.04 version x264

parent 4a16e040
diff --git a/configure.ac b/configure.ac
index c8db554..2110447 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2532,7 +2532,7 @@ dnl
AC_ARG_ENABLE(avcodec,
[ --enable-avcodec libavcodec codec (default enabled)])
AS_IF([test "${enable_avcodec}" != "no"], [
- PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil],
+ PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.20.0 libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
@@ -3009,7 +3009,7 @@ if test "${enable_x264}" != "no"; then
AC_MSG_ERROR([the specified tree doesn't have x264.h])
fi
else
- PKG_CHECK_MODULES(X264,x264 >= 0.86, [
+ PKG_CHECK_MODULES(X264,x264 >= 0.27, [
VLC_ADD_PLUGIN([x264])
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
@@ -3023,7 +3023,7 @@ if test "${enable_x264}" != "no"; then
fi
],[
if test "${enable_x264}" = "yes"; then
- AC_MSG_ERROR([Could not find libx264 >= 0.86 on your system: you may get it from http://www.videolan.org/x264.html])
+ AC_MSG_ERROR([Could not find libx264 >= 0.27 on your system: you may get it from http://www.videolan.org/x264.html])
fi
])
LDFLAGS="${LDFLAGS_save}"
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 673422d..6b01ecc 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -479,9 +479,11 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "level", "0", LEVEL_TEXT,
LEVEL_LONGTEXT, false )
+#if X264_BUILD >= 86
add_string( SOUT_CFG_PREFIX "profile", "high", PROFILE_TEXT,
PROFILE_LONGTEXT, false )
change_string_list( x264_profile_names, x264_profile_names, 0 );
+#endif
add_bool( SOUT_CFG_PREFIX "interlaced", false, INTERLACED_TEXT, INTERLACED_LONGTEXT,
false )
@@ -677,10 +679,12 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "stats", "x264_2pass.log", STATS_TEXT,
STATS_LONGTEXT, false )
+#if X264_BUILD >= 86
add_string( SOUT_CFG_PREFIX "preset", NULL , PRESET_TEXT , PRESET_TEXT, false )
change_string_list( x264_preset_names, x264_preset_names, 0 );
add_string( SOUT_CFG_PREFIX "tune", NULL , TUNE_TEXT, TUNE_TEXT, false )
change_string_list( x264_tune_names, x264_tune_names, 0 );
+#endif
vlc_module_end ()
@@ -761,6 +765,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->p_sei = NULL;
x264_param_default( &p_sys->param );
+#if X264_BUILD >= 86
char *psz_preset = var_GetString( p_enc, SOUT_CFG_PREFIX "preset" );
char *psz_tune = var_GetString( p_enc, SOUT_CFG_PREFIX "tune" );
if( *psz_preset == '\0' )
@@ -771,6 +776,8 @@ static int Open ( vlc_object_t *p_this )
x264_param_default_preset( &p_sys->param, psz_preset, psz_tune );
free( psz_preset );
free( psz_tune );
+#endif
+
p_sys->param.i_width = p_enc->fmt_in.video.i_width;
p_sys->param.i_height = p_enc->fmt_in.video.i_height;
@@ -1159,6 +1166,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->param.rc.i_vbv_buffer_size /= p_sys->param.i_fps_num;
}
+#if X264_BUILD >= 86
/* Check if user has given some profile (baseline,main,high) to limit
* settings, and apply those*/
psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" );
@@ -1181,7 +1189,7 @@ static int Open ( vlc_object_t *p_this )
/* high profile don't restrict stuff*/
}
free( psz_val );
-
+#endif
unsigned i_cpu = vlc_CPU();
if( !(i_cpu & CPU_CAPABILITY_MMX) )
052_as-needed.diff 0001-modules-codec-x264.c-relax-requirement-to-X264_BUILD.patch
101_certificates_paths.diff
102_dejavu_font.diff
104_notify.diff
200_osdmenu_paths.diff
300_manpage_syntax.diff
#401_i420_mmx_pic.diff
501_decrease_alsa_buffer.diff
502_fix_typo.patch
#519-Typedef-changes-from-xulrunner-1.9.1.patch
#520-Don-t-hardcode-OJI-define-deprecated-xith-libxul-1.9.patch
#521-Untracked-API-change-utf8-to-UTF8.patch
#522-Mozilla-do-not-hard-code-autoconf-file-descriptors.patch
#523-Require-xul-1.9.2-explicitly.patch
#524-Mozilla-More-fixes-for-XulRunner-1.9.2.patch
#525-Mozilla-more-fixes.patch
#600-drop-OJI-xul-192.patch
#CVE-2010-2937.patch
#0001-mux-mpeg-ts.c-Generate-splice-points.patch
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment