[FFmpeg-devel] [PATCH 3/5] lavu/jni: add helpers to manage android application contexts

Ronald S. Bultje rsbultje at gmail.com
Sun Oct 11 15:13:39 CEST 2015


Hi,

On Fri, Oct 9, 2015 at 12:26 PM, Matthieu Bouron <matthieu.bouron at gmail.com>
wrote:

> From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
>
> ---
>  libavutil/jni.c          | 104
> +++++++++++++++++++++++++++++++++++++++++++++++
>  libavutil/jni.h          |  28 +++++++++++++
>  libavutil/jni_internal.c |  30 ++++++++++++++
>  libavutil/jni_internal.h |  11 +++++
>  4 files changed, 173 insertions(+)


(Personal opinion only - applies to this whole patch set), this stuff had
no place anywhere in libavutil.

I don't even think it has any place anywhere in libavanything, but
certainly not in libavutil. Libavdevice _maybe_, and then really only for
android devices (other systems can have JNI, and you'd be sitting with all
this stuff and deps in your libav*.so/a which does nothing), but far, far,
far away from our core APIs. You could accomplish this by having a jni
dependency in configure which is only enabled when the android context
subsystem is enabled, so non-android builds are not affected by this.

All of this is just to get I/O in your Android app right? What's the issue
with setting AVFormatContext->io before calling avformat_open_input() and
implementing a custom input? Is it that each app would rewrite the same
code? Or am I missing something super-obvious?

Ronald


More information about the ffmpeg-devel mailing list