[FFmpeg-devel] [RFC] additinal desc_type for dtshd mpeg-ts demuxer

Måns Rullgård mans
Mon Jun 9 08:13:53 CEST 2008


elupus <elupus at ecce.se> writes:

>> 
>> I highlighted the interesting ones. Oddly is not listing 0x8a as a dts
>> track which lavf's demuxer does. Would a patch be accepted adding the
>> desc_types not in lavf currently, under the same hdmv check?
>> 
>
> Something like the following. It's only tested for type 0x86 at the moment.
>
> ps. Patch might not apply to svn, as I manually removed quite a few hunks.
> It's mainly for comments.
>
> Joakim
>
> Index: libavformat/mpegts.c
> ===================================================================
> --- libavformat/mpegts.c	(revision 13531)
> +++ libavformat/mpegts.c	(working copy)
> @@ -605,6 +617,12 @@
>  
>          /* now create ffmpeg stream */
>          switch(stream_type) {
> +        case STREAM_TYPE_AUDIO_HDMV_DTS_HD:
> +        case STREAM_TYPE_AUDIO_HDMV_DTS_HD_MASTER:
> +        case STREAM_TYPE_AUDIO_HDMV_AC3_TRUE_HD:
> +        case STREAM_TYPE_AUDIO_HDMV_AC3_PLUS:
> +            if(!has_hdmv_descr)
> +                break;
>          case STREAM_TYPE_AUDIO_MPEG1:
>          case STREAM_TYPE_AUDIO_MPEG2:
>          case STREAM_TYPE_VIDEO_MPEG1:

Move the case STREAM_TYPE_HDMV_DTS to that new group too, and remove
the other hdmv-related if statement.

> @@ -951,11 +974,15 @@
>          codec_id = CODEC_ID_AAC;
>          break;
>      case STREAM_TYPE_AUDIO_AC3:
> +    case STREAM_TYPE_AUDIO_HDMV_AC3_TRUE_HD:
> +    case STREAM_TYPE_AUDIO_HDMV_AC3_PLUS:
>          codec_type = CODEC_TYPE_AUDIO;
>          codec_id = CODEC_ID_AC3;
>          break;
>      case STREAM_TYPE_AUDIO_DTS:
>      case STREAM_TYPE_AUDIO_HDMV_DTS:
> +    case STREAM_TYPE_AUDIO_HDMV_DTS_HD:
> +    case STREAM_TYPE_AUDIO_HDMV_DTS_HD_MASTER:
>          codec_type = CODEC_TYPE_AUDIO;
>          codec_id = CODEC_ID_DTS;
>          break;

Is it correct to use the same codec id?  Can AC3/DTS decoders in
general handle all the variants?  Might an lavf-using app want to
distinguish between them?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list