[FFmpeg-devel] [PATCH] lavf/mpegtsenc: add stream type AVS2

hwren hwrenx at 126.com
Sun Oct 13 16:37:54 EEST 2019










At 2019-10-12 19:40:15, "mypopy at gmail.com" <mypopy at gmail.com> wrote:
>On Sat, Oct 12, 2019 at 10:00 AM hwren <hwrenx at 126.com> wrote:
>>
>> From: hwrenx <hwrenx at 126.com>
>>
>> Signed-off-by: hwrenx <hwrenx at 126.com>
>> ---
>>  libavformat/mpegts.h    | 1 +
>>  libavformat/mpegtsenc.c | 3 +++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
>> index ecc3d33..78abe72 100644
>> --- a/libavformat/mpegts.h
>> +++ b/libavformat/mpegts.h
>> @@ -119,6 +119,7 @@
>>  #define STREAM_TYPE_VIDEO_CAVS      0x42
>>  #define STREAM_TYPE_VIDEO_VC1       0xea
>>  #define STREAM_TYPE_VIDEO_DIRAC     0xd1
>> +#define STREAM_TYPE_VIDEO_AVS2      0xd2
>Can you supply the spec for this new stream type? Thx

Sure, the definition of stream type 0xd2 refers to the Chinese national standard GB/T 17975.1.
i.e. Information technology - Generic coding of moving pictures and associated audio information Part 1: Systems.

>
>>
>>  #define STREAM_TYPE_AUDIO_AC3       0x81
>>  #define STREAM_TYPE_AUDIO_DTS       0x82
>> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
>> index 0678657..b80ab25 100644
>> --- a/libavformat/mpegtsenc.c
>> +++ b/libavformat/mpegtsenc.c
>> @@ -336,6 +336,9 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
>>          case AV_CODEC_ID_CAVS:
>>              stream_type = STREAM_TYPE_VIDEO_CAVS;
>>              break;
>> +        case AV_CODEC_ID_AVS2:
>> +            stream_type = STREAM_TYPE_VIDEO_AVS2;
>> +            break;
>>          case AV_CODEC_ID_DIRAC:
>>              stream_type = STREAM_TYPE_VIDEO_DIRAC;
>>              break;
>> --
>> 2.7.4

Thanks
Huiwen Ren

>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list