Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
4b17230210
@ -47,6 +47,20 @@
|
|||||||
#define MAX_AUDIO_FRAME_SIZE 192000
|
#define MAX_AUDIO_FRAME_SIZE 192000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 55
|
||||||
|
#define AV_CODEC_ID_VC1 CODEC_ID_VC1
|
||||||
|
#define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2
|
||||||
|
#define AV_CODEC_ID_WMAPRO CODEC_ID_WMAPRO
|
||||||
|
#define AV_CODEC_ID_MP3 CODEC_ID_MP3
|
||||||
|
#define AV_CODEC_ID_MP2 CODEC_ID_MP2
|
||||||
|
#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
|
||||||
|
#define AV_CODEC_ID_WMV3 CODEC_ID_WMV3
|
||||||
|
#define AV_CODEC_ID_AAC CODEC_ID_AAC
|
||||||
|
#define AV_CODEC_ID_H264 CODEC_ID_H264
|
||||||
|
#define AV_CODEC_ID_AC3 CODEC_ID_AC3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct _TSMFFFmpegDecoder
|
typedef struct _TSMFFFmpegDecoder
|
||||||
{
|
{
|
||||||
ITSMFDecoder iface;
|
ITSMFDecoder iface;
|
||||||
@ -213,28 +227,28 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder *decoder, TS_AM_MEDIA_TYPE *medi
|
|||||||
switch(media_type->SubType)
|
switch(media_type->SubType)
|
||||||
{
|
{
|
||||||
case TSMF_SUB_TYPE_WVC1:
|
case TSMF_SUB_TYPE_WVC1:
|
||||||
mdecoder->codec_id = CODEC_ID_VC1;
|
mdecoder->codec_id = AV_CODEC_ID_VC1;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_WMA2:
|
case TSMF_SUB_TYPE_WMA2:
|
||||||
mdecoder->codec_id = CODEC_ID_WMAV2;
|
mdecoder->codec_id = AV_CODEC_ID_WMAV2;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_WMA9:
|
case TSMF_SUB_TYPE_WMA9:
|
||||||
mdecoder->codec_id = CODEC_ID_WMAPRO;
|
mdecoder->codec_id = AV_CODEC_ID_WMAPRO;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_MP3:
|
case TSMF_SUB_TYPE_MP3:
|
||||||
mdecoder->codec_id = CODEC_ID_MP3;
|
mdecoder->codec_id = AV_CODEC_ID_MP3;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_MP2A:
|
case TSMF_SUB_TYPE_MP2A:
|
||||||
mdecoder->codec_id = CODEC_ID_MP2;
|
mdecoder->codec_id = AV_CODEC_ID_MP2;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_MP2V:
|
case TSMF_SUB_TYPE_MP2V:
|
||||||
mdecoder->codec_id = CODEC_ID_MPEG2VIDEO;
|
mdecoder->codec_id = AV_CODEC_ID_MPEG2VIDEO;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_WMV3:
|
case TSMF_SUB_TYPE_WMV3:
|
||||||
mdecoder->codec_id = CODEC_ID_WMV3;
|
mdecoder->codec_id = AV_CODEC_ID_WMV3;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_AAC:
|
case TSMF_SUB_TYPE_AAC:
|
||||||
mdecoder->codec_id = CODEC_ID_AAC;
|
mdecoder->codec_id = AV_CODEC_ID_AAC;
|
||||||
/* For AAC the pFormat is a HEAACWAVEINFO struct, and the codec data
|
/* For AAC the pFormat is a HEAACWAVEINFO struct, and the codec data
|
||||||
is at the end of it. See
|
is at the end of it. See
|
||||||
http://msdn.microsoft.com/en-us/library/dd757806.aspx */
|
http://msdn.microsoft.com/en-us/library/dd757806.aspx */
|
||||||
@ -246,10 +260,10 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder *decoder, TS_AM_MEDIA_TYPE *medi
|
|||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_H264:
|
case TSMF_SUB_TYPE_H264:
|
||||||
case TSMF_SUB_TYPE_AVC1:
|
case TSMF_SUB_TYPE_AVC1:
|
||||||
mdecoder->codec_id = CODEC_ID_H264;
|
mdecoder->codec_id = AV_CODEC_ID_H264;
|
||||||
break;
|
break;
|
||||||
case TSMF_SUB_TYPE_AC3:
|
case TSMF_SUB_TYPE_AC3:
|
||||||
mdecoder->codec_id = CODEC_ID_AC3;
|
mdecoder->codec_id = AV_CODEC_ID_AC3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user