Commit 7a4eb7be authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: replace gone CODEC_ID_* with AV_CODEC_ID_*

This is necessary to compile with libav.git HEAD or with contribs.
Streaming output still needs fixing.
parent cde81e52
...@@ -255,7 +255,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block ) ...@@ -255,7 +255,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
avcodec_flush_buffers( ctx ); avcodec_flush_buffers( ctx );
date_Set( &p_sys->end_date, 0 ); date_Set( &p_sys->end_date, 0 );
if( p_sys->i_codec_id == CODEC_ID_MP2 || p_sys->i_codec_id == CODEC_ID_MP3 ) if( p_sys->i_codec_id == AV_CODEC_ID_MP2 || p_sys->i_codec_id == AV_CODEC_ID_MP3 )
p_sys->i_reject_count = 3; p_sys->i_reject_count = 3;
goto end; goto end;
......
...@@ -392,10 +392,10 @@ int ffmpeg_OpenCodec( decoder_t *p_dec ) ...@@ -392,10 +392,10 @@ int ffmpeg_OpenCodec( decoder_t *p_dec )
if( p_sys->p_context->extradata_size <= 0 ) if( p_sys->p_context->extradata_size <= 0 )
{ {
if( p_sys->i_codec_id == CODEC_ID_VC1 || if( p_sys->i_codec_id == AV_CODEC_ID_VC1 ||
p_sys->i_codec_id == CODEC_ID_VORBIS || p_sys->i_codec_id == AV_CODEC_ID_VORBIS ||
p_sys->i_codec_id == CODEC_ID_THEORA || p_sys->i_codec_id == AV_CODEC_ID_THEORA ||
( p_sys->i_codec_id == CODEC_ID_AAC && ( p_sys->i_codec_id == AV_CODEC_ID_AAC &&
!p_dec->fmt_in.b_packetized ) ) !p_dec->fmt_in.b_packetized ) )
{ {
msg_Warn( p_dec, "waiting for extra data for codec %s", msg_Warn( p_dec, "waiting for extra data for codec %s",
...@@ -417,7 +417,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec ) ...@@ -417,7 +417,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec )
p_sys->p_context->block_align = p_dec->fmt_in.audio.i_blockalign; p_sys->p_context->block_align = p_dec->fmt_in.audio.i_blockalign;
p_sys->p_context->bit_rate = p_dec->fmt_in.i_bitrate; p_sys->p_context->bit_rate = p_dec->fmt_in.i_bitrate;
p_sys->p_context->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample; p_sys->p_context->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample;
if( p_sys->i_codec_id == CODEC_ID_ADPCM_G726 && if( p_sys->i_codec_id == AV_CODEC_ID_ADPCM_G726 &&
p_sys->p_context->bit_rate > 0 && p_sys->p_context->bit_rate > 0 &&
p_sys->p_context->sample_rate > 0) p_sys->p_context->sample_rate > 0)
p_sys->p_context->bits_per_coded_sample = p_sys->p_context->bit_rate / p_sys->p_context->bits_per_coded_sample = p_sys->p_context->bit_rate /
......
...@@ -145,19 +145,19 @@ typedef struct { ...@@ -145,19 +145,19 @@ typedef struct {
/* XXX Prefered modes must come first */ /* XXX Prefered modes must come first */
static const dxva2_mode_t dxva2_modes[] = { static const dxva2_mode_t dxva2_modes[] = {
/* MPEG-1/2 */ /* MPEG-1/2 */
{ "MPEG-2 variable-length decoder", &DXVA2_ModeMPEG2_VLD, CODEC_ID_MPEG2VIDEO }, { "MPEG-2 variable-length decoder", &DXVA2_ModeMPEG2_VLD, AV_CODEC_ID_MPEG2VIDEO },
{ "MPEG-2 & MPEG-1 variable-length decoder", &DXVA2_ModeMPEG2and1_VLD, CODEC_ID_MPEG2VIDEO }, { "MPEG-2 & MPEG-1 variable-length decoder", &DXVA2_ModeMPEG2and1_VLD, AV_CODEC_ID_MPEG2VIDEO },
{ "MPEG-2 motion compensation", &DXVA2_ModeMPEG2_MoComp, 0 }, { "MPEG-2 motion compensation", &DXVA2_ModeMPEG2_MoComp, 0 },
{ "MPEG-2 inverse discrete cosine transform", &DXVA2_ModeMPEG2_IDCT, 0 }, { "MPEG-2 inverse discrete cosine transform", &DXVA2_ModeMPEG2_IDCT, 0 },
{ "MPEG-1 variable-length decoder", &DXVA2_ModeMPEG1_VLD, 0 }, { "MPEG-1 variable-length decoder", &DXVA2_ModeMPEG1_VLD, 0 },
/* H.264 */ /* H.264 */
{ "H.264 variable-length decoder, film grain technology", &DXVA2_ModeH264_F, CODEC_ID_H264 }, { "H.264 variable-length decoder, film grain technology", &DXVA2_ModeH264_F, AV_CODEC_ID_H264 },
{ "H.264 variable-length decoder, no film grain technology (Intel ClearVideo)", &DXVADDI_Intel_ModeH264_E, CODEC_ID_H264 }, { "H.264 variable-length decoder, no film grain technology (Intel ClearVideo)", &DXVADDI_Intel_ModeH264_E, AV_CODEC_ID_H264 },
{ "H.264 variable-length decoder, no film grain technology", &DXVA2_ModeH264_E, CODEC_ID_H264 }, { "H.264 variable-length decoder, no film grain technology", &DXVA2_ModeH264_E, AV_CODEC_ID_H264 },
{ "H.264 variable-length decoder, no film grain technology, FMO/ASO", &DXVA_ModeH264_VLD_WithFMOASO_NoFGT, CODEC_ID_H264 }, { "H.264 variable-length decoder, no film grain technology, FMO/ASO", &DXVA_ModeH264_VLD_WithFMOASO_NoFGT, AV_CODEC_ID_H264 },
{ "H.264 variable-length decoder, no film grain technology, Flash", &DXVA_ModeH264_VLD_NoFGT_Flash, CODEC_ID_H264 }, { "H.264 variable-length decoder, no film grain technology, Flash", &DXVA_ModeH264_VLD_NoFGT_Flash, AV_CODEC_ID_H264 },
{ "H.264 inverse discrete cosine transform, film grain technology", &DXVA2_ModeH264_D, 0 }, { "H.264 inverse discrete cosine transform, film grain technology", &DXVA2_ModeH264_D, 0 },
{ "H.264 inverse discrete cosine transform, no film grain technology", &DXVA2_ModeH264_C, 0 }, { "H.264 inverse discrete cosine transform, no film grain technology", &DXVA2_ModeH264_C, 0 },
...@@ -176,10 +176,10 @@ static const dxva2_mode_t dxva2_modes[] = { ...@@ -176,10 +176,10 @@ static const dxva2_mode_t dxva2_modes[] = {
{ "Windows Media Video 9 post processing", &DXVA2_ModeWMV9_A, 0 }, { "Windows Media Video 9 post processing", &DXVA2_ModeWMV9_A, 0 },
/* VC-1 */ /* VC-1 */
{ "VC-1 variable-length decoder", &DXVA2_ModeVC1_D, CODEC_ID_VC1 }, { "VC-1 variable-length decoder", &DXVA2_ModeVC1_D, AV_CODEC_ID_VC1 },
{ "VC-1 variable-length decoder", &DXVA2_ModeVC1_D, CODEC_ID_WMV3 }, { "VC-1 variable-length decoder", &DXVA2_ModeVC1_D, AV_CODEC_ID_WMV3 },
{ "VC-1 variable-length decoder", &DXVA2_ModeVC1_D2010, CODEC_ID_VC1 }, { "VC-1 variable-length decoder", &DXVA2_ModeVC1_D2010, AV_CODEC_ID_VC1 },
{ "VC-1 variable-length decoder", &DXVA2_ModeVC1_D2010, CODEC_ID_WMV3 }, { "VC-1 variable-length decoder", &DXVA2_ModeVC1_D2010, AV_CODEC_ID_WMV3 },
{ "VC-1 variable-length decoder 2 (Intel)", &DXVA_Intel_VC1_ClearVideo_2, 0 }, { "VC-1 variable-length decoder 2 (Intel)", &DXVA_Intel_VC1_ClearVideo_2, 0 },
{ "VC-1 variable-length decoder (Intel)", &DXVA_Intel_VC1_ClearVideo, 0 }, { "VC-1 variable-length decoder (Intel)", &DXVA_Intel_VC1_ClearVideo, 0 },
...@@ -865,7 +865,7 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va, ...@@ -865,7 +865,7 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va,
va->surface_width = (fmt->i_width + 15) & ~15; va->surface_width = (fmt->i_width + 15) & ~15;
va->surface_height = (fmt->i_height + 15) & ~15; va->surface_height = (fmt->i_height + 15) & ~15;
switch (codec_id) { switch (codec_id) {
case CODEC_ID_H264: case AV_CODEC_ID_H264:
va->surface_count = 16 + 1; va->surface_count = 16 + 1;
break; break;
default: default:
...@@ -950,7 +950,7 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va, ...@@ -950,7 +950,7 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va,
int score; int score;
if (cfg->ConfigBitstreamRaw == 1) if (cfg->ConfigBitstreamRaw == 1)
score = 1; score = 1;
else if (codec_id == CODEC_ID_H264 && cfg->ConfigBitstreamRaw == 2) else if (codec_id == AV_CODEC_ID_H264 && cfg->ConfigBitstreamRaw == 2)
score = 2; score = 2;
else else
continue; continue;
......
...@@ -204,19 +204,19 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -204,19 +204,19 @@ int OpenEncoder( vlc_object_t *p_this )
if( p_enc->fmt_out.i_codec == VLC_CODEC_MP3 ) if( p_enc->fmt_out.i_codec == VLC_CODEC_MP3 )
{ {
i_cat = AUDIO_ES; i_cat = AUDIO_ES;
i_codec_id = CODEC_ID_MP3; i_codec_id = AV_CODEC_ID_MP3;
psz_namecodec = "MPEG I/II Layer 3"; psz_namecodec = "MPEG I/II Layer 3";
} }
else if( p_enc->fmt_out.i_codec == VLC_CODEC_MP2 ) else if( p_enc->fmt_out.i_codec == VLC_CODEC_MP2 )
{ {
i_cat = AUDIO_ES; i_cat = AUDIO_ES;
i_codec_id = CODEC_ID_MP2; i_codec_id = AV_CODEC_ID_MP2;
psz_namecodec = "MPEG I/II Layer 2"; psz_namecodec = "MPEG I/II Layer 2";
} }
else if( p_enc->fmt_out.i_codec == VLC_CODEC_MP1V ) else if( p_enc->fmt_out.i_codec == VLC_CODEC_MP1V )
{ {
i_cat = VIDEO_ES; i_cat = VIDEO_ES;
i_codec_id = CODEC_ID_MPEG1VIDEO; i_codec_id = AV_CODEC_ID_MPEG1VIDEO;
psz_namecodec = "MPEG-1 video"; psz_namecodec = "MPEG-1 video";
} }
else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id, else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id,
...@@ -226,7 +226,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -226,7 +226,7 @@ int OpenEncoder( vlc_object_t *p_this )
return VLC_EGENERIC; /* handed chroma output */ return VLC_EGENERIC; /* handed chroma output */
i_cat = VIDEO_ES; i_cat = VIDEO_ES;
i_codec_id = CODEC_ID_RAWVIDEO; i_codec_id = AV_CODEC_ID_RAWVIDEO;
psz_namecodec = "Raw video"; psz_namecodec = "Raw video";
} }
...@@ -515,20 +515,20 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -515,20 +515,20 @@ int OpenEncoder( vlc_object_t *p_this )
See libavcodec/mpegvideo_enc.c:MPV_encode_init and See libavcodec/mpegvideo_enc.c:MPV_encode_init and
libavcodec/svq3.c , WMV2 calls MPV_encode_init also. libavcodec/svq3.c , WMV2 calls MPV_encode_init also.
*/ */
if ( i_codec_id == CODEC_ID_FLV1 || if ( i_codec_id == AV_CODEC_ID_FLV1 ||
i_codec_id == CODEC_ID_H261 || i_codec_id == AV_CODEC_ID_H261 ||
i_codec_id == CODEC_ID_LJPEG || i_codec_id == AV_CODEC_ID_LJPEG ||
i_codec_id == CODEC_ID_MJPEG || i_codec_id == AV_CODEC_ID_MJPEG ||
i_codec_id == CODEC_ID_H263 || i_codec_id == AV_CODEC_ID_H263 ||
i_codec_id == CODEC_ID_H263P || i_codec_id == AV_CODEC_ID_H263P ||
i_codec_id == CODEC_ID_MSMPEG4V1 || i_codec_id == AV_CODEC_ID_MSMPEG4V1 ||
i_codec_id == CODEC_ID_MSMPEG4V2 || i_codec_id == AV_CODEC_ID_MSMPEG4V2 ||
i_codec_id == CODEC_ID_MSMPEG4V3 || i_codec_id == AV_CODEC_ID_MSMPEG4V3 ||
i_codec_id == CODEC_ID_WMV1 || i_codec_id == AV_CODEC_ID_WMV1 ||
i_codec_id == CODEC_ID_WMV2 || i_codec_id == AV_CODEC_ID_WMV2 ||
i_codec_id == CODEC_ID_RV10 || i_codec_id == AV_CODEC_ID_RV10 ||
i_codec_id == CODEC_ID_RV20 || i_codec_id == AV_CODEC_ID_RV20 ||
i_codec_id == CODEC_ID_SVQ3 ) i_codec_id == AV_CODEC_ID_SVQ3 )
p_enc->i_threads = 1; p_enc->i_threads = 1;
if( p_sys->i_vtolerance > 0 ) if( p_sys->i_vtolerance > 0 )
...@@ -580,7 +580,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -580,7 +580,7 @@ int OpenEncoder( vlc_object_t *p_this )
else if( p_enc->fmt_in.i_cat == AUDIO_ES ) else if( p_enc->fmt_in.i_cat == AUDIO_ES )
{ {
/* work around bug in libmp3lame encoding */ /* work around bug in libmp3lame encoding */
if( i_codec_id == CODEC_ID_MP3 && p_enc->fmt_in.audio.i_channels > 2 ) if( i_codec_id == AV_CODEC_ID_MP3 && p_enc->fmt_in.audio.i_channels > 2 )
p_enc->fmt_in.audio.i_channels = 2; p_enc->fmt_in.audio.i_channels = 2;
p_context->codec_type = AVMEDIA_TYPE_AUDIO; p_context->codec_type = AVMEDIA_TYPE_AUDIO;
...@@ -626,7 +626,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -626,7 +626,7 @@ int OpenEncoder( vlc_object_t *p_this )
/* Set reasonable defaults to VP8, based on /* Set reasonable defaults to VP8, based on
libvpx-720p preset from libvpx ffmpeg-patch */ libvpx-720p preset from libvpx ffmpeg-patch */
if( i_codec_id == CODEC_ID_VP8 ) if( i_codec_id == AV_CODEC_ID_VP8 )
{ {
/* Lets give bitrate tolerance */ /* Lets give bitrate tolerance */
p_context->bit_rate_tolerance = __MAX(2 * (int)p_enc->fmt_out.i_bitrate, p_sys->i_vtolerance ); p_context->bit_rate_tolerance = __MAX(2 * (int)p_enc->fmt_out.i_bitrate, p_sys->i_vtolerance );
...@@ -672,7 +672,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -672,7 +672,7 @@ int OpenEncoder( vlc_object_t *p_this )
#endif #endif
} }
if( i_codec_id == CODEC_ID_RAWVIDEO ) if( i_codec_id == AV_CODEC_ID_RAWVIDEO )
{ {
/* XXX: hack: Force same codec (will be handled by transcode) */ /* XXX: hack: Force same codec (will be handled by transcode) */
p_enc->fmt_in.video.i_chroma = p_enc->fmt_in.i_codec = p_enc->fmt_out.i_codec; p_enc->fmt_in.video.i_chroma = p_enc->fmt_in.i_codec = p_enc->fmt_out.i_codec;
...@@ -696,8 +696,8 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -696,8 +696,8 @@ int OpenEncoder( vlc_object_t *p_this )
if( ret ) if( ret )
{ {
if( p_enc->fmt_in.i_cat == AUDIO_ES && if( p_enc->fmt_in.i_cat == AUDIO_ES &&
(p_context->channels > 2 || i_codec_id == CODEC_ID_MP2 (p_context->channels > 2 || i_codec_id == AV_CODEC_ID_MP2
|| i_codec_id == CODEC_ID_MP3) ) || i_codec_id == AV_CODEC_ID_MP3) )
{ {
if( p_context->channels > 2 ) if( p_context->channels > 2 )
{ {
...@@ -706,7 +706,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -706,7 +706,7 @@ int OpenEncoder( vlc_object_t *p_this )
msg_Warn( p_enc, "stereo mode selected (codec limitation)" ); msg_Warn( p_enc, "stereo mode selected (codec limitation)" );
} }
if( i_codec_id == CODEC_ID_MP2 || i_codec_id == CODEC_ID_MP3 ) if( i_codec_id == AV_CODEC_ID_MP2 || i_codec_id == AV_CODEC_ID_MP3 )
{ {
int i_frequency, i; int i_frequency, i;
...@@ -767,7 +767,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -767,7 +767,7 @@ int OpenEncoder( vlc_object_t *p_this )
} }
} }
if( i_codec_id == CODEC_ID_FLAC ) if( i_codec_id == AV_CODEC_ID_FLAC )
{ {
p_enc->fmt_out.i_extra = 4 + 1 + 3 + p_context->extradata_size; p_enc->fmt_out.i_extra = 4 + 1 + 3 + p_context->extradata_size;
p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra ); p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra );
......
This diff is collapsed.
...@@ -54,8 +54,8 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context, ...@@ -54,8 +54,8 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
/* */ /* */
switch (codec_id) { switch (codec_id) {
case CODEC_ID_HDMV_PGS_SUBTITLE: case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
case CODEC_ID_XSUB: case AV_CODEC_ID_XSUB:
break; break;
default: default:
msg_Warn(dec, "refusing to decode non validated subtitle codec"); msg_Warn(dec, "refusing to decode non validated subtitle codec");
......
...@@ -104,24 +104,24 @@ static int Open( vlc_va_t *p_external, int i_codec_id ) ...@@ -104,24 +104,24 @@ static int Open( vlc_va_t *p_external, int i_codec_id )
/* */ /* */
switch( i_codec_id ) switch( i_codec_id )
{ {
case CODEC_ID_MPEG1VIDEO: case AV_CODEC_ID_MPEG1VIDEO:
case CODEC_ID_MPEG2VIDEO: case AV_CODEC_ID_MPEG2VIDEO:
i_profile = VAProfileMPEG2Main; i_profile = VAProfileMPEG2Main;
i_surface_count = 2+1; i_surface_count = 2+1;
break; break;
case CODEC_ID_MPEG4: case AV_CODEC_ID_MPEG4:
i_profile = VAProfileMPEG4AdvancedSimple; i_profile = VAProfileMPEG4AdvancedSimple;
i_surface_count = 2+1; i_surface_count = 2+1;
break; break;
case CODEC_ID_WMV3: case AV_CODEC_ID_WMV3:
i_profile = VAProfileVC1Main; i_profile = VAProfileVC1Main;
i_surface_count = 2+1; i_surface_count = 2+1;
break; break;
case CODEC_ID_VC1: case AV_CODEC_ID_VC1:
i_profile = VAProfileVC1Advanced; i_profile = VAProfileVC1Advanced;
i_surface_count = 2+1; i_surface_count = 2+1;
break; break;
case CODEC_ID_H264: case AV_CODEC_ID_H264:
i_profile = VAProfileH264High; i_profile = VAProfileH264High;
i_surface_count = 16+1; i_surface_count = 16+1;
break; break;
......
...@@ -264,7 +264,7 @@ static void Close( vlc_va_t *p_external ) ...@@ -264,7 +264,7 @@ static void Close( vlc_va_t *p_external )
static int Open( vlc_va_t *external, int i_codec_id, const es_format_t *fmt ) static int Open( vlc_va_t *external, int i_codec_id, const es_format_t *fmt )
{ {
if( i_codec_id != CODEC_ID_H264 ) if( i_codec_id != AV_CODEC_ID_H264 )
return NULL; return NULL;
if( fmt->p_extra == NULL || fmt->i_extra < 7 ) if( fmt->p_extra == NULL || fmt->i_extra < 7 )
......
...@@ -287,8 +287,8 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -287,8 +287,8 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
if( var_CreateGetBool( p_dec, "avcodec-dr" ) && if( var_CreateGetBool( p_dec, "avcodec-dr" ) &&
(p_sys->p_codec->capabilities & CODEC_CAP_DR1) && (p_sys->p_codec->capabilities & CODEC_CAP_DR1) &&
/* No idea why ... but this fixes flickering on some TSCC streams */ /* No idea why ... but this fixes flickering on some TSCC streams */
p_sys->i_codec_id != CODEC_ID_TSCC && p_sys->i_codec_id != CODEC_ID_CSCD && p_sys->i_codec_id != AV_CODEC_ID_TSCC && p_sys->i_codec_id != AV_CODEC_ID_CSCD &&
p_sys->i_codec_id != CODEC_ID_CINEPAK && p_sys->i_codec_id != AV_CODEC_ID_CINEPAK &&
!p_sys->p_context->debug_mv ) !p_sys->p_context->debug_mv )
{ {
/* Some codecs set pix_fmt only after the 1st frame has been decoded, /* Some codecs set pix_fmt only after the 1st frame has been decoded,
...@@ -333,10 +333,10 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -333,10 +333,10 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
char *hw = var_CreateGetString( p_dec, "avcodec-hw" ); /* FIXME */ char *hw = var_CreateGetString( p_dec, "avcodec-hw" ); /* FIXME */
if( (hw == NULL || strcasecmp( hw, "none" )) && if( (hw == NULL || strcasecmp( hw, "none" )) &&
(i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO || (i_codec_id == AV_CODEC_ID_MPEG1VIDEO || i_codec_id == AV_CODEC_ID_MPEG2VIDEO ||
i_codec_id == CODEC_ID_MPEG4 || i_codec_id == AV_CODEC_ID_MPEG4 ||
i_codec_id == CODEC_ID_H264 || i_codec_id == AV_CODEC_ID_H264 ||
i_codec_id == CODEC_ID_VC1 || i_codec_id == CODEC_ID_WMV3) ) i_codec_id == AV_CODEC_ID_VC1 || i_codec_id == AV_CODEC_ID_WMV3) )
{ {
#ifdef HAVE_AVCODEC_MT #ifdef HAVE_AVCODEC_MT
if( p_sys->p_context->thread_type & FF_THREAD_FRAME ) if( p_sys->p_context->thread_type & FF_THREAD_FRAME )
...@@ -345,7 +345,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -345,7 +345,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys->p_context->thread_type &= ~FF_THREAD_FRAME; p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;
} }
if( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) && if( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) &&
( i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO ) ) ( i_codec_id == AV_CODEC_ID_MPEG1VIDEO || i_codec_id == AV_CODEC_ID_MPEG2VIDEO ) )
{ {
msg_Warn( p_dec, "threaded slice decoding is not compatible with libavcodec-hw, disabled" ); msg_Warn( p_dec, "threaded slice decoding is not compatible with libavcodec-hw, disabled" );
p_sys->p_context->thread_type &= ~FF_THREAD_SLICE; p_sys->p_context->thread_type &= ~FF_THREAD_SLICE;
...@@ -377,7 +377,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -377,7 +377,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
/* Setup palette */ /* Setup palette */
# warning FIXME # warning FIXME: palette
/* ***** init this codec with special data ***** */ /* ***** init this codec with special data ***** */
ffmpeg_InitCodec( p_dec ); ffmpeg_InitCodec( p_dec );
...@@ -800,7 +800,7 @@ static void ffmpeg_InitCodec( decoder_t *p_dec ) ...@@ -800,7 +800,7 @@ static void ffmpeg_InitCodec( decoder_t *p_dec )
if( !i_size ) return; if( !i_size ) return;
if( p_sys->i_codec_id == CODEC_ID_SVQ3 ) if( p_sys->i_codec_id == AV_CODEC_ID_SVQ3 )
{ {
uint8_t *p; uint8_t *p;
...@@ -970,11 +970,11 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, ...@@ -970,11 +970,11 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
unsigned i_align; unsigned i_align;
switch( p_sys->i_codec_id ) switch( p_sys->i_codec_id )
{ {
case CODEC_ID_SVQ1: case AV_CODEC_ID_SVQ1:
case CODEC_ID_VP5: case AV_CODEC_ID_VP5:
case CODEC_ID_VP6: case AV_CODEC_ID_VP6:
case CODEC_ID_VP6F: case AV_CODEC_ID_VP6F:
case CODEC_ID_VP6A: case AV_CODEC_ID_VP6A:
i_align = 16; i_align = 16;
break; break;
default: default:
......
...@@ -308,7 +308,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -308,7 +308,7 @@ int OpenDemux( vlc_object_t *p_this )
es_format_Init( &fmt, VIDEO_ES, fcc ); es_format_Init( &fmt, VIDEO_ES, fcc );
/* Special case for raw video data */ /* Special case for raw video data */
if( cc->codec_id == CODEC_ID_RAWVIDEO ) if( cc->codec_id == AV_CODEC_ID_RAWVIDEO )
{ {
msg_Dbg( p_demux, "raw video, pixel format: %i", cc->pix_fmt ); msg_Dbg( p_demux, "raw video, pixel format: %i", cc->pix_fmt );
if( GetVlcChroma( &fmt.video, cc->pix_fmt ) != VLC_SUCCESS) if( GetVlcChroma( &fmt.video, cc->pix_fmt ) != VLC_SUCCESS)
...@@ -319,7 +319,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -319,7 +319,7 @@ int OpenDemux( vlc_object_t *p_this )
fmt.i_codec = fmt.video.i_chroma; fmt.i_codec = fmt.video.i_chroma;
} }
/* We need this for the h264 packetizer */ /* We need this for the h264 packetizer */
else if( cc->codec_id == CODEC_ID_H264 && ( p_sys->fmt == av_find_input_format("flv") || else if( cc->codec_id == AV_CODEC_ID_H264 && ( p_sys->fmt == av_find_input_format("flv") ||
p_sys->fmt == av_find_input_format("matroska") || p_sys->fmt == av_find_input_format("mp4") ) ) p_sys->fmt == av_find_input_format("matroska") || p_sys->fmt == av_find_input_format("mp4") ) )
fmt.i_original_fourcc = VLC_FOURCC( 'a', 'v', 'c', '1' ); fmt.i_original_fourcc = VLC_FOURCC( 'a', 'v', 'c', '1' );
...@@ -334,7 +334,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -334,7 +334,7 @@ int OpenDemux( vlc_object_t *p_this )
case AVMEDIA_TYPE_SUBTITLE: case AVMEDIA_TYPE_SUBTITLE:
es_format_Init( &fmt, SPU_ES, fcc ); es_format_Init( &fmt, SPU_ES, fcc );
if( strncmp( p_sys->ic->iformat->name, "matroska", 8 ) == 0 && if( strncmp( p_sys->ic->iformat->name, "matroska", 8 ) == 0 &&
cc->codec_id == CODEC_ID_DVD_SUBTITLE && cc->codec_id == AV_CODEC_ID_DVD_SUBTITLE &&
cc->extradata != NULL && cc->extradata != NULL &&
cc->extradata_size > 0 ) cc->extradata_size > 0 )
{ {
...@@ -386,7 +386,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -386,7 +386,7 @@ int OpenDemux( vlc_object_t *p_this )
input_attachment_t *p_attachment; input_attachment_t *p_attachment;
psz_type = "attachment"; psz_type = "attachment";
if( cc->codec_id == CODEC_ID_TTF ) if( cc->codec_id == AV_CODEC_ID_TTF )
{ {
AVDictionaryEntry *filename = av_dict_get( s->metadata, "filename", NULL, 0 ); AVDictionaryEntry *filename = av_dict_get( s->metadata, "filename", NULL, 0 );
if( filename && filename->value ) if( filename && filename->value )
...@@ -427,7 +427,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -427,7 +427,7 @@ int OpenDemux( vlc_object_t *p_this )
const uint8_t *p_extra = cc->extradata; const uint8_t *p_extra = cc->extradata;
unsigned i_extra = cc->extradata_size; unsigned i_extra = cc->extradata_size;
if( cc->codec_id == CODEC_ID_THEORA && b_ogg ) if( cc->codec_id == AV_CODEC_ID_THEORA && b_ogg )
{ {
unsigned pi_size[3]; unsigned pi_size[3];
const void *pp_data[3]; const void *pp_data[3];
...@@ -451,7 +451,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -451,7 +451,7 @@ int OpenDemux( vlc_object_t *p_this )
fmt.p_extra = NULL; fmt.p_extra = NULL;
} }
} }
else if( cc->codec_id == CODEC_ID_SPEEX && b_ogg ) else if( cc->codec_id == AV_CODEC_ID_SPEEX && b_ogg )
{ {
const uint8_t p_dummy_comment[] = { const uint8_t p_dummy_comment[] = {
0, 0, 0, 0, 0, 0, 0, 0,
...@@ -597,7 +597,7 @@ static int Demux( demux_t *p_demux ) ...@@ -597,7 +597,7 @@ static int Demux( demux_t *p_demux )
av_free_packet( &pkt ); av_free_packet( &pkt );
return 1; return 1;
} }
if( p_stream->codec->codec_id == CODEC_ID_SSA ) if( p_stream->codec->codec_id == AV_CODEC_ID_SSA )
{ {
p_frame = BuildSsaFrame( &pkt, p_sys->i_ssa_order++ ); p_frame = BuildSsaFrame( &pkt, p_sys->i_ssa_order++ );
if( !p_frame ) if( !p_frame )
......
...@@ -230,9 +230,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -230,9 +230,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
codec->bit_rate = p_input->p_fmt->i_bitrate; codec->bit_rate = p_input->p_fmt->i_bitrate;
codec->codec_tag = av_codec_get_tag( p_sys->oc->oformat->codec_tag, i_codec_id ); codec->codec_tag = av_codec_get_tag( p_sys->oc->oformat->codec_tag, i_codec_id );
if( !codec->codec_tag && i_codec_id == CODEC_ID_MP2 ) if( !codec->codec_tag && i_codec_id == AV_CODEC_ID_MP2 )
{ {
i_codec_id = CODEC_ID_MP3; i_codec_id = AV_CODEC_ID_MP3;
codec->codec_tag = av_codec_get_tag( p_sys->oc->oformat->codec_tag, i_codec_id ); codec->codec_tag = av_codec_get_tag( p_sys->oc->oformat->codec_tag, i_codec_id );
} }
codec->codec_id = i_codec_id; codec->codec_id = i_codec_id;
......
...@@ -339,7 +339,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -339,7 +339,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
p_fmt->i_codec == VLC_CODEC_MPGA && p_fmt->i_codec == VLC_CODEC_MPGA &&
p_sys->b_audio ) p_sys->b_audio )
{ {
int i_ff_codec = CODEC_ID_MP2; int i_ff_codec = AV_CODEC_ID_MP2;
int i; int i;
id->b_switcher_audio = true; id->b_switcher_audio = true;
...@@ -725,7 +725,7 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) ...@@ -725,7 +725,7 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id )
if ( p_sys->i_cmd > 0 ) if ( p_sys->i_cmd > 0 )
{ {
/* Create a new encoder. */ /* Create a new encoder. */
int i_ff_codec = CODEC_ID_MPEG2VIDEO; int i_ff_codec = AV_CODEC_ID_MPEG2VIDEO;
int i_aspect_num, i_aspect_den; int i_aspect_num, i_aspect_den;
if( i_ff_codec == 0 ) if( i_ff_codec == 0 )
......
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