Browse Source

mpegts: add support for stream_type 0x42, which is CAVS

This allows demuxing and muxing of CAVS TS streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n2.0
Can Wu Anton Khirnov 12 years ago
parent
commit
81cf53e133
4 changed files with 6 additions and 0 deletions
  1. +1
    -0
      libavformat/mpeg.h
  2. +1
    -0
      libavformat/mpegts.c
  3. +1
    -0
      libavformat/mpegts.h
  4. +3
    -0
      libavformat/mpegtsenc.c

+ 1
- 0
libavformat/mpeg.h View File

@@ -54,6 +54,7 @@
#define STREAM_TYPE_AUDIO_AAC 0x0f #define STREAM_TYPE_AUDIO_AAC 0x0f
#define STREAM_TYPE_VIDEO_MPEG4 0x10 #define STREAM_TYPE_VIDEO_MPEG4 0x10
#define STREAM_TYPE_VIDEO_H264 0x1b #define STREAM_TYPE_VIDEO_H264 0x1b
#define STREAM_TYPE_VIDEO_CAVS 0x42


#define STREAM_TYPE_AUDIO_AC3 0x81 #define STREAM_TYPE_AUDIO_AC3 0x81
#define STREAM_TYPE_AUDIO_DTS 0x8a #define STREAM_TYPE_AUDIO_DTS 0x8a


+ 1
- 0
libavformat/mpegts.c View File

@@ -523,6 +523,7 @@ static const StreamType ISO_types[] = {
{ 0x10, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG4 }, { 0x10, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG4 },
{ 0x11, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC_LATM }, /* LATM syntax */ { 0x11, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC_LATM }, /* LATM syntax */
{ 0x1b, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H264 }, { 0x1b, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H264 },
{ 0x42, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_CAVS },
{ 0xd1, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC }, { 0xd1, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC },
{ 0xea, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 }, { 0xea, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 },
{ 0 }, { 0 },


+ 1
- 0
libavformat/mpegts.h View File

@@ -52,6 +52,7 @@
#define STREAM_TYPE_AUDIO_AAC_LATM 0x11 #define STREAM_TYPE_AUDIO_AAC_LATM 0x11
#define STREAM_TYPE_VIDEO_MPEG4 0x10 #define STREAM_TYPE_VIDEO_MPEG4 0x10
#define STREAM_TYPE_VIDEO_H264 0x1b #define STREAM_TYPE_VIDEO_H264 0x1b
#define STREAM_TYPE_VIDEO_CAVS 0x42
#define STREAM_TYPE_VIDEO_VC1 0xea #define STREAM_TYPE_VIDEO_VC1 0xea
#define STREAM_TYPE_VIDEO_DIRAC 0xd1 #define STREAM_TYPE_VIDEO_DIRAC 0xd1




+ 3
- 0
libavformat/mpegtsenc.c View File

@@ -279,6 +279,9 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
case AV_CODEC_ID_H264: case AV_CODEC_ID_H264:
stream_type = STREAM_TYPE_VIDEO_H264; stream_type = STREAM_TYPE_VIDEO_H264;
break; break;
case AV_CODEC_ID_CAVS:
stream_type = STREAM_TYPE_VIDEO_CAVS;
break;
case AV_CODEC_ID_DIRAC: case AV_CODEC_ID_DIRAC:
stream_type = STREAM_TYPE_VIDEO_DIRAC; stream_type = STREAM_TYPE_VIDEO_DIRAC;
break; break;


Loading…
Cancel
Save