diff mbox series

[FFmpeg-devel,1/6] lavc/codec2utils: Use actual libcodec2 version

Message ID d62160779ddc0f16521167819e70994a1270e662.camel@haerdin.se
State New
Headers show
Series [FFmpeg-devel,1/6] lavc/codec2utils: Use actual libcodec2 version | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 fail Make failed
andriy/make_x86 fail Make failed

Commit Message

Tomas Härdin Dec. 28, 2023, 6:43 p.m. UTC
libcodec2 has reached 1.X so it's about time the bindings receive some
attention. This patchset also includes some much-needed tests. Where do
I submit files for inclusion in FATE again? They are very small as is
to be expected from a codec that runs at 700-3200 bit/s

/Tomas

Comments

Michael Niedermayer Dec. 28, 2023, 8:29 p.m. UTC | #1
On Thu, Dec 28, 2023 at 07:43:09PM +0100, Tomas Härdin wrote:
> libcodec2 has reached 1.X so it's about time the bindings receive some
> attention. This patchset also includes some much-needed tests. Where do
> I submit files for inclusion in FATE again? They are very small as is
> to be expected from a codec that runs at 700-3200 bit/s
> 
> /Tomas

>  codec2utils.h |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> a79a98f8ffc27ca6d79c9d373957fa0bdc985ef2  0001-lavc-codec2utils-Use-actual-libcodec2-version.patch
> From 7205e741aaadc354b403010c97f9cd803eec612d Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
> Date: Wed, 27 Dec 2023 17:32:21 +0100
> Subject: [PATCH 1/6] lavc/codec2utils: Use actual libcodec2 version

This breaks build here

CC	libavformat/codec2.o
In file included from libavformat/codec2.c:24:0:
./libavcodec/codec2utils.h:26:10: fatal error: codec2/version.h: No such file or directory
 #include <codec2/version.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
ffbuild/common.mak:81: recipe for target 'libavformat/codec2.o' failed
make: *** [libavformat/codec2.o] Error 1


[...]
Tomas Härdin Dec. 28, 2023, 9:21 p.m. UTC | #2
tor 2023-12-28 klockan 21:29 +0100 skrev Michael Niedermayer:
> On Thu, Dec 28, 2023 at 07:43:09PM +0100, Tomas Härdin wrote:
> > libcodec2 has reached 1.X so it's about time the bindings receive
> > some
> > attention. This patchset also includes some much-needed tests.
> > Where do
> > I submit files for inclusion in FATE again? They are very small as
> > is
> > to be expected from a codec that runs at 700-3200 bit/s
> > 
> > /Tomas
> 
> >  codec2utils.h |    6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > a79a98f8ffc27ca6d79c9d373957fa0bdc985ef2  0001-lavc-codec2utils-
> > Use-actual-libcodec2-version.patch
> > From 7205e741aaadc354b403010c97f9cd803eec612d Mon Sep 17 00:00:00
> > 2001
> > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
> > Date: Wed, 27 Dec 2023 17:32:21 +0100
> > Subject: [PATCH 1/6] lavc/codec2utils: Use actual libcodec2 version
> 
> This breaks build here
> 
> CC      libavformat/codec2.o
> In file included from libavformat/codec2.c:24:0:
> ./libavcodec/codec2utils.h:26:10: fatal error: codec2/version.h: No
> such file or directory
>  #include <codec2/version.h>
>           ^~~~~~~~~~~~~~~~~~

What version of libcodec2 are you using? I don't think we can rely on
versions that don't expose version information, which only comes about
because I explicitly told them to please expose it in a header. I don't
think we can even probe version at configure time otherwise.

libcodec2-dev on Debian bookworm works for me

/Tomas
Michael Niedermayer Dec. 28, 2023, 11:30 p.m. UTC | #3
On Thu, Dec 28, 2023 at 10:21:23PM +0100, Tomas Härdin wrote:
> tor 2023-12-28 klockan 21:29 +0100 skrev Michael Niedermayer:
> > On Thu, Dec 28, 2023 at 07:43:09PM +0100, Tomas Härdin wrote:
> > > libcodec2 has reached 1.X so it's about time the bindings receive
> > > some
> > > attention. This patchset also includes some much-needed tests.
> > > Where do
> > > I submit files for inclusion in FATE again? They are very small as
> > > is
> > > to be expected from a codec that runs at 700-3200 bit/s
> > > 
> > > /Tomas
> > 
> > >  codec2utils.h |    6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > a79a98f8ffc27ca6d79c9d373957fa0bdc985ef2  0001-lavc-codec2utils-
> > > Use-actual-libcodec2-version.patch
> > > From 7205e741aaadc354b403010c97f9cd803eec612d Mon Sep 17 00:00:00
> > > 2001
> > > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
> > > Date: Wed, 27 Dec 2023 17:32:21 +0100
> > > Subject: [PATCH 1/6] lavc/codec2utils: Use actual libcodec2 version
> > 
> > This breaks build here
> > 
> > CC      libavformat/codec2.o
> > In file included from libavformat/codec2.c:24:0:
> > ./libavcodec/codec2utils.h:26:10: fatal error: codec2/version.h: No
> > such file or directory
> >  #include <codec2/version.h>
> >           ^~~~~~~~~~~~~~~~~~
> 
> What version of libcodec2 are you using? I don't think we can rely on
> versions that don't expose version information, which only comes about
> because I explicitly told them to please expose it in a header. I don't
> think we can even probe version at configure time otherwise.
> 
> libcodec2-dev on Debian bookworm works for me

i think theres no libcodec2* on the box and this header is used outside
checks for libcodec2* ...

thx

[...]
Tomas Härdin Dec. 29, 2023, 12:43 p.m. UTC | #4
fre 2023-12-29 klockan 00:30 +0100 skrev Michael Niedermayer:
> On Thu, Dec 28, 2023 at 10:21:23PM +0100, Tomas Härdin wrote:
> > tor 2023-12-28 klockan 21:29 +0100 skrev Michael Niedermayer:
> > > On Thu, Dec 28, 2023 at 07:43:09PM +0100, Tomas Härdin wrote:
> > > > libcodec2 has reached 1.X so it's about time the bindings
> > > > receive
> > > > some
> > > > attention. This patchset also includes some much-needed tests.
> > > > Where do
> > > > I submit files for inclusion in FATE again? They are very small
> > > > as
> > > > is
> > > > to be expected from a codec that runs at 700-3200 bit/s
> > > > 
> > > > /Tomas
> > > 
> > > >  codec2utils.h |    6 +++---
> > > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > > a79a98f8ffc27ca6d79c9d373957fa0bdc985ef2  0001-lavc-
> > > > codec2utils-
> > > > Use-actual-libcodec2-version.patch
> > > > From 7205e741aaadc354b403010c97f9cd803eec612d Mon Sep 17
> > > > 00:00:00
> > > > 2001
> > > > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
> > > > Date: Wed, 27 Dec 2023 17:32:21 +0100
> > > > Subject: [PATCH 1/6] lavc/codec2utils: Use actual libcodec2
> > > > version
> > > 
> > > This breaks build here
> > > 
> > > CC      libavformat/codec2.o
> > > In file included from libavformat/codec2.c:24:0:
> > > ./libavcodec/codec2utils.h:26:10: fatal error: codec2/version.h:
> > > No
> > > such file or directory
> > >  #include <codec2/version.h>
> > >           ^~~~~~~~~~~~~~~~~~
> > 
> > What version of libcodec2 are you using? I don't think we can rely
> > on
> > versions that don't expose version information, which only comes
> > about
> > because I explicitly told them to please expose it in a header. I
> > don't
> > think we can even probe version at configure time otherwise.
> > 
> > libcodec2-dev on Debian bookworm works for me
> 
> i think theres no libcodec2* on the box and this header is used
> outside
> checks for libcodec2* ...

Right, the demuxers and muxer can be used without having the library
installed. An #if CONFIG_LIBCODEC2 with a fallback to a fake version
should work. Given that 1.2.0 is the latest release that seems a
reasonable version to signal, indicating "1.2.0 was the last time we
checked that we're compatible with libcodec2"..

/Tomas
Tomas Härdin Dec. 30, 2023, 4 p.m. UTC | #5
fre 2023-12-29 klockan 00:30 +0100 skrev Michael Niedermayer:
> On Thu, Dec 28, 2023 at 10:21:23PM +0100, Tomas Härdin wrote:
> > tor 2023-12-28 klockan 21:29 +0100 skrev Michael Niedermayer:
> > > On Thu, Dec 28, 2023 at 07:43:09PM +0100, Tomas Härdin wrote:
> > > > libcodec2 has reached 1.X so it's about time the bindings
> > > > receive
> > > > some
> > > > attention. This patchset also includes some much-needed tests.
> > > > Where do
> > > > I submit files for inclusion in FATE again? They are very small
> > > > as
> > > > is
> > > > to be expected from a codec that runs at 700-3200 bit/s
> > > > 
> > > > /Tomas
> > > 
> > > >  codec2utils.h |    6 +++---
> > > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > > a79a98f8ffc27ca6d79c9d373957fa0bdc985ef2  0001-lavc-
> > > > codec2utils-
> > > > Use-actual-libcodec2-version.patch
> > > > From 7205e741aaadc354b403010c97f9cd803eec612d Mon Sep 17
> > > > 00:00:00
> > > > 2001
> > > > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
> > > > Date: Wed, 27 Dec 2023 17:32:21 +0100
> > > > Subject: [PATCH 1/6] lavc/codec2utils: Use actual libcodec2
> > > > version
> > > 
> > > This breaks build here
> > > 
> > > CC      libavformat/codec2.o
> > > In file included from libavformat/codec2.c:24:0:
> > > ./libavcodec/codec2utils.h:26:10: fatal error: codec2/version.h:
> > > No
> > > such file or directory
> > >  #include <codec2/version.h>
> > >           ^~~~~~~~~~~~~~~~~~
> > 
> > What version of libcodec2 are you using? I don't think we can rely
> > on
> > versions that don't expose version information, which only comes
> > about
> > because I explicitly told them to please expose it in a header. I
> > don't
> > think we can even probe version at configure time otherwise.
> > 
> > libcodec2-dev on Debian bookworm works for me
> 
> i think theres no libcodec2* on the box and this header is used
> outside
> checks for libcodec2* ...

Updated patch attached

/Tomas
diff mbox series

Patch

From 7205e741aaadc354b403010c97f9cd803eec612d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
Date: Wed, 27 Dec 2023 17:32:21 +0100
Subject: [PATCH 1/6] lavc/codec2utils: Use actual libcodec2 version

---
 libavcodec/codec2utils.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/codec2utils.h b/libavcodec/codec2utils.h
index 6812ae895c..a03c3c0c5f 100644
--- a/libavcodec/codec2utils.h
+++ b/libavcodec/codec2utils.h
@@ -23,6 +23,7 @@ 
 #define AVCODEC_CODEC2UTILS_H
 
 #include <stdint.h>
+#include <codec2/version.h>
 
 //Highest mode we're willing to use.
 //Don't want to let users accidentally produce files that can't be decoded in the future.
@@ -49,9 +50,8 @@ 
 
 //Used in codec2raw demuxer and libcodec2 encoder
 static inline void codec2_make_extradata(uint8_t *ptr, int mode) {
-    //version 0.8 as of 2017-12-23 (r3386)
-    ptr[0] = 0;     //major
-    ptr[1] = 8;     //minor
+    ptr[0] = CODEC2_VERSION_MAJOR;
+    ptr[1] = CODEC2_VERSION_MINOR;
     ptr[2] = mode;  //mode
     ptr[3] = 0;     //flags
 }
-- 
2.39.2