]> git.sesse.net Git - vlc/blobdiff - modules/codec/avcodec/avcodec.c
avcodec: change version-check to 52.69.1 for libvpx encoding settings
[vlc] / modules / codec / avcodec / avcodec.c
index ba2cbdefb9f8a16b6163bb5cdfb56f7ccef0d13f..0a242bd0a212f78cae962a93caca3fdd980c2ebb 100644 (file)
@@ -48,8 +48,8 @@
 #include "avcodec.h"
 #include "avutil.h"
 
-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 51, 48, 0 )
-#   error You must update libavcodec to a version >= 51.48.0
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 2, 0 )
+#   error You must update libavcodec to a version >= 52.2.0
 #elif LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 25, 0 )
 #   warning You should update libavcodec to get subtitle support
 #endif
@@ -87,7 +87,7 @@ static const char *const enc_hq_list_text[] = {
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-#define MODULE_DESCRIPTION N_( "Various audio and video decoders/encoders" \
+#define MODULE_DESCRIPTION N_( "Various audio and video decoders/encoders " \
         "delivered by the FFmpeg library. This includes (MS)MPEG4, DivX, SV1,"\
         "H261, H263, H264, WMV, WMA, AAC, AMR, DV, MJPEG and other codecs")
 
@@ -95,7 +95,7 @@ vlc_module_begin ()
     set_shortname( "FFmpeg")
     add_shortcut( "ffmpeg" )
     set_category( CAT_INPUT )
-    set_subcategory( SUBCAT_INPUT_SCODEC )
+    set_subcategory( SUBCAT_INPUT_VCODEC )
     /* decoder main module */
 #if defined(MODULE_NAME_is_ffmpegaltivec) \
      || (defined(CAN_COMPILE_ALTIVEC) && !defined(NO_ALTIVEC_IN_FFMPEG))
@@ -140,6 +140,10 @@ vlc_module_begin ()
 #if defined(HAVE_AVCODEC_VAAPI) || defined(HAVE_AVCODEC_DXVA2)
     add_bool( "ffmpeg-hw", false, NULL, HW_TEXT, HW_LONGTEXT, true )
 #endif
+#if defined(FF_THREAD_FRAME)
+    add_integer( "ffmpeg-threads", 0, NULL, THREADS_TEXT, THREADS_LONGTEXT, true );
+#endif
+
 
 #ifdef ENABLE_SOUT
     /* encoder submodule */
@@ -321,7 +325,14 @@ static int OpenDecoder( vlc_object_t *p_this )
         i_result = VLC_EGENERIC;
     }
 
-    if( i_result == VLC_SUCCESS ) p_dec->p_sys->i_cat = i_cat;
+    if( i_result == VLC_SUCCESS )
+    {
+        p_dec->p_sys->i_cat = i_cat;
+        if( p_context->profile != FF_PROFILE_UNKNOWN)
+            p_dec->fmt_in.i_profile = p_context->profile;
+        if( p_context->level != FF_LEVEL_UNKNOWN)
+            p_dec->fmt_in.i_level = p_context->level;
+    }
 
     return i_result;
 }