diff mbox

[FFmpeg-devel,5/6] avcodec/avcodec.h: add AV_CODEC_ID_TIMED_TEXT_MARKUP

Message ID 20180531000536.11482-5-cus@passwd.hu
State New
Headers show

Commit Message

Marton Balint May 31, 2018, 12:05 a.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavcodec/avcodec.h    | 1 +
 libavcodec/codec_desc.c | 8 ++++++++
 libavcodec/version.h    | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

Comments

Rostislav Pehlivanov May 31, 2018, 1:59 a.m. UTC | #1
On 31 May 2018 at 01:05, Marton Balint <cus@passwd.hu> wrote:

> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavcodec/avcodec.h    | 1 +
>  libavcodec/codec_desc.c | 8 ++++++++
>  libavcodec/version.h    | 2 +-
>  3 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index fb0c6fae70..91ccef538e 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -665,6 +665,7 @@ enum AVCodecID {
>      AV_CODEC_ID_PJS,
>      AV_CODEC_ID_ASS,
>      AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
> +    AV_CODEC_ID_TIMED_TEXT_MARKUP,
>
>      /* other specific kind of codecs (generally used for attachments) */
>      AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID
> pointing at the start of various fake codecs.
> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
> index 79552a910d..9d38e63284 100644
> --- a/libavcodec/codec_desc.c
> +++ b/libavcodec/codec_desc.c
> @@ -3047,6 +3047,14 @@ static const AVCodecDescriptor codec_descriptors[]
> = {
>          .long_name = NULL_IF_CONFIG_SMALL("HDMV Text subtitle"),
>          .props     = AV_CODEC_PROP_TEXT_SUB,
>      },
> +    {
> +        .id        = AV_CODEC_ID_TIMED_TEXT_MARKUP,
> +        .type      = AVMEDIA_TYPE_SUBTITLE,
> +        .name      = "ttml",
> +        .long_name = NULL_IF_CONFIG_SMALL("Timed Text Markup Language"),
> +        .props     = AV_CODEC_PROP_TEXT_SUB,
> +    },
> +
>
>      /* other kind of codecs and pseudo-codecs */
>      {
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index f65346a1ac..5a70093eaa 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -29,7 +29,7 @@
>
>  #define LIBAVCODEC_VERSION_MAJOR  58
>  #define LIBAVCODEC_VERSION_MINOR  19
> -#define LIBAVCODEC_VERSION_MICRO 104
> +#define LIBAVCODEC_VERSION_MICRO 105
>
>  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR,
> \
>                                                 LIBAVCODEC_VERSION_MINOR, \
> --
> 2.16.3
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

I'd prefer AV_CODEC_ID_TTML, TTML is how pretty much everyone refers to it
Tomas Härdin June 5, 2018, 11:28 a.m. UTC | #2
tor 2018-05-31 klockan 02:05 +0200 skrev Marton Balint:
> > Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavcodec/avcodec.h    | 1 +
>  libavcodec/codec_desc.c | 8 ++++++++
>  libavcodec/version.h    | 2 +-
>  3 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index fb0c6fae70..91ccef538e 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -665,6 +665,7 @@ enum AVCodecID {
>      AV_CODEC_ID_PJS,
>      AV_CODEC_ID_ASS,
>      AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
> +    AV_CODEC_ID_TIMED_TEXT_MARKUP,

[...]

>  #define LIBAVCODEC_VERSION_MAJOR  58
>  #define LIBAVCODEC_VERSION_MINOR  19
> -#define LIBAVCODEC_VERSION_MICRO 104
> +#define LIBAVCODEC_VERSION_MICRO 105

Adding CODEC_IDs needs a minor version bump, not micro

/Tomas
Marton Balint June 8, 2018, 9:49 p.m. UTC | #3
On Tue, 5 Jun 2018, Tomas Härdin wrote:

> tor 2018-05-31 klockan 02:05 +0200 skrev Marton Balint:
>> > Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>>  libavcodec/avcodec.h    | 1 +
>>  libavcodec/codec_desc.c | 8 ++++++++
>>  libavcodec/version.h    | 2 +-
>>  3 files changed, 10 insertions(+), 1 deletion(-)
>> 
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index fb0c6fae70..91ccef538e 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -665,6 +665,7 @@ enum AVCodecID {
>>      AV_CODEC_ID_PJS,
>>      AV_CODEC_ID_ASS,
>>      AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
>> +    AV_CODEC_ID_TIMED_TEXT_MARKUP,
>
> [...]
>
>>  #define LIBAVCODEC_VERSION_MAJOR  58
>>  #define LIBAVCODEC_VERSION_MINOR  19
>> -#define LIBAVCODEC_VERSION_MICRO 104
>> +#define LIBAVCODEC_VERSION_MICRO 105
>
> Adding CODEC_IDs needs a minor version bump, not micro

Pushed the whole set with a minor bump, and I renamed the codec id to 
AV_CODEC_ID_TTML as requested.

Thanks for all the comments and reviews. Another batch of mxf patches are 
on the way... :)

Regards,
Marton
diff mbox

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index fb0c6fae70..91ccef538e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -665,6 +665,7 @@  enum AVCodecID {
     AV_CODEC_ID_PJS,
     AV_CODEC_ID_ASS,
     AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
+    AV_CODEC_ID_TIMED_TEXT_MARKUP,
 
     /* other specific kind of codecs (generally used for attachments) */
     AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID pointing at the start of various fake codecs.
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 79552a910d..9d38e63284 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -3047,6 +3047,14 @@  static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("HDMV Text subtitle"),
         .props     = AV_CODEC_PROP_TEXT_SUB,
     },
+    {
+        .id        = AV_CODEC_ID_TIMED_TEXT_MARKUP,
+        .type      = AVMEDIA_TYPE_SUBTITLE,
+        .name      = "ttml",
+        .long_name = NULL_IF_CONFIG_SMALL("Timed Text Markup Language"),
+        .props     = AV_CODEC_PROP_TEXT_SUB,
+    },
+
 
     /* other kind of codecs and pseudo-codecs */
     {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index f65346a1ac..5a70093eaa 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@ 
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  19
-#define LIBAVCODEC_VERSION_MICRO 104
+#define LIBAVCODEC_VERSION_MICRO 105
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \