Re: [FFmpeg-devel] [PATCH] avcodec/jni: fix mixed declaration and code

2024-04-21 Thread Matthieu Bouron
On Mon, Apr 15, 2024 at 07:02:36PM +0200, Matthieu Bouron wrote: > On Thu, Apr 04, 2024 at 10:07:25PM +0200, Matthieu Bouron wrote: > > --- > > libavcodec/jni.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/j

Re: [FFmpeg-devel] [PATCH] avcodec/jni: fix mixed declaration and code

2024-04-15 Thread Matthieu Bouron
On Thu, Apr 04, 2024 at 10:07:25PM +0200, Matthieu Bouron wrote: > --- > libavcodec/jni.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/jni.c b/libavcodec/jni.c > index 1193c608c3..fcb4837413 100644 > --- a/libavcodec/jni.c >

Re: [FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0

2024-04-12 Thread Matthieu Bouron
On Thu, Apr 11, 2024 at 2:17 PM Zhao Zhili wrote: > > We don’t have a minimum required version of Android in FFmpeg. > libavdevice/android_camera requires Android 7, Java MediaCodec > requires Android 4.1, and NDK MediaCodec requires Android 5.0. > > Without an explicit version, it’s unclear for

[FFmpeg-devel] [PATCH] avcodec/jni: fix mixed declaration and code

2024-04-04 Thread Matthieu Bouron
--- libavcodec/jni.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/jni.c b/libavcodec/jni.c index 1193c608c3..fcb4837413 100644 --- a/libavcodec/jni.c +++ b/libavcodec/jni.c @@ -84,11 +84,13 @@ void *av_jni_get_java_vm(void *log_ctx) int

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec, avformat/ffjni: fix duplicate JNI symbols

2024-04-04 Thread Matthieu Bouron
On Tue, Apr 02, 2024 at 02:55:16PM +0200, Matthieu Bouron wrote: > On Mon, Apr 01, 2024 at 10:03:54AM +0200, Matthieu Bouron wrote: > > On Wed, Mar 27, 2024 at 09:06:19AM -0400, Leo Izen wrote: > > > Use SHLIBOBJS and STLIBOBJS in the Makefiles for avcodec and avformat, &g

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec, avformat/ffjni: fix duplicate JNI symbols

2024-04-02 Thread Matthieu Bouron
On Mon, Apr 01, 2024 at 10:03:54AM +0200, Matthieu Bouron wrote: > On Wed, Mar 27, 2024 at 09:06:19AM -0400, Leo Izen wrote: > > Use SHLIBOBJS and STLIBOBJS in the Makefiles for avcodec and avformat, > > and add a stub ffjni.c to libavformat, which allows the symbols to be

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec, avformat/ffjni: fix duplicate JNI symbols

2024-04-01 Thread Matthieu Bouron
On Wed, Mar 27, 2024 at 09:06:19AM -0400, Leo Izen wrote: > Use SHLIBOBJS and STLIBOBJS in the Makefiles for avcodec and avformat, > and add a stub ffjni.c to libavformat, which allows the symbols to be > duplicated for shared builds but not static builds. > > Signed-off-by: Leo Izen > --- >

Re: [FFmpeg-devel] [PATCH] Changelog: add Android content URIs protocol entry

2024-03-26 Thread Matthieu Bouron
On Tue, Mar 26, 2024 at 04:30:53PM +0100, Stefano Sabatini wrote: > On date Monday 2024-03-25 09:14:15 +0100, Matthieu Bouron wrote: > > --- > > Changelog | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/Changelog b/Changelog > &

[FFmpeg-devel] [PATCH] Changelog: add Android content URIs protocol entry

2024-03-25 Thread Matthieu Bouron
--- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 934241a965..e4373ff991 100644 --- a/Changelog +++ b/Changelog @@ -37,6 +37,7 @@ version : - Support PacketTypeMetadata of PacketType in enhanced flv format - ffplay with hwaccel decoding support

Re: [FFmpeg-devel] [PATCH 1/2] avformat/file: Constify android content protocol

2024-03-25 Thread Matthieu Bouron
On Mon, Mar 25, 2024 at 02:55:32AM +0100, Andreas Rheinhardt wrote: > Andreas Rheinhardt: > > (The discrepancy between the definition and the declaration > > in protocols.c is actually UB.) > > > > Signed-off-by: Andreas Rheinhardt > > --- > > This and the next patch have not been tested (apart

Re: [FFmpeg-devel] [PATCH] avcodec, avformat/ffjni: fix duplicate JNI symbols

2024-03-24 Thread Matthieu Bouron
On Sun, Mar 24, 2024 at 01:17:41AM -0400, Leo Izen wrote: > Use SHLIBOBJS and STLIBOBJS in the Makefiles for avcodec and avformat, > and add a stub ffjni.c to libavformat, which allows the symbols to be > duplicated for shared builds but not static builds. > > Signed-off-by: Leo Izen > --- >

Re: [FFmpeg-devel] Add protocol for Android content providers (v4)

2024-03-23 Thread Matthieu Bouron
On Tue, Mar 19, 2024 at 06:49:43PM +0100, Matthieu Bouron wrote: > On Sun, Mar 17, 2024 at 11:28:31PM +0100, Matthieu Bouron wrote: > > Diff with previous iteration: > > - rebaed on latest master > > - applied feedback from Zhao (removed HAVE_SETMODE block, use a typedef &g

Re: [FFmpeg-devel] Add protocol for Android content providers (v4)

2024-03-19 Thread Matthieu Bouron
On Sun, Mar 17, 2024 at 11:28:31PM +0100, Matthieu Bouron wrote: > Diff with previous iteration: > - rebaed on latest master > - applied feedback from Zhao (removed HAVE_SETMODE block, use a typedef > struct, > check that the fd is seekable, moved doc/APIChanges changes to the r

Re: [FFmpeg-devel] [PATCH v4 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-03-17 Thread Matthieu Bouron
On Sun, Mar 17, 2024 at 11:38 PM Andreas Rheinhardt wrote: > > Matthieu Bouron: > > This will allow users to pass the Android ApplicationContext which is > > mandatory > > to retrieve the ContentResolver responsible to resolve/open Android > > content-uri. >

Re: [FFmpeg-devel] [PATCH v2 2/6] avformat: add Android content resolver protocol support

2024-03-17 Thread Matthieu Bouron
On Sun, Mar 17, 2024 at 12:33:04PM +0800, Zhao Zhili wrote: > Sorry for the long delay of review. > > > On Mar 5, 2024, at 03:37, Matthieu Bouron wrote: > > > > On Tue, Feb 27, 2024 at 03:50:38PM +0100, Matthieu Bouron wrote: > >> Handles Android

[FFmpeg-devel] [PATCH v4 6/6] avcodec/mediacodec_wrapper: remove unnecessary NULL checks before calling Delete{Global, Local}Ref()

2024-03-17 Thread Matthieu Bouron
Delete{Global,Local}Ref already handle NULL. --- libavcodec/mediacodec_wrapper.c | 189 1 file changed, 47 insertions(+), 142 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 78cd28f53d..306359071e 100644 ---

[FFmpeg-devel] [PATCH v4 5/6] avcodec/mediacodec_wrapper: use an OFFSET() macro where relevant

2024-03-17 Thread Matthieu Bouron
Reduces a bit the horizontal spacing. --- libavcodec/mediacodec_wrapper.c | 138 +--- 1 file changed, 72 insertions(+), 66 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 0880ddd3ef..78cd28f53d 100644 ---

[FFmpeg-devel] [PATCH v4 4/6] avcodec/jni: remove unnecessary NULL checks before calling DeleteLocalRef()

2024-03-17 Thread Matthieu Bouron
Delete{Global,Local}Ref() already handle NULL. --- libavcodec/ffjni.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavcodec/ffjni.c b/libavcodec/ffjni.c index e3cf24d3e2..69d9a9faa3 100644 --- a/libavcodec/ffjni.c +++ b/libavcodec/ffjni.c @@ -236,17 +236,9

[FFmpeg-devel] [PATCH v4 3/6] avcodec/jni: use size_t to store structure offsets

2024-03-17 Thread Matthieu Bouron
--- libavcodec/ffjni.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h index 6027bac0ab..d1e86f8329 100644 --- a/libavcodec/ffjni.h +++ b/libavcodec/ffjni.h @@ -24,6 +24,7 @@ #define AVCODEC_FFJNI_H #include +#include /* *

[FFmpeg-devel] [PATCH v4 2/6] avformat: add Android content resolver protocol support

2024-03-17 Thread Matthieu Bouron
Handles Android content-uri starting with content://. --- configure | 2 + libavcodec/jni.c| 1 + libavformat/Makefile| 1 + libavformat/file.c | 160 libavformat/protocols.c | 1 + 5 files changed, 165 insertions(+)

[FFmpeg-devel] [PATCH v4 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-03-17 Thread Matthieu Bouron
This will allow users to pass the Android ApplicationContext which is mandatory to retrieve the ContentResolver responsible to resolve/open Android content-uri. --- doc/APIchanges | 3 +++ libavcodec/jni.c | 42 ++ libavcodec/jni.h | 17 +

[FFmpeg-devel] Add protocol for Android content providers (v4)

2024-03-17 Thread Matthieu Bouron
Diff with previous iteration: - rebaed on latest master - applied feedback from Zhao (removed HAVE_SETMODE block, use a typedef struct, check that the fd is seekable, moved doc/APIChanges changes to the right commit) ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] Add protocol for Android content providers (v2)

2024-03-14 Thread Matthieu Bouron
On Mon, Mar 04, 2024 at 09:21:43AM +0100, Matthieu Bouron wrote: > On Tue, Feb 27, 2024 at 03:50:36PM +0100, Matthieu Bouron wrote: > > Diff from initial patchset: > > - directly include libavcodec/ffjni.c from libavformat/file.c instead of > > migrating ffjni to libavutil (

Re: [FFmpeg-devel] [PATCH v2 3/6] avutil/jni: use size_t to store structure offsets

2024-03-04 Thread Matthieu Bouron
On Mon, Mar 04, 2024 at 09:10:49PM +0100, Andreas Rheinhardt wrote: > Matthieu Bouron: > > --- > > libavcodec/ffjni.h | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h > &

Re: [FFmpeg-devel] [PATCH v2 2/6] avformat: add Android content resolver protocol support

2024-03-04 Thread Matthieu Bouron
On Tue, Feb 27, 2024 at 03:50:38PM +0100, Matthieu Bouron wrote: > Handles Android content-uri starting with content://. > --- [...] New patch attached (I moved an unrelated chunk to the previous commit). >From 6ef059b721c1b1635565cc9e7d836be4733c928d Mon Sep 17 00:00:00 2001 From:

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-03-04 Thread Matthieu Bouron
On Mon, Mar 04, 2024 at 05:35:36PM +0100, Matthieu Bouron wrote: > On Mon, Mar 4, 2024 at 4:11 PM Matthieu Bouron > wrote: > > > > On Mon, Mar 4, 2024 at 12:29 PM Andreas Rheinhardt > > wrote: [...] > > > > > > I am against adding stub f

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-03-04 Thread Matthieu Bouron
On Mon, Mar 4, 2024 at 4:11 PM Matthieu Bouron wrote: > > On Mon, Mar 4, 2024 at 12:29 PM Andreas Rheinhardt > wrote: > > > > Matthieu Bouron: > > > This will allow users to pass the Android ApplicationContext which is > > > mandatory > > > to ret

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-03-04 Thread Matthieu Bouron
On Mon, Mar 4, 2024 at 12:29 PM Andreas Rheinhardt wrote: > > Matthieu Bouron: > > This will allow users to pass the Android ApplicationContext which is > > mandatory > > to retrieve the ContentResolver responsible to resolve/open Android > > content-uri. >

Re: [FFmpeg-devel] Add protocol for Android content providers (v2)

2024-03-04 Thread Matthieu Bouron
On Tue, Feb 27, 2024 at 03:50:36PM +0100, Matthieu Bouron wrote: > Diff from initial patchset: > - directly include libavcodec/ffjni.c from libavformat/file.c instead of > migrating ffjni to libavutil (avpriv_*) > - check that the passed application context reference is a global one

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt

2024-03-04 Thread Matthieu Bouron
On Mon, Mar 04, 2024 at 11:37:58AM +0800, Zhao Zhili wrote: > From: Zhao Zhili > > --- > libavcodec/mediacodecenc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c > index 086b545590..984014f1b1 100644 > ---

[FFmpeg-devel] [PATCH v2 6/6] avcodec/mediacodec_wrapper: remove unnecessary NULL checks before calling Delete{Global, Local}Ref()

2024-02-27 Thread Matthieu Bouron
Delete{Global,Local}Ref already handle NULL. --- libavcodec/mediacodec_wrapper.c | 189 1 file changed, 47 insertions(+), 142 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 78cd28f53d..306359071e 100644 ---

[FFmpeg-devel] [PATCH v2 5/6] avcodec/mediacodec_wrapper: use an OFFSET() macro where relevant

2024-02-27 Thread Matthieu Bouron
Reduces a bit the horizontal spacing. --- libavcodec/mediacodec_wrapper.c | 138 +--- 1 file changed, 72 insertions(+), 66 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 0880ddd3ef..78cd28f53d 100644 ---

[FFmpeg-devel] [PATCH v2 4/6] avutil/jni: remove unnecessary NULL checks before calling DeleteLocalRef()

2024-02-27 Thread Matthieu Bouron
Delete{Global,Local}Ref() already handle NULL. --- libavcodec/ffjni.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavcodec/ffjni.c b/libavcodec/ffjni.c index e3cf24d3e2..69d9a9faa3 100644 --- a/libavcodec/ffjni.c +++ b/libavcodec/ffjni.c @@ -236,17 +236,9

[FFmpeg-devel] [PATCH v2 3/6] avutil/jni: use size_t to store structure offsets

2024-02-27 Thread Matthieu Bouron
--- libavcodec/ffjni.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h index 6027bac0ab..d5894609ed 100644 --- a/libavcodec/ffjni.h +++ b/libavcodec/ffjni.h @@ -24,6 +24,7 @@ #define AVCODEC_FFJNI_H #include +#include /* *

[FFmpeg-devel] [PATCH v2 2/6] avformat: add Android content resolver protocol support

2024-02-27 Thread Matthieu Bouron
Handles Android content-uri starting with content://. --- configure | 2 + doc/APIchanges | 3 + libavcodec/jni.c| 3 +- libavformat/Makefile| 1 + libavformat/file.c | 157 libavformat/protocols.c | 1 + 6

[FFmpeg-devel] [PATCH v2 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-02-27 Thread Matthieu Bouron
This will allow users to pass the Android ApplicationContext which is mandatory to retrieve the ContentResolver responsible to resolve/open Android content-uri. --- libavcodec/jni.c | 40 libavcodec/jni.h | 17 + 2 files changed, 57

[FFmpeg-devel] Add protocol for Android content providers (v2)

2024-02-27 Thread Matthieu Bouron
Diff from initial patchset: - directly include libavcodec/ffjni.c from libavformat/file.c instead of migrating ffjni to libavutil (avpriv_*) - check that the passed application context reference is a global one and error out if it's not the case -- Matthieu

Re: [FFmpeg-devel] [PATCH 2/7] avutil: add av_jni_{get, set}_android_app_ctx helper

2024-02-27 Thread Matthieu Bouron
On Tue, Feb 27, 2024 at 02:42:01PM +0100, Andreas Rheinhardt wrote: > Matthieu Bouron: > > This will allow users to pass the Android ApplicationContext which is > > mandatory > > to retrieve the ContentResolver responsible to resolve/open Android > > content-uri. &

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-27 Thread Matthieu Bouron
On Tue, Feb 27, 2024 at 09:14:04PM +0800, Zhao Zhili wrote: > > > > On Feb 27, 2024, at 15:17, Matthieu Bouron > > wrote: > > > > On Sat, Feb 24, 2024 at 12:29:24PM +0100, Matthieu Bouron wrote: > >> On Thu, Feb 15, 2024 at 10:13:03AM +0100, Matthieu Bo

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-26 Thread Matthieu Bouron
On Sat, Feb 24, 2024 at 12:29:24PM +0100, Matthieu Bouron wrote: > On Thu, Feb 15, 2024 at 10:13:03AM +0100, Matthieu Bouron wrote: > > Le jeu. 15 févr. 2024, 9:46 AM, Zhao Zhili a > > écrit : > > > > > > > > > 在 2024年2月15日,下午3:57,Matthieu Bouron 写道: &

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-24 Thread Matthieu Bouron
On Thu, Feb 15, 2024 at 10:13:03AM +0100, Matthieu Bouron wrote: > Le jeu. 15 févr. 2024, 9:46 AM, Zhao Zhili a > écrit : > > > > > > 在 2024年2月15日,下午3:57,Matthieu Bouron 写道: > > > > > > On Thu, Feb 15, 2024 at 12:13:59PM +0800, Zhao Zhili wrote: > &

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-15 Thread Matthieu Bouron
Le jeu. 15 févr. 2024, 9:46 AM, Zhao Zhili a écrit : > > > 在 2024年2月15日,下午3:57,Matthieu Bouron 写道: > > > > On Thu, Feb 15, 2024 at 12:13:59PM +0800, Zhao Zhili wrote: > >> > >> > >>>> On Feb 14, 2024, at 06:50, Matthieu Bouron > wrote:

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-14 Thread Matthieu Bouron
On Thu, Feb 15, 2024 at 12:13:59PM +0800, Zhao Zhili wrote: > > > > On Feb 14, 2024, at 06:50, Matthieu Bouron > > wrote: > > > > Hi, > > > > On Android, content providers are used for accessing files through shared > > mechanisms. One typi

Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils

2024-02-14 Thread Matthieu Bouron
On Wed, Feb 14, 2024 at 11:31:21PM +, Mark Thompson wrote: > On 13/02/2024 22:50, Matthieu Bouron wrote: > > This will allow to use the jni utils in libavformat. This will be mostly > > useful > > to add Android content-uri support. > > > > This deprecates

Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils

2024-02-14 Thread Matthieu Bouron
On Wed, Feb 14, 2024 at 07:18:04PM +0100, Michael Niedermayer wrote: > On Tue, Feb 13, 2024 at 11:50:09PM +0100, Matthieu Bouron wrote: > > This will allow to use the jni utils in libavformat. This will be mostly > > useful > > to add Android content-uri support. > >

[FFmpeg-devel] [PATCH 7/7] avcodec/mediacodec_wrapper: remove unnecessary NULL checks before calling Delete{Global, Local}Ref()

2024-02-13 Thread Matthieu Bouron
Delete{Global,Local}Ref already handle NULL. --- libavcodec/mediacodec_wrapper.c | 189 1 file changed, 47 insertions(+), 142 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 536b5b8e81..19d63e2ba0 100644 ---

[FFmpeg-devel] [PATCH 5/7] avutil/jni: remove unnecessary NULL checks before calling DeleteLocalRef()

2024-02-13 Thread Matthieu Bouron
Delete{Global,Local}Ref() already handle NULL. --- libavutil/jniutils.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavutil/jniutils.c b/libavutil/jniutils.c index 89623af3f8..beedf24c0d 100644 --- a/libavutil/jniutils.c +++ b/libavutil/jniutils.c @@

[FFmpeg-devel] [PATCH 6/7] avcodec/mediacodec_wrapper: use an OFFSET() macro where relevant

2024-02-13 Thread Matthieu Bouron
Reduces a bit the horizontal spacing. --- libavcodec/mediacodec_wrapper.c | 138 +--- 1 file changed, 72 insertions(+), 66 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index bc3eb0a80d..536b5b8e81 100644 ---

[FFmpeg-devel] [PATCH 4/7] avutil/jni: use size_t to store structure offsets

2024-02-13 Thread Matthieu Bouron
--- libavutil/jniutils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/jniutils.h b/libavutil/jniutils.h index 2be401c974..01f3acb88d 100644 --- a/libavutil/jniutils.h +++ b/libavutil/jniutils.h @@ -24,6 +24,7 @@ #define AVUTIL_JNIUTILS_H #include +#include

[FFmpeg-devel] [PATCH 3/7] avformat: add Android content resolver protocol support

2024-02-13 Thread Matthieu Bouron
Handles Android content-uri starting with content://. --- configure | 2 + doc/APIchanges | 3 + libavformat/Makefile| 1 + libavformat/file.c | 157 libavformat/protocols.c | 1 + 5 files changed, 164 insertions(+)

[FFmpeg-devel] [PATCH 2/7] avutil: add av_jni_{get, set}_android_app_ctx helper

2024-02-13 Thread Matthieu Bouron
This will allow users to pass the Android ApplicationContext which is mandatory to retrieve the ContentResolver responsible to resolve/open Android content-uri. --- libavutil/jni.c | 28 libavutil/jni.h | 17 + 2 files changed, 45 insertions(+) diff

[FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils

2024-02-13 Thread Matthieu Bouron
\ + jni.o\ lfg.o\ lls.o \ log.o

[FFmpeg-devel] Add protocol for Android content providers

2024-02-13 Thread Matthieu Bouron
Hi, On Android, content providers are used for accessing files through shared mechanisms. One typical case would be an app willing to open a video from Google Photos, gallery apps, TikTok, Instagram or some other providers. A content URI looks something like "content://authority/path/id", see:

Re: [FFmpeg-devel] [PATCH] avfft: avoid overreads with RDFT API users

2024-02-09 Thread Matthieu Bouron
On Fri, Feb 09, 2024 at 06:27:50PM +0100, Lynne wrote: > The new API requires an extra array member at the very end, > which old API users did not do. > > This disables in-place RDFT transforms and instead > does the transform out of place by copying once, there shouldn't > be a significant loss

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: set quality in cq mode

2023-12-19 Thread Matthieu Bouron
On Sun, Dec 17, 2023 at 1:51 PM Zhao Zhili wrote: > > From: Zhao Zhili > > From AOSP doc, these values are device and codec specific, but lower > values generally result in more efficient (smaller-sized) encoding. > > For example, global_quality 50 on Pixel 6 results a 1080P 30 FPS > HEVC with

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/jni: make global variables static

2023-09-17 Thread Matthieu Bouron
On Sun, Sep 17, 2023 at 5:38 AM Zhao Zhili wrote: > From: Zhao Zhili > > Signed-off-by: Zhao Zhili > --- > libavcodec/jni.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/jni.c b/libavcodec/jni.c > index 85dcf2abaf..ae6490de9d 100644 > ---

Re: [FFmpeg-devel] Consulting Request

2022-11-12 Thread Matthieu Bouron
Hello, This work has been submitted to the ml recently, see: http://ffmpeg.org/pipermail/ffmpeg-devel/2022-November/303847.html Matthieu On Sat, Nov 12, 2022 at 11:13 AM Olivier Ayache wrote: > Hello and sorry for my late answer but few years ago I have implemented > this kind of feature. >

Re: [FFmpeg-devel] [PATCH] mediacodecdec_common: enable refcounting of buffers unconditionally

2022-09-28 Thread Matthieu Bouron
On Wed, Sep 28, 2022 at 10:27:49AM +0200, Anton Khirnov wrote: > Quoting sfan5 (2022-09-18 20:26:48) > > This allows av_mediacodec_release_buffer to be called safely after > > the decoder is closed, this was already the case with delay_flush=1. > > Note that this causes holding onto frames to keep

Re: [FFmpeg-devel] [PATCH] swscale: add NV16 input/output

2022-08-02 Thread Matthieu Bouron
On Thu, Jul 14, 2022 at 8:10 PM Michael Niedermayer wrote: > On Fri, Jul 01, 2022 at 10:08:14AM +0200, Matthieu Bouron wrote: > > On Sat, Jun 11, 2022 at 5:35 PM Michael Niedermayer < > mich...@niedermayer.cc> > > wrote: > > > > > On Fri, Jun 10, 2022 at

Re: [FFmpeg-devel] [PATCH] swscale: add NV16 input/output

2022-07-12 Thread Matthieu Bouron
Le ven. 1 juil. 2022, 10:08, Matthieu Bouron a écrit : > On Sat, Jun 11, 2022 at 5:35 PM Michael Niedermayer < > mich...@niedermayer.cc> wrote: > >> On Fri, Jun 10, 2022 at 04:11:10PM +0200, Matthieu Bouron wrote: >> > On Thu, Jun 2, 2022 at 9:13 PM

Re: [FFmpeg-devel] [PATCH] swscale: add NV16 input/output

2022-07-01 Thread Matthieu Bouron
On Sat, Jun 11, 2022 at 5:35 PM Michael Niedermayer wrote: > On Fri, Jun 10, 2022 at 04:11:10PM +0200, Matthieu Bouron wrote: > > On Thu, Jun 2, 2022 at 9:13 PM Michael Niedermayer < > mich...@niedermayer.cc> > > wrote: > > > > > On Wed, Jun 01, 2022 at

Re: [FFmpeg-devel] [PATCH] swscale: add NV16 input/output

2022-06-10 Thread Matthieu Bouron
On Thu, Jun 2, 2022 at 9:13 PM Michael Niedermayer wrote: > On Wed, Jun 01, 2022 at 10:33:37PM +0200, Matthieu Bouron wrote: > > --- > > libswscale/input.c | 1 + > > libswscale/utils.c | 1 + > > libswscale/versio

[FFmpeg-devel] [PATCH] swscale: add NV16 input/output

2022-06-01 Thread Matthieu Bouron
--- libswscale/input.c | 1 + libswscale/utils.c | 1 + libswscale/version.h | 2 +- tests/ref/fate/filter-pixdesc-nv16 | 1 + tests/ref/fate/filter-pixfmts-copy | 1 + tests/ref/fate/filter-pixfmts-crop | 1 +

Re: [FFmpeg-devel] [PATCH] libavformat/tls_libtls: handle TLS_WANT_{POLLIN, POLLOUT} in read/write functions

2022-05-30 Thread Matthieu Bouron
On Mon, May 23, 2022 at 12:44:33PM +0200, Matthieu Bouron wrote: > According to the tls documentation: tls_read() and tls_write() can > return TLS_WANT_POLLIN and TLS_WANT_POLLOUT which indicates that the > same operation must be repeated immediately. > > This commit prevents the

[FFmpeg-devel] [PATCH] libavformat/tls_libtls: handle TLS_WANT_{POLLIN, POLLOUT} in read/write functions

2022-05-23 Thread Matthieu Bouron
According to the tls documentation: tls_read() and tls_write() can return TLS_WANT_POLLIN and TLS_WANT_POLLOUT which indicates that the same operation must be repeated immediately. This commit prevents the libtls backend from failing when libtls returns TLS_WANT_POLLIN or TLS_WANT_POLLOUT with

[FFmpeg-devel] [PATCH] avcodec/mediacodecdec_common: stop the codec before releasing it

2022-03-30 Thread Matthieu Bouron
Fixes the following warnings/errors on codec release: E/BufferQueueProducer: [SurfaceTexture-0-31763-0](id:7c130001,api:3,p:31763,c:31763) detachBuffer: slot 0 is not owned by the producer (state = FREE) E/BufferQueueProducer:

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mxfenc: fix DNxHD GC element_type

2021-12-14 Thread Matthieu Bouron
On Tue, Dec 14, 2021 at 04:27:43PM +0100, Nicolas Gaullier wrote: > The values for the essence element type were updated in the spec > from 0x05/0x06 (ST2019-4 2008) to 0x0C/0x0D (ST2019-4 2009). > > Fixes ticket #6380. > > Thanks-to: Philip de Nier > Thanks-to: Matthieu Bo

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mxfenc: fix DNxHD GC container_ul

2021-12-14 Thread Matthieu Bouron
On Tue, Dec 14, 2021 at 04:27:42PM +0100, Nicolas Gaullier wrote: > Signed-off-by: Nicolas Gaullier > --- > libavformat/mxfenc.c | 2 +- > tests/ref/lavf/mxf_opatom | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c >

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-14 Thread Matthieu Bouron
On Tue, Dec 14, 2021 at 10:41:27AM +0100, Matthieu Bouron wrote: > On Tue, Nov 30, 2021 at 10:22:20AM +0100, Nicolas Gaullier wrote: > > Fix GC container ul. > > Fix GC element type both for the generic case and for OPAtom. > > > > Thanks to Philip de Nier > > fo

Re: [FFmpeg-devel] [PATCH] lavc/mediacodecdec: set codec profile and level from extradata for H264+HEVC

2021-12-14 Thread Matthieu Bouron
On Mon, Dec 13, 2021 at 09:56:05PM +0100, sfan5 wrote: > This value is later passed to MediaCodec and checked at decoder init. > Notably decoding of 10-bit streams before this commit would "work" without > returning errors but only return garbage output (on most Android devices). > From

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-14 Thread Matthieu Bouron
On Tue, Nov 30, 2021 at 10:22:20AM +0100, Nicolas Gaullier wrote: > Fix GC container ul. > Fix GC element type both for the generic case and for OPAtom. > > Thanks to Philip de Nier > for checking the values, especially for OPAtom. > --- > libavformat/mxfenc.c | 8 ++-- >

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mediacodec_wrapper: use MediaCodecInfo.isSoftwareOnly() when available

2021-03-10 Thread Matthieu Bouron
On Mon, Mar 08, 2021 at 10:12:38AM +0100, Matthieu Bouron wrote: > On Wed, Feb 17, 2021 at 04:51:09PM +0100, sfan5 wrote: > > > > > From 22ebde779f61fb030633a881ef320264ea446b6b Mon Sep 17 00:00:00 2001 > > From: sfan5 > > Date: Thu, 11 Feb 2021 20:48:54 +0100 &g

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mediacodec_wrapper: clean up ff_AMediaCodecList_getCodecNameByType a bit

2021-03-10 Thread Matthieu Bouron
On Mon, Mar 08, 2021 at 10:11:58AM +0100, Matthieu Bouron wrote: > On Wed, Feb 17, 2021 at 04:50:00PM +0100, sfan5 wrote: > > Hi, > > > > while looking into mediacodec for unrelated reasons I saw some room for > > improvement. > > > > Therefore,

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mediacodec_wrapper: clean up ff_AMediaCodecList_getCodecNameByType a bit

2021-03-08 Thread Matthieu Bouron
On Wed, Feb 17, 2021 at 04:50:00PM +0100, sfan5 wrote: > Hi, > > while looking into mediacodec for unrelated reasons I saw some room for > improvement. > > Therefore, here's a series with two small patches. > > From cadd2b2d4a5ffbb4dcc34faf2d3e139e1d4d608b Mon Sep 17 00:00:00 2001 > From:

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mediacodec_wrapper: use MediaCodecInfo.isSoftwareOnly() when available

2021-03-08 Thread Matthieu Bouron
On Wed, Feb 17, 2021 at 04:51:09PM +0100, sfan5 wrote: > > From 22ebde779f61fb030633a881ef320264ea446b6b Mon Sep 17 00:00:00 2001 > From: sfan5 > Date: Thu, 11 Feb 2021 20:48:54 +0100 > Subject: [PATCH 2/2] avcodec/mediacodec_wrapper: use > MediaCodecInfo.isSoftwareOnly() when available > >

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecdec: Do not abort when H264/HEVC extradata extraction fails

2021-02-12 Thread Matthieu Bouron
On Mon, Jan 25, 2021 at 06:38:36PM +0100, sfan5 wrote: > Although rare, extradata can be present but empty and extraction will fail. > However Android also supports passing codec-specific data inline and > will likely play such a stream anyway. So there's no reason to abort > initialization before

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2021-01-06 Thread Matthieu Bouron
On Tue, Jan 05, 2021 at 09:56:39PM +0100, Marton Balint wrote: > > On Tue, 5 Jan 2021, Matthieu Bouron wrote: > > > > Could you factorize this to a function? It seems you are doing exactly the > > > same thing here and below. > > > > New patch

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2021-01-05 Thread Matthieu Bouron
On Mon, Jan 04, 2021 at 09:04:05PM +0100, Marton Balint wrote: > > > On Mon, 2 Nov 2020, Matthieu Bouron wrote: > > > Currently skip_samples is set to start_pad if sample_time is lesser or > > equal to 0. This can cause issues if the stream starts with packets th

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2021-01-04 Thread Matthieu Bouron
On Mon, Nov 23, 2020 at 05:43:06PM +0100, Matthieu Bouron wrote: > On Tue, Nov 17, 2020 at 02:18:46PM +0100, Matthieu Bouron wrote: > > On Mon, Nov 09, 2020 at 06:26:46PM +0100, Matthieu Bouron wrote: > > > On Mon, Nov 02, 2020 at 12:42:19PM +0100, Matthieu Bouron wrote:

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2020-11-23 Thread Matthieu Bouron
On Tue, Nov 17, 2020 at 02:18:46PM +0100, Matthieu Bouron wrote: > On Mon, Nov 09, 2020 at 06:26:46PM +0100, Matthieu Bouron wrote: > > On Mon, Nov 02, 2020 at 12:42:19PM +0100, Matthieu Bouron wrote: > > > Currently skip_samples is set to start_pad if sample_time is lesser o

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2020-11-17 Thread Matthieu Bouron
On Mon, Nov 09, 2020 at 06:26:46PM +0100, Matthieu Bouron wrote: > On Mon, Nov 02, 2020 at 12:42:19PM +0100, Matthieu Bouron wrote: > > Currently skip_samples is set to start_pad if sample_time is lesser or > > equal to 0. This can cause issues if the stream starts with packet

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2020-11-09 Thread Matthieu Bouron
On Mon, Nov 02, 2020 at 12:42:19PM +0100, Matthieu Bouron wrote: > Currently skip_samples is set to start_pad if sample_time is lesser or > equal to 0. This can cause issues if the stream starts with packets that > have negative pts. Calling avformat_seek_file() with ts set to 0 on such

[FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2020-11-02 Thread Matthieu Bouron
Currently skip_samples is set to start_pad if sample_time is lesser or equal to 0. This can cause issues if the stream starts with packets that have negative pts. Calling avformat_seek_file() with ts set to 0 on such streams makes the mov demuxer return the right corresponding packets (near the 0

Re: [FFmpeg-devel] working with file descriptors on Android

2020-07-25 Thread Matthieu Bouron
On Wed, Jul 22, 2020 at 2:38 PM Alex Cohn wrote: > Usually, we employ the `pipe:` protocol to deal with the numerical > file descriptors, and this answers all our needs. On Android, there is > a different use case in which numerical file descriptors appear, and > this is not covered well with

Re: [FFmpeg-devel] [PATCH] add support to Android ndk MediaCodec for encoding/decoding

2020-06-28 Thread Matthieu Bouron
On Sat, Jun 27, 2020 at 09:54:58PM +0300, Martin Storsjö wrote: > On Sat, 27 Jun 2020, Olivier Ayache wrote: > > > Hi everyone this is the first time I post on this mailing list. I am > > working since several years on a fork of Xuggler for manipulating ffmpeg > > API with Java/Kotlin. > > This

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_common: use MediaFormat to probe frame color characteristics

2020-05-25 Thread Matthieu Bouron
On Wed, May 20, 2020 at 10:07:03AM +0200, Matthieu Bouron wrote: > On Sat, May 09, 2020 at 09:45:05AM +0200, Matthieu Bouron wrote: > > On Tue, Mar 31, 2020 at 10:03:08AM +0200, Matthieu Bouron wrote: > > > --- > > > libavcodec/mediacodecdec_common.c | 100

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_common: use MediaFormat to probe frame color characteristics

2020-05-20 Thread Matthieu Bouron
On Sat, May 09, 2020 at 09:45:05AM +0200, Matthieu Bouron wrote: > On Tue, Mar 31, 2020 at 10:03:08AM +0200, Matthieu Bouron wrote: > > --- > > libavcodec/mediacodecdec_common.c | 100 ++ > > 1 file changed, 100 insertions(+) > >

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_common: use MediaFormat to probe frame color characteristics

2020-05-09 Thread Matthieu Bouron
On Tue, Mar 31, 2020 at 10:03:08AM +0200, Matthieu Bouron wrote: > --- > libavcodec/mediacodecdec_common.c | 100 ++ > 1 file changed, 100 insertions(+) > > diff --git a/libavcodec/mediacodecdec_common.c > b/libavcodec/mediacodecdec_common.c &

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak

2020-04-15 Thread Matthieu Bouron
On Tue, Apr 14, 2020 at 09:51:08AM +0200, Matthieu Bouron wrote: > On Thu, Apr 09, 2020 at 05:06:05PM +0200, Matthieu Bouron wrote: > > Fixes ticket #8607. > > --- > > libavcodec/mediacodec_wrapper.c | 6 ++ > > 1 file changed, 6 insertions(+) >

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak

2020-04-14 Thread Matthieu Bouron
On Thu, Apr 09, 2020 at 05:06:05PM +0200, Matthieu Bouron wrote: > Fixes ticket #8607. > --- > libavcodec/mediacodec_wrapper.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c > index 5213cf640a

[FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak

2020-04-09 Thread Matthieu Bouron
Fixes ticket #8607. --- libavcodec/mediacodec_wrapper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 5213cf640a7..79abc8b6aa9 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 09:10:19PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 21:07 Uhr schrieb Matthieu Bouron > : > > > > On Wed, Apr 01, 2020 at 07:59:46PM +0200, Carl Eugen Hoyos wrote: > > > Am Mi., 1. Apr. 2020 um 19:54 Uhr schrieb Matthieu Bouron >

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 07:59:46PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 19:54 Uhr schrieb Matthieu Bouron > : > > > > On Wed, Apr 01, 2020 at 07:30:55PM +0200, Carl Eugen Hoyos wrote: > > > Am Mi., 1. Apr. 2020 um 19:15 Uhr schrieb Matthieu Bouron >

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 07:30:55PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 19:15 Uhr schrieb Matthieu Bouron > : > > > > On Wed, Apr 01, 2020 at 06:55:42PM +0200, Carl Eugen Hoyos wrote: > > > Am Mi., 1. Apr. 2020 um 18:35 Uhr schrieb Matthieu Bouron >

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 06:55:42PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 18:35 Uhr schrieb Matthieu Bouron > : > > > > On Wed, Apr 01, 2020 at 06:29:03PM +0200, Carl Eugen Hoyos wrote: > > > Am Mi., 1. Apr. 2020 um 18:01 Uhr schrieb Matthieu Bouron &g

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 06:19:56PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 18:01 Uhr schrieb Matthieu Bouron > : > > > > Fixes probing of JPEG files containing MPF metadata appended at the end > > of the file. > > > > The MPF metadata chu

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 06:29:03PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 18:01 Uhr schrieb Matthieu Bouron > : > > > > Fixes probing of JPEG files containing MPF metadata appended at the end > > of the file. > > > > The MPF metadata chu

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: skip DHT segment in jpeg_probe()

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 04:29:16PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 16:24 Uhr schrieb Matthieu Bouron > : > > > > On Wed, Apr 01, 2020 at 04:09:08PM +0200, Carl Eugen Hoyos wrote: > > > Am Mi., 1. Apr. 2020 um 15:48 Uhr schrieb Matthieu Bouron >

[FFmpeg-devel] [PATCH] avformat/img2dec: return immediately in jpeg_probe() when EOI is found

2020-04-01 Thread Matthieu Bouron
Fixes probing of JPEG files containing MPF metadata appended at the end of the file. The MPF metadata chunk can contains multiple JPEG images (thumbnails) which makes the jpeg_probe fails (return 0) because it finds a SOI marker after EOI. --- This patch fixes probing of JPEG files containing

Re: [FFmpeg-devel] [PATCH] avformat/img2dec: skip DHT segment in jpeg_probe()

2020-04-01 Thread Matthieu Bouron
On Wed, Apr 01, 2020 at 04:09:08PM +0200, Carl Eugen Hoyos wrote: > Am Mi., 1. Apr. 2020 um 15:48 Uhr schrieb Matthieu Bouron > : > > > > On Wed, Apr 01, 2020 at 03:38:45PM +0200, Carl Eugen Hoyos wrote: > > > Am Mi., 1. Apr. 2020 um 10:57

  1   2   3   4   5   6   7   >