diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/aacenc.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/aacenc.c index f122fe11acb7e..94fb13fd85c21 100644 --- a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/aacenc.c +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/aacenc.c @@ -636,6 +636,11 @@ static av_cold int aac_encode_end(AVCodecContext *avctx) return 0; } +static const AVProfile profiles[] = { + { FF_PROFILE_AAC_LOW, "Low" }, + { FF_PROFILE_UNKNOWN }, +}; + AVCodec aac_encoder = { "aac", AVMEDIA_TYPE_AUDIO, @@ -647,4 +652,5 @@ AVCodec aac_encoder = { .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"), + .profiles = profiles, }; diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h index 97556033332b7..59ac3ba601d65 100644 --- a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h @@ -2714,6 +2714,14 @@ typedef struct AVCodecContext { int lpc_passes; } AVCodecContext; +/** + * AVProfile. + */ +typedef struct AVProfile { + int profile; + const char *name; ///< short name for the profile +} AVProfile; + /** * AVCodec. */ @@ -2754,6 +2762,7 @@ typedef struct AVCodec { const enum SampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 uint8_t max_lowres; ///< maximum value for lowres supported by the decoder + const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} } AVCodec; /** @@ -3310,6 +3319,15 @@ AVCodec *avcodec_find_decoder(enum CodecID id); AVCodec *avcodec_find_decoder_by_name(const char *name); void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); +/** + * Return a name for the specified profile, if available. + * + * @param codec the codec that is searched for the given profile + * @param profile the profile value for which a name is requested + * @return A name for the profile if found, NULL otherwise. + */ +const char *av_get_profile_name(const AVCodec *codec, int profile); + /** * Set the fields of the given AVCodecContext to default values. * diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/dca.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/dca.c index 63b46a4f3968f..9817790e5f662 100644 --- a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/dca.c +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/dca.c @@ -1817,6 +1817,15 @@ static av_cold int dca_decode_end(AVCodecContext * avctx) return 0; } +static const AVProfile profiles[] = { + { FF_PROFILE_DTS, "DTS" }, + { FF_PROFILE_DTS_ES, "DTS-ES" }, + { FF_PROFILE_DTS_96_24, "DTS 96/24" }, + { FF_PROFILE_DTS_HD_HRA, "DTS-HD HRA" }, + { FF_PROFILE_DTS_HD_MA, "DTS-HD MA" }, + { FF_PROFILE_UNKNOWN }, +}; + AVCodec dca_decoder = { .name = "dca", .type = AVMEDIA_TYPE_AUDIO, @@ -1826,4 +1835,5 @@ AVCodec dca_decoder = { .decode = dca_decode_frame, .close = dca_decode_end, .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), + .profiles = profiles, }; diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/h264.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/h264.c index d1662fcb6b860..fb3fc1efb60b4 100644 --- a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/h264.c +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/h264.c @@ -3382,6 +3382,17 @@ av_cold int ff_h264_decode_end(AVCodecContext *avctx) return 0; } +static const AVProfile profiles[] = { + { FF_PROFILE_H264_BASELINE, "Baseline" }, + { FF_PROFILE_H264_MAIN, "Main" }, + { FF_PROFILE_H264_EXTENDED, "Extended" }, + { FF_PROFILE_H264_HIGH, "High" }, + { FF_PROFILE_H264_HIGH_10, "High 10" }, + { FF_PROFILE_H264_HIGH_422, "High 4:2:2" }, + { FF_PROFILE_H264_HIGH_444, "High 4:4:4" }, + { FF_PROFILE_H264_CAVLC_444, "CAVLC 4:4:4" }, + { FF_PROFILE_UNKNOWN }, +}; AVCodec h264_decoder = { "h264", @@ -3395,6 +3406,7 @@ AVCodec h264_decoder = { /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY, .flush= flush_dpb, .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), + .profiles = profiles, }; #if CONFIG_H264_VDPAU_DECODER @@ -3411,5 +3423,6 @@ AVCodec h264_vdpau_decoder = { .flush= flush_dpb, .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE}, + .profiles = profiles, }; #endif diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/libfaac.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/libfaac.c index 82fd05bafdcdf..bf403567c5249 100644 --- a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/libfaac.c +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/libfaac.c @@ -145,6 +145,14 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx) return 0; } +static const AVProfile profiles[] = { + { FF_PROFILE_AAC_MAIN, "Main" }, + { FF_PROFILE_AAC_LOW, "Low" }, + { FF_PROFILE_AAC_SSR, "SSR" }, + { FF_PROFILE_AAC_LTP, "LTP" }, + { FF_PROFILE_UNKNOWN }, +}; + AVCodec libfaac_encoder = { "libfaac", AVMEDIA_TYPE_AUDIO, @@ -155,4 +163,5 @@ AVCodec libfaac_encoder = { Faac_encode_close, .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"), + .profiles = profiles, }; diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/utils.c b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/utils.c index f21e9eda7b6e8..cfcd7082bb46a 100644 --- a/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/utils.c +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/utils.c @@ -840,6 +840,7 @@ size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_ta void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) { const char *codec_name; + const char *profile = NULL; AVCodec *p; char buf1[32]; int bitrate; @@ -852,6 +853,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) if (p) { codec_name = p->name; + profile = av_get_profile_name(p, enc->profile); } else if (enc->codec_id == CODEC_ID_MPEG2TS) { /* fake mpeg2 transport stream codec (currently not registered) */ @@ -871,6 +873,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) snprintf(buf, buf_size, "Video: %s%s", codec_name, enc->mb_decision ? " (hq)" : ""); + if (profile) + snprintf(buf + strlen(buf), buf_size - strlen(buf), + " (%s)", profile); if (enc->pix_fmt != PIX_FMT_NONE) { snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %s", @@ -906,6 +911,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) snprintf(buf, buf_size, "Audio: %s", codec_name); + if (profile) + snprintf(buf + strlen(buf), buf_size - strlen(buf), + " (%s)", profile); if (enc->sample_rate) { snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %d Hz", enc->sample_rate); @@ -945,6 +953,19 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) } } +const char *av_get_profile_name(const AVCodec *codec, int profile) +{ + const AVProfile *p; + if (profile == FF_PROFILE_UNKNOWN || !codec->profiles) + return NULL; + + for (p = codec->profiles; p->profile != FF_PROFILE_UNKNOWN; p++) + if (p->profile == profile) + return p->name; + + return NULL; +} + unsigned avcodec_version( void ) { return LIBAVCODEC_VERSION_INT; diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0041-Add-av_get_profile_name-to-get-profile-names.patch b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0041-Add-av_get_profile_name-to-get-profile-names.patch new file mode 100644 index 0000000000000..9aba16463fab2 --- /dev/null +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0041-Add-av_get_profile_name-to-get-profile-names.patch @@ -0,0 +1,84 @@ +From 060ec0a8294d912f694cf48546f1543805f83a48 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Fri, 7 Jan 2011 22:27:26 +0000 +Subject: [PATCH] Add av_get_profile_name() to get profile names. + +Patch by Anssi Hannula, anssi d hannula a iki d fi + +Originally committed as revision 26259 to svn://svn.ffmpeg.org/ffmpeg/trunk +--- + doc/APIchanges | 3 +++ + libavcodec/avcodec.h | 22 ++++++++++++++++++++-- + libavcodec/utils.c | 13 +++++++++++++ + 3 files changed, 36 insertions(+), 2 deletions(-) + +diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h +index 7850e1d..309edae 100644 +--- a/libavcodec/avcodec.h ++++ b/libavcodec/avcodec.h +@@ -2794,6 +2794,14 @@ typedef struct AVCodecContext { + } AVCodecContext; + + /** ++ * AVProfile. ++ */ ++typedef struct AVProfile { ++ int profile; ++ const char *name; ///< short name for the profile ++} AVProfile; ++ ++/** + * AVCodec. + */ + typedef struct AVCodec { +@@ -2834,6 +2842,7 @@ typedef struct AVCodec { + const enum SampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 + const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 + uint8_t max_lowres; ///< maximum value for lowres supported by the decoder ++ const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} + } AVCodec; + + /** +@@ -3394,6 +3403,15 @@ AVCodec *avcodec_find_decoder_by_name(const char *name); + void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); + + /** ++ * Return a name for the specified profile, if available. ++ * ++ * @param codec the codec that is searched for the given profile ++ * @param profile the profile value for which a name is requested ++ * @return A name for the profile if found, NULL otherwise. ++ */ ++const char *av_get_profile_name(const AVCodec *codec, int profile); ++ ++/** + * Set the fields of the given AVCodecContext to default values. + * + * @param s The AVCodecContext of which the fields should be set to default values. +diff --git a/libavcodec/utils.c b/libavcodec/utils.c +index ce74735..c11e4f5 100644 +--- a/libavcodec/utils.c ++++ b/libavcodec/utils.c +@@ -966,6 +966,19 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) + } + } + ++const char *av_get_profile_name(const AVCodec *codec, int profile) ++{ ++ const AVProfile *p; ++ if (profile == FF_PROFILE_UNKNOWN || !codec->profiles) ++ return NULL; ++ ++ for (p = codec->profiles; p->profile != FF_PROFILE_UNKNOWN; p++) ++ if (p->profile == profile) ++ return p->name; ++ ++ return NULL; ++} ++ + unsigned avcodec_version( void ) + { + return LIBAVCODEC_VERSION_INT; +-- +1.7.3 + diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0042-Show-profile-in-avcodec_string.patch b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0042-Show-profile-in-avcodec_string.patch new file mode 100644 index 0000000000000..891a1937974fd --- /dev/null +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0042-Show-profile-in-avcodec_string.patch @@ -0,0 +1,55 @@ +From 2a81f4bde50f731074c1be7368128de49f78925a Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Sat, 8 Jan 2011 09:23:25 +0000 +Subject: [PATCH] Show profile in avcodec_string(). + +Patch by Anssi Hannula, anssi d hannula a iki d fi + +Originally committed as revision 26264 to svn://svn.ffmpeg.org/ffmpeg/trunk +--- + libavcodec/utils.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/libavcodec/utils.c b/libavcodec/utils.c +index 0295147..8cc9299 100644 +--- a/libavcodec/utils.c ++++ b/libavcodec/utils.c +@@ -871,6 +871,7 @@ size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_ta + void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) + { + const char *codec_name; ++ const char *profile = NULL; + AVCodec *p; + char buf1[32]; + int bitrate; +@@ -883,6 +884,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) + + if (p) { + codec_name = p->name; ++ profile = av_get_profile_name(p, enc->profile); + } else if (enc->codec_id == CODEC_ID_MPEG2TS) { + /* fake mpeg2 transport stream codec (currently not + registered) */ +@@ -902,6 +904,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) + snprintf(buf, buf_size, + "Video: %s%s", + codec_name, enc->mb_decision ? " (hq)" : ""); ++ if (profile) ++ snprintf(buf + strlen(buf), buf_size - strlen(buf), ++ " (%s)", profile); + if (enc->pix_fmt != PIX_FMT_NONE) { + snprintf(buf + strlen(buf), buf_size - strlen(buf), + ", %s", +@@ -937,6 +942,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) + snprintf(buf, buf_size, + "Audio: %s", + codec_name); ++ if (profile) ++ snprintf(buf + strlen(buf), buf_size - strlen(buf), ++ " (%s)", profile); + if (enc->sample_rate) { + snprintf(buf + strlen(buf), buf_size - strlen(buf), + ", %d Hz", enc->sample_rate); +-- +1.7.3 + diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0043-h264-add-profile-names-for-the-existing-defines.patch b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0043-h264-add-profile-names-for-the-existing-defines.patch new file mode 100644 index 0000000000000..3a10d41bfb25f --- /dev/null +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0043-h264-add-profile-names-for-the-existing-defines.patch @@ -0,0 +1,51 @@ +From 306bd2d20ada5782ea28037072e9d4f0cc9dae90 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Fri, 7 Jan 2011 18:59:17 +0200 +Subject: [PATCH 43/46] h264: add profile names for the existing defines + +Submitted upstream. + +--- + libavcodec/h264.c | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/libavcodec/h264.c b/libavcodec/h264.c +index 40dc276..04caa9f 100644 +--- a/libavcodec/h264.c ++++ b/libavcodec/h264.c +@@ -3354,6 +3354,17 @@ av_cold int ff_h264_decode_end(AVCodecContext *avctx) + return 0; + } + ++static const AVProfile profiles[] = { ++ { FF_PROFILE_H264_BASELINE, "Baseline" }, ++ { FF_PROFILE_H264_MAIN, "Main" }, ++ { FF_PROFILE_H264_EXTENDED, "Extended" }, ++ { FF_PROFILE_H264_HIGH, "High" }, ++ { FF_PROFILE_H264_HIGH_10, "High 10" }, ++ { FF_PROFILE_H264_HIGH_422, "High 4:2:2" }, ++ { FF_PROFILE_H264_HIGH_444, "High 4:4:4" }, ++ { FF_PROFILE_H264_CAVLC_444, "CAVLC 4:4:4" }, ++ { FF_PROFILE_UNKNOWN }, ++}; + + AVCodec h264_decoder = { + "h264", +@@ -3367,6 +3378,7 @@ AVCodec h264_decoder = { + /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .flush= flush_dpb, + .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), ++ .profiles = profiles, + }; + + #if CONFIG_H264_VDPAU_DECODER +@@ -3383,5 +3395,6 @@ AVCodec h264_vdpau_decoder = { + .flush= flush_dpb, + .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE}, ++ .profiles = profiles, + }; + #endif +-- +1.7.3 + diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0044-aacenc-add-recognized-profiles-array.patch b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0044-aacenc-add-recognized-profiles-array.patch new file mode 100644 index 0000000000000..72398832fa8e3 --- /dev/null +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0044-aacenc-add-recognized-profiles-array.patch @@ -0,0 +1,36 @@ +From 5a25200ef7dca766d66e35df35adf4fc519a6229 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Fri, 21 Jan 2011 20:44:02 +0200 +Subject: [PATCH 44/46] aacenc: add recognized profiles array + +Submitted upstream. + +--- + libavcodec/aacenc.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c +index c52ffa0..762e0c8 100644 +--- a/libavcodec/aacenc.c ++++ b/libavcodec/aacenc.c +@@ -636,6 +636,11 @@ static av_cold int aac_encode_end(AVCodecContext *avctx) + return 0; + } + ++static const AVProfile profiles[] = { ++ { FF_PROFILE_AAC_LOW, "Low" }, ++ { FF_PROFILE_UNKNOWN }, ++}; ++ + AVCodec aac_encoder = { + "aac", + AVMEDIA_TYPE_AUDIO, +@@ -647,4 +652,5 @@ AVCodec aac_encoder = { + .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"), ++ .profiles = profiles, + }; +-- +1.7.3 + diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0045-libfaac-add-recognized-profiles-array.patch b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0045-libfaac-add-recognized-profiles-array.patch new file mode 100644 index 0000000000000..2312624751f1a --- /dev/null +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0045-libfaac-add-recognized-profiles-array.patch @@ -0,0 +1,39 @@ +From 8a30526df1c047d946d015167fbde54a5696384e Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Fri, 21 Jan 2011 20:45:56 +0200 +Subject: [PATCH 45/46] libfaac: add recognized profiles array + +Submitted upstream. + +--- + libavcodec/libfaac.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c +index b220b17..b1bf54d 100644 +--- a/libavcodec/libfaac.c ++++ b/libavcodec/libfaac.c +@@ -145,6 +145,14 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx) + return 0; + } + ++static const AVProfile profiles[] = { ++ { FF_PROFILE_AAC_MAIN, "Main" }, ++ { FF_PROFILE_AAC_LOW, "Low" }, ++ { FF_PROFILE_AAC_SSR, "SSR" }, ++ { FF_PROFILE_AAC_LTP, "LTP" }, ++ { FF_PROFILE_UNKNOWN }, ++}; ++ + AVCodec libfaac_encoder = { + "libfaac", + AVMEDIA_TYPE_AUDIO, +@@ -155,4 +163,5 @@ AVCodec libfaac_encoder = { + Faac_encode_close, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"), ++ .profiles = profiles, + }; +-- +1.7.3 + diff --git a/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0046-dca-add-profile-names.patch b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0046-dca-add-profile-names.patch new file mode 100644 index 0000000000000..a95ba5188ee9b --- /dev/null +++ b/xbmc/cores/dvdplayer/Codecs/ffmpeg/patches/0046-dca-add-profile-names.patch @@ -0,0 +1,40 @@ +From 6d7a0b722e98656cd769a972be6b61c03179d7d8 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Fri, 21 Jan 2011 20:49:10 +0200 +Subject: [PATCH 46/46] dca: add profile names + +Submitted and ok'd upstream. + +--- + libavcodec/dca.c | 10 ++++++++++ + 1 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/libavcodec/dca.c b/libavcodec/dca.c +index bc099e1..48b79e8 100644 +--- a/libavcodec/dca.c ++++ b/libavcodec/dca.c +@@ -1869,6 +1869,15 @@ static av_cold int dca_decode_end(AVCodecContext * avctx) + return 0; + } + ++static const AVProfile profiles[] = { ++ { FF_PROFILE_DTS, "DTS" }, ++ { FF_PROFILE_DTS_ES, "DTS-ES" }, ++ { FF_PROFILE_DTS_96_24, "DTS 96/24" }, ++ { FF_PROFILE_DTS_HD_HRA, "DTS-HD HRA" }, ++ { FF_PROFILE_DTS_HD_MA, "DTS-HD MA" }, ++ { FF_PROFILE_UNKNOWN }, ++}; ++ + AVCodec dca_decoder = { + .name = "dca", + .type = AVMEDIA_TYPE_AUDIO, +@@ -1879,4 +1888,5 @@ AVCodec dca_decoder = { + .decode = dca_decode_frame, + .close = dca_decode_end, + .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), ++ .profiles = profiles, + }; +-- +1.7.3 +