]> git.sesse.net Git - vlc/blobdiff - modules/codec/avcodec/avcodec.h
Mark ffmpeg-fast and ffmpeg-hw as normal preferences.
[vlc] / modules / codec / avcodec / avcodec.h
index ef21d0bde19cd91c639039052f5b9adae980be4e..0449f51fa6382c99e0efdb7fd7a9dcb03d35c506 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include "chroma.h"
 /* VLC <-> avcodec tables */
 int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
                     int *pi_ffmpeg_codec, const char **ppsz_name );
 int GetVlcFourcc( int i_ffmpeg_codec, int *pi_cat,
                   vlc_fourcc_t *pi_fourcc, const char **ppsz_name );
-int TestFfmpegChroma( const int i_ffmpeg_id, const vlc_fourcc_t i_vlc_fourcc );
-int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fmt );
-int GetVlcChroma( video_format_t *fmt, const int i_ffmpeg_chroma );
-
+void GetVlcAudioFormat( vlc_fourcc_t *, unsigned *pi_bits, int i_sample_fmt );
 
 picture_t * DecodeVideo    ( decoder_t *, block_t ** );
 aout_buffer_t * DecodeAudio( decoder_t *, block_t ** );
+subpicture_t *DecodeSubtitle( decoder_t *p_dec, block_t ** );
 
 /* Video encoder module */
 int  OpenEncoder ( vlc_object_t * );
@@ -58,6 +57,14 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
                   AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
 void EndAudioDec( decoder_t *p_dec );
 
+/* Subtitle Decoder */
+int InitSubtitleDec( decoder_t *p_dec, AVCodecContext *p_context,
+                     AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
+void EndSubtitleDec( decoder_t *p_dec );
+
+/* Initialize decoder */
+int ffmpeg_OpenCodec( decoder_t *p_dec );
+
 /*****************************************************************************
  * Module descriptor help strings
  *****************************************************************************/
@@ -67,7 +74,7 @@ void EndAudioDec( decoder_t *p_dec );
 
 #define ERROR_TEXT N_("Error resilience")
 #define ERROR_LONGTEXT N_( \
-    "Ffmpeg can do error resilience.\n" \
+    "FFmpeg can do error resilience.\n" \
     "However, with a buggy encoder (such as the ISO MPEG-4 encoder from M$) " \
     "this can produce a lot of errors.\n" \
     "Valid values range from 0 to 4 (0 disables all errors resilience).")
@@ -106,7 +113,7 @@ void EndAudioDec( decoder_t *p_dec );
     "(-1=None, 0=Default, 1=B-frames, 2=P-frames, 3=B+P frames, 4=all frames)." )
 
 #define DEBUG_TEXT N_( "Debug mask" )
-#define DEBUG_LONGTEXT N_( "Set ffmpeg debug mask" )
+#define DEBUG_LONGTEXT N_( "Set FFmpeg debug mask" )
 
 /* TODO: Use a predefined list, with 0,1,2,4,7 */
 #define VISMV_TEXT N_( "Visualize motion vectors" )
@@ -130,6 +137,9 @@ void EndAudioDec( decoder_t *p_dec );
 #define HW_TEXT N_("Hardware decoding")
 #define HW_LONGTEXT N_("This allows hardware decoding when available.")
 
+#define THREADS_TEXT N_( "Threads" )
+#define THREADS_LONGTEXT N_( "Number of threads used for decoding, 0 meaning auto" )
+
 /*
  * Encoder options
  */
@@ -258,6 +268,11 @@ void EndAudioDec( decoder_t *p_dec );
 #   define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
 #endif
 
-/* Uncomment it to enable compilation with vaapi (you also must change the build
+#if defined(FF_THREAD_FRAME)
+#   define HAVE_AVCODEC_MT
+#endif
+
+/* Uncomment it to enable compilation with vaapi/dxva2 (you also must change the build
  * system) */
 //#define HAVE_AVCODEC_VAAPI 1
+//#define HAVE_AVCODEC_DXVA2 1