diff mbox

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

Message ID 1570843684-16418-1-git-send-email-hwrenx@126.com
State New
Headers show

Commit Message

hwren Oct. 12, 2019, 1:28 a.m. UTC
From: hwrenx <hwrenx@126.com>

Signed-off-by: hwrenx <hwrenx@126.com>
---
 libavformat/mpegts.h    | 1 +
 libavformat/mpegtsenc.c | 3 +++
 2 files changed, 4 insertions(+)

Comments

Liu Steven Oct. 12, 2019, 3:14 a.m. UTC | #1
> 在 2019年10月12日,09:28,hwren <hwrenx@126.com> 写道:
> 
> From: hwrenx <hwrenx@126.com>
> 
> Signed-off-by: hwrenx <hwrenx@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
> 
> #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
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe”.

LGTM


Thanks
Steven
mypopy@gmail.com Oct. 12, 2019, 11:40 a.m. UTC | #2
On Sat, Oct 12, 2019 at 10:00 AM hwren <hwrenx@126.com> wrote:
>
> From: hwrenx <hwrenx@126.com>
>
> Signed-off-by: hwrenx <hwrenx@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

>
>  #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
hwren Oct. 13, 2019, 1:37 p.m. UTC | #3
At 2019-10-12 19:40:15, "mypopy@gmail.com" <mypopy@gmail.com> wrote:
>On Sat, Oct 12, 2019 at 10:00 AM hwren <hwrenx@126.com> wrote:
>>
>> From: hwrenx <hwrenx@126.com>
>>
>> Signed-off-by: hwrenx <hwrenx@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@ffmpeg.org
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

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
 
 #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;