diff mbox series

[FFmpeg-devel,2/3] avcodec/codec_par: Move enum AVFieldOrder to defs.h

Message ID AS8P250MB0744A66F444801DD1BE770848FFCA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,v2,1/3] avformat/avformat: Deprecate AVFMT_ALLOW_FLUSH | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 25, 2023, 11:55 p.m. UTC
It is also used by AVCodecContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 doc/APIchanges         |  3 +++
 libavcodec/codec_par.h | 10 +---------
 libavcodec/defs.h      |  8 ++++++++
 3 files changed, 12 insertions(+), 9 deletions(-)

Comments

James Almer Sept. 26, 2023, 12:35 a.m. UTC | #1
On 9/25/2023 8:55 PM, Andreas Rheinhardt wrote:
> It is also used by AVCodecContext.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>   doc/APIchanges         |  3 +++
>   libavcodec/codec_par.h | 10 +---------
>   libavcodec/defs.h      |  8 ++++++++
>   3 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index ca7ffbb97e..c1ea3b7dc1 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
>   
>   API changes, most recent first:
>   
> +2023-09-26 - xxxxxxxxxx - lavc 60.xx.100 - codec_par.h defs.h
> +  Move the definition of enum AVFieldOrder from codec_par.h to defs.h.

Does this need an entry? If codec_par.h includes defs.h, it's basically 
transparent for the API user.

> +
>   2023-09-26 - xxxxxxxxxx - lavf 60.xx.100 - avformat.h
>     Deprecate AVFMT_ALLOW_FLUSH without replacement. Users can always
>     flush any muxer by sending a NULL packet.
> diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h
> index add90fdb1e..c1679ea042 100644
> --- a/libavcodec/codec_par.h
> +++ b/libavcodec/codec_par.h
> @@ -29,21 +29,13 @@
>   #include "libavutil/pixfmt.h"
>   
>   #include "codec_id.h"
> +#include "defs.h"
>   
>   /**
>    * @addtogroup lavc_core
>    * @{
>    */
>   
> -enum AVFieldOrder {
> -    AV_FIELD_UNKNOWN,
> -    AV_FIELD_PROGRESSIVE,
> -    AV_FIELD_TT,          ///< Top coded_first, top displayed first
> -    AV_FIELD_BB,          ///< Bottom coded first, bottom displayed first
> -    AV_FIELD_TB,          ///< Top coded first, bottom displayed first
> -    AV_FIELD_BT,          ///< Bottom coded first, top displayed first
> -};
> -
>   /**
>    * This struct describes the properties of an encoded stream.
>    *
> diff --git a/libavcodec/defs.h b/libavcodec/defs.h
> index ceed8d5e16..00d840ec19 100644
> --- a/libavcodec/defs.h
> +++ b/libavcodec/defs.h
> @@ -195,6 +195,14 @@
>   
>   #define AV_LEVEL_UNKNOWN                  -99
>   
> +enum AVFieldOrder {
> +    AV_FIELD_UNKNOWN,
> +    AV_FIELD_PROGRESSIVE,
> +    AV_FIELD_TT,          ///< Top coded_first, top displayed first
> +    AV_FIELD_BB,          ///< Bottom coded first, bottom displayed first
> +    AV_FIELD_TB,          ///< Top coded first, bottom displayed first
> +    AV_FIELD_BT,          ///< Bottom coded first, top displayed first
> +};
>   
>   /**
>    * @ingroup lavc_decoding
Andreas Rheinhardt Sept. 26, 2023, 9:17 a.m. UTC | #2
James Almer:
> On 9/25/2023 8:55 PM, Andreas Rheinhardt wrote:
>> It is also used by AVCodecContext.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>> ---
>>   doc/APIchanges         |  3 +++
>>   libavcodec/codec_par.h | 10 +---------
>>   libavcodec/defs.h      |  8 ++++++++
>>   3 files changed, 12 insertions(+), 9 deletions(-)
>>
>> diff --git a/doc/APIchanges b/doc/APIchanges
>> index ca7ffbb97e..c1ea3b7dc1 100644
>> --- a/doc/APIchanges
>> +++ b/doc/APIchanges
>> @@ -2,6 +2,9 @@ The last version increases of all libraries were on
>> 2023-02-09
>>     API changes, most recent first:
>>   +2023-09-26 - xxxxxxxxxx - lavc 60.xx.100 - codec_par.h defs.h
>> +  Move the definition of enum AVFieldOrder from codec_par.h to defs.h.
> 
> Does this need an entry? If codec_par.h includes defs.h, it's basically
> transparent for the API user.
> 

It does not break existing users, but existing users may take advantage
of it. Probably not in this case, but for moving stuff in general and
therefore we add these APIchanges entries.
But if you insist, I can omit it.

- Andreas
Anton Khirnov Sept. 28, 2023, 10:17 a.m. UTC | #3
Quoting Andreas Rheinhardt (2023-09-26 11:17:25)
> James Almer:
> > On 9/25/2023 8:55 PM, Andreas Rheinhardt wrote:
> >> It is also used by AVCodecContext.
> >>
> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> >> ---
> >>   doc/APIchanges         |  3 +++
> >>   libavcodec/codec_par.h | 10 +---------
> >>   libavcodec/defs.h      |  8 ++++++++
> >>   3 files changed, 12 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/doc/APIchanges b/doc/APIchanges
> >> index ca7ffbb97e..c1ea3b7dc1 100644
> >> --- a/doc/APIchanges
> >> +++ b/doc/APIchanges
> >> @@ -2,6 +2,9 @@ The last version increases of all libraries were on
> >> 2023-02-09
> >>     API changes, most recent first:
> >>   +2023-09-26 - xxxxxxxxxx - lavc 60.xx.100 - codec_par.h defs.h
> >> +  Move the definition of enum AVFieldOrder from codec_par.h to defs.h.
> > 
> > Does this need an entry? If codec_par.h includes defs.h, it's basically
> > transparent for the API user.
> > 
> 
> It does not break existing users, but existing users may take advantage
> of it. Probably not in this case, but for moving stuff in general and
> therefore we add these APIchanges entries.
> But if you insist, I can omit it.

I think it should be mentioned.
diff mbox series

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index ca7ffbb97e..c1ea3b7dc1 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@  The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
+2023-09-26 - xxxxxxxxxx - lavc 60.xx.100 - codec_par.h defs.h
+  Move the definition of enum AVFieldOrder from codec_par.h to defs.h.
+
 2023-09-26 - xxxxxxxxxx - lavf 60.xx.100 - avformat.h
   Deprecate AVFMT_ALLOW_FLUSH without replacement. Users can always
   flush any muxer by sending a NULL packet.
diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h
index add90fdb1e..c1679ea042 100644
--- a/libavcodec/codec_par.h
+++ b/libavcodec/codec_par.h
@@ -29,21 +29,13 @@ 
 #include "libavutil/pixfmt.h"
 
 #include "codec_id.h"
+#include "defs.h"
 
 /**
  * @addtogroup lavc_core
  * @{
  */
 
-enum AVFieldOrder {
-    AV_FIELD_UNKNOWN,
-    AV_FIELD_PROGRESSIVE,
-    AV_FIELD_TT,          ///< Top coded_first, top displayed first
-    AV_FIELD_BB,          ///< Bottom coded first, bottom displayed first
-    AV_FIELD_TB,          ///< Top coded first, bottom displayed first
-    AV_FIELD_BT,          ///< Bottom coded first, top displayed first
-};
-
 /**
  * This struct describes the properties of an encoded stream.
  *
diff --git a/libavcodec/defs.h b/libavcodec/defs.h
index ceed8d5e16..00d840ec19 100644
--- a/libavcodec/defs.h
+++ b/libavcodec/defs.h
@@ -195,6 +195,14 @@ 
 
 #define AV_LEVEL_UNKNOWN                  -99
 
+enum AVFieldOrder {
+    AV_FIELD_UNKNOWN,
+    AV_FIELD_PROGRESSIVE,
+    AV_FIELD_TT,          ///< Top coded_first, top displayed first
+    AV_FIELD_BB,          ///< Bottom coded first, bottom displayed first
+    AV_FIELD_TB,          ///< Top coded first, bottom displayed first
+    AV_FIELD_BT,          ///< Bottom coded first, top displayed first
+};
 
 /**
  * @ingroup lavc_decoding