Commit 23b13015 authored by Jean-Paul Saman's avatar Jean-Paul Saman

x264: Relax requirement to X264_BUILD >= 83 iso 86

Some distributions do not use x264 >= 86 yet.
parent efcf59a3
...@@ -3123,7 +3123,7 @@ if test "${enable_x264}" != "no"; then ...@@ -3123,7 +3123,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.83, [
VLC_ADD_PLUGIN([x264]) VLC_ADD_PLUGIN([x264])
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}]) VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
...@@ -3143,7 +3143,7 @@ if test "${enable_x264}" != "no"; then ...@@ -3143,7 +3143,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.83 on your system: you may get it from http://www.videolan.org/x264.html])
fi fi
]) ])
LDFLAGS="${LDFLAGS_save}" LDFLAGS="${LDFLAGS_save}"
......
...@@ -478,9 +478,11 @@ vlc_module_begin () ...@@ -478,9 +478,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 )
...@@ -676,11 +678,12 @@ vlc_module_begin () ...@@ -676,11 +678,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 ()
/***************************************************************************** /*****************************************************************************
...@@ -756,6 +759,8 @@ static int Open ( vlc_object_t *p_this ) ...@@ -756,6 +759,8 @@ 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' )
...@@ -766,6 +771,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -766,6 +771,7 @@ 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;
...@@ -1154,6 +1160,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -1154,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" );
...@@ -1176,7 +1183,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -1176,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