Commit f88ff9a9 authored by Jean-Paul Saman's avatar Jean-Paul Saman

modules/codec/x264.c: relax requirement to X264_BUILD >= 0.86

X264 requires X264_BUILD version >= 83 now and fix a few place
where X264_BUILD >= 86 are required.
parent 6a4df192
...@@ -3007,7 +3007,7 @@ if test "${enable_x264}" != "no"; then ...@@ -3007,7 +3007,7 @@ if test "${enable_x264}" != "no"; then
AC_MSG_ERROR([the specified tree doesn't have x264.h]) AC_MSG_ERROR([the specified tree doesn't have x264.h])
fi fi
else else
PKG_CHECK_MODULES(X264,x264 >= 0.86, [ PKG_CHECK_MODULES(X264,x264 >= 0.27, [
VLC_ADD_PLUGIN([x264]) VLC_ADD_PLUGIN([x264])
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}]) VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
...@@ -3021,7 +3021,7 @@ if test "${enable_x264}" != "no"; then ...@@ -3021,7 +3021,7 @@ if test "${enable_x264}" != "no"; then
fi fi
],[ ],[
if test "${enable_x264}" = "yes"; then 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 fi
]) ])
LDFLAGS="${LDFLAGS_save}" LDFLAGS="${LDFLAGS_save}"
......
...@@ -477,9 +477,11 @@ vlc_module_begin () ...@@ -477,9 +477,11 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "level", "0", NULL, LEVEL_TEXT, add_string( SOUT_CFG_PREFIX "level", "0", NULL, LEVEL_TEXT,
LEVEL_LONGTEXT, false ) LEVEL_LONGTEXT, false )
#if X264_BUILD >= 86
add_string( SOUT_CFG_PREFIX "profile", "high", NULL, PROFILE_TEXT, add_string( SOUT_CFG_PREFIX "profile", "high", NULL, PROFILE_TEXT,
PROFILE_LONGTEXT, false ) PROFILE_LONGTEXT, false )
change_string_list( x264_profile_names, x264_profile_names, 0 ); change_string_list( x264_profile_names, x264_profile_names, 0 );
#endif
add_bool( SOUT_CFG_PREFIX "interlaced", false, NULL, INTERLACED_TEXT, INTERLACED_LONGTEXT, add_bool( SOUT_CFG_PREFIX "interlaced", false, NULL, INTERLACED_TEXT, INTERLACED_LONGTEXT,
false ) false )
...@@ -675,10 +677,12 @@ vlc_module_begin () ...@@ -675,10 +677,12 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "stats", "x264_2pass.log", NULL, STATS_TEXT, add_string( SOUT_CFG_PREFIX "stats", "x264_2pass.log", NULL, STATS_TEXT,
STATS_LONGTEXT, false ) STATS_LONGTEXT, false )
#if X264_BUILD >= 86
add_string( SOUT_CFG_PREFIX "preset", NULL , NULL, PRESET_TEXT , PRESET_TEXT, false ) add_string( SOUT_CFG_PREFIX "preset", NULL , NULL, PRESET_TEXT , PRESET_TEXT, false )
change_string_list( x264_preset_names, x264_preset_names, 0 ); change_string_list( x264_preset_names, x264_preset_names, 0 );
add_string( SOUT_CFG_PREFIX "tune", NULL , NULL, TUNE_TEXT, TUNE_TEXT, false ) add_string( SOUT_CFG_PREFIX "tune", NULL , NULL, TUNE_TEXT, TUNE_TEXT, false )
change_string_list( x264_tune_names, x264_tune_names, 0 ); change_string_list( x264_tune_names, x264_tune_names, 0 );
#endif
vlc_module_end () vlc_module_end ()
...@@ -755,6 +759,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -755,6 +759,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->psz_stat_name = NULL; p_sys->psz_stat_name = NULL;
x264_param_default( &p_sys->param ); x264_param_default( &p_sys->param );
#if X264_BUILD >= 86
char *psz_preset = var_GetString( p_enc, SOUT_CFG_PREFIX "preset" ); char *psz_preset = var_GetString( p_enc, SOUT_CFG_PREFIX "preset" );
char *psz_tune = var_GetString( p_enc, SOUT_CFG_PREFIX "tune" ); char *psz_tune = var_GetString( p_enc, SOUT_CFG_PREFIX "tune" );
if( *psz_preset == '\0' ) if( *psz_preset == '\0' )
...@@ -765,6 +770,8 @@ static int Open ( vlc_object_t *p_this ) ...@@ -765,6 +770,8 @@ static int Open ( vlc_object_t *p_this )
x264_param_default_preset( &p_sys->param, psz_preset, psz_tune ); x264_param_default_preset( &p_sys->param, psz_preset, psz_tune );
free( psz_preset ); free( psz_preset );
free( psz_tune ); free( psz_tune );
#endif
p_sys->param.i_width = p_enc->fmt_in.video.i_width; p_sys->param.i_width = p_enc->fmt_in.video.i_width;
p_sys->param.i_height = p_enc->fmt_in.video.i_height; p_sys->param.i_height = p_enc->fmt_in.video.i_height;
...@@ -1153,6 +1160,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -1153,6 +1160,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->param.rc.i_vbv_buffer_size /= p_sys->param.i_fps_num; 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 /* Check if user has given some profile (baseline,main,high) to limit
* settings, and apply those*/ * settings, and apply those*/
psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" ); psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" );
...@@ -1175,7 +1183,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -1175,7 +1183,7 @@ static int Open ( vlc_object_t *p_this )
/* high profile don't restrict stuff*/ /* high profile don't restrict stuff*/
} }
free( psz_val ); free( psz_val );
#endif
unsigned i_cpu = vlc_CPU(); unsigned i_cpu = vlc_CPU();
if( !(i_cpu & CPU_CAPABILITY_MMX) ) if( !(i_cpu & CPU_CAPABILITY_MMX) )
......
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