diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/arm/mathops.h b/app/src/main/cpp/include/libavcodec/arm/mathops.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/arm/mathops.h rename to app/src/main/cpp/include/libavcodec/arm/mathops.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/avcodec.h b/app/src/main/cpp/include/libavcodec/avcodec.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/avcodec.h rename to app/src/main/cpp/include/libavcodec/avcodec.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/avdct.h b/app/src/main/cpp/include/libavcodec/avdct.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/avdct.h rename to app/src/main/cpp/include/libavcodec/avdct.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/avfft.h b/app/src/main/cpp/include/libavcodec/avfft.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/avfft.h rename to app/src/main/cpp/include/libavcodec/avfft.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/d3d11va.h b/app/src/main/cpp/include/libavcodec/d3d11va.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/d3d11va.h rename to app/src/main/cpp/include/libavcodec/d3d11va.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/dirac.h b/app/src/main/cpp/include/libavcodec/dirac.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/dirac.h rename to app/src/main/cpp/include/libavcodec/dirac.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/dv_profile.h b/app/src/main/cpp/include/libavcodec/dv_profile.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/dv_profile.h rename to app/src/main/cpp/include/libavcodec/dv_profile.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/dxva2.h b/app/src/main/cpp/include/libavcodec/dxva2.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/dxva2.h rename to app/src/main/cpp/include/libavcodec/dxva2.h diff --git a/app/src/main/cpp/include/libavcodec/jni.h b/app/src/main/cpp/include/libavcodec/jni.h new file mode 100644 index 0000000..dd99e92 --- /dev/null +++ b/app/src/main/cpp/include/libavcodec/jni.h @@ -0,0 +1,46 @@ +/* + * JNI public API functions + * + * Copyright (c) 2015-2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JNI_H +#define AVCODEC_JNI_H + +/* + * Manually set a Java virtual machine which will be used to retrieve the JNI + * environment. Once a Java VM is set it cannot be changed afterwards, meaning + * you can call multiple times av_jni_set_java_vm with the same Java VM pointer + * however it will error out if you try to set a different Java VM. + * + * @param vm Java virtual machine + * @param log_ctx context used for logging, can be NULL + * @return 0 on success, < 0 otherwise + */ +int av_jni_set_java_vm(void *vm, void *log_ctx); + +/* + * Get the Java virtual machine which has been set with av_jni_set_java_vm. + * + * @param vm Java virtual machine + * @return a pointer to the Java virtual machine + */ +void *av_jni_get_java_vm(void *log_ctx); + +#endif /* AVCODEC_JNI_H */ diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/mathops.h b/app/src/main/cpp/include/libavcodec/mathops.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/mathops.h rename to app/src/main/cpp/include/libavcodec/mathops.h diff --git a/app/src/main/cpp/include/libavcodec/mediacodec.h b/app/src/main/cpp/include/libavcodec/mediacodec.h new file mode 100644 index 0000000..5606d24 --- /dev/null +++ b/app/src/main/cpp/include/libavcodec/mediacodec.h @@ -0,0 +1,88 @@ +/* + * Android MediaCodec public API + * + * Copyright (c) 2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MEDIACODEC_H +#define AVCODEC_MEDIACODEC_H + +#include "libavcodec/avcodec.h" + +/** + * This structure holds a reference to a android/view/Surface object that will + * be used as output by the decoder. + * + */ +typedef struct AVMediaCodecContext { + + /** + * android/view/Surface object reference. + */ + void *surface; + +} AVMediaCodecContext; + +/** + * Allocate and initialize a MediaCodec context. + * + * When decoding with MediaCodec is finished, the caller must free the + * MediaCodec context with av_mediacodec_default_free. + * + * @return a pointer to a newly allocated AVMediaCodecContext on success, NULL otherwise + */ +AVMediaCodecContext *av_mediacodec_alloc_context(void); + +/** + * Convenience function that sets up the MediaCodec context. + * + * @param avctx codec context + * @param ctx MediaCodec context to initialize + * @param surface reference to an android/view/Surface + * @return 0 on success, < 0 otherwise + */ +int av_mediacodec_default_init(AVCodecContext *avctx, AVMediaCodecContext *ctx, void *surface); + +/** + * This function must be called to free the MediaCodec context initialized with + * av_mediacodec_default_init(). + * + * @param avctx codec context + */ +void av_mediacodec_default_free(AVCodecContext *avctx); + +/** + * Opaque structure representing a MediaCodec buffer to render. + */ +typedef struct MediaCodecBuffer AVMediaCodecBuffer; + +/** + * Release a MediaCodec buffer and render it to the surface that is associated + * with the decoder. This function should only be called once on a given + * buffer, once released the underlying buffer returns to the codec, thus + * subsequent calls to this function will have no effect. + * + * @param buffer the buffer to render + * @param render 1 to release and render the buffer to the surface or 0 to + * discard the buffer + * @return 0 on success, < 0 otherwise + */ +int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render); + +#endif /* AVCODEC_MEDIACODEC_H */ diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/qsv.h b/app/src/main/cpp/include/libavcodec/qsv.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/qsv.h rename to app/src/main/cpp/include/libavcodec/qsv.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/vaapi.h b/app/src/main/cpp/include/libavcodec/vaapi.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/vaapi.h rename to app/src/main/cpp/include/libavcodec/vaapi.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/vda.h b/app/src/main/cpp/include/libavcodec/vda.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/vda.h rename to app/src/main/cpp/include/libavcodec/vda.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/vdpau.h b/app/src/main/cpp/include/libavcodec/vdpau.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/vdpau.h rename to app/src/main/cpp/include/libavcodec/vdpau.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/version.h b/app/src/main/cpp/include/libavcodec/version.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/version.h rename to app/src/main/cpp/include/libavcodec/version.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/videotoolbox.h b/app/src/main/cpp/include/libavcodec/videotoolbox.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/videotoolbox.h rename to app/src/main/cpp/include/libavcodec/videotoolbox.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/vorbis_parser.h b/app/src/main/cpp/include/libavcodec/vorbis_parser.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/vorbis_parser.h rename to app/src/main/cpp/include/libavcodec/vorbis_parser.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavcodec/xvmc.h b/app/src/main/cpp/include/libavcodec/xvmc.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavcodec/xvmc.h rename to app/src/main/cpp/include/libavcodec/xvmc.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavfilter/avfilter.h b/app/src/main/cpp/include/libavfilter/avfilter.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavfilter/avfilter.h rename to app/src/main/cpp/include/libavfilter/avfilter.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavfilter/avfiltergraph.h b/app/src/main/cpp/include/libavfilter/avfiltergraph.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavfilter/avfiltergraph.h rename to app/src/main/cpp/include/libavfilter/avfiltergraph.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavfilter/buffersink.h b/app/src/main/cpp/include/libavfilter/buffersink.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavfilter/buffersink.h rename to app/src/main/cpp/include/libavfilter/buffersink.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavfilter/buffersrc.h b/app/src/main/cpp/include/libavfilter/buffersrc.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavfilter/buffersrc.h rename to app/src/main/cpp/include/libavfilter/buffersrc.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavfilter/version.h b/app/src/main/cpp/include/libavfilter/version.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavfilter/version.h rename to app/src/main/cpp/include/libavfilter/version.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavformat/avformat.h b/app/src/main/cpp/include/libavformat/avformat.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavformat/avformat.h rename to app/src/main/cpp/include/libavformat/avformat.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavformat/avio.h b/app/src/main/cpp/include/libavformat/avio.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavformat/avio.h rename to app/src/main/cpp/include/libavformat/avio.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavformat/network.h b/app/src/main/cpp/include/libavformat/network.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavformat/network.h rename to app/src/main/cpp/include/libavformat/network.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavformat/os_support.h b/app/src/main/cpp/include/libavformat/os_support.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavformat/os_support.h rename to app/src/main/cpp/include/libavformat/os_support.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavformat/url.h b/app/src/main/cpp/include/libavformat/url.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavformat/url.h rename to app/src/main/cpp/include/libavformat/url.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavformat/version.h b/app/src/main/cpp/include/libavformat/version.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavformat/version.h rename to app/src/main/cpp/include/libavformat/version.h diff --git a/app/src/main/cpp/include/libavutil/aarch64/timer.h b/app/src/main/cpp/include/libavutil/aarch64/timer.h new file mode 100644 index 0000000..7980eba --- /dev/null +++ b/app/src/main/cpp/include/libavutil/aarch64/timer.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015 Janne Grunau + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AARCH64_TIMER_H +#define AVUTIL_AARCH64_TIMER_H + +#include +#include "ffmpeg/config.h" + +#if HAVE_INLINE_ASM + +#define AV_READ_TIME read_time + +static inline uint64_t read_time(void) +{ + uint64_t cycle_counter; + __asm__ volatile( + "isb \t\n" + "mrs %0, pmccntr_el0 " + : "=r"(cycle_counter) :: "memory" ); + + return cycle_counter; +} + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVUTIL_AARCH64_TIMER_H */ diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/adler32.h b/app/src/main/cpp/include/libavutil/adler32.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/adler32.h rename to app/src/main/cpp/include/libavutil/adler32.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/aes.h b/app/src/main/cpp/include/libavutil/aes.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/aes.h rename to app/src/main/cpp/include/libavutil/aes.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/aes_ctr.h b/app/src/main/cpp/include/libavutil/aes_ctr.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/aes_ctr.h rename to app/src/main/cpp/include/libavutil/aes_ctr.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/arm/timer.h b/app/src/main/cpp/include/libavutil/arm/timer.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/arm/timer.h rename to app/src/main/cpp/include/libavutil/arm/timer.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/attributes.h b/app/src/main/cpp/include/libavutil/attributes.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/attributes.h rename to app/src/main/cpp/include/libavutil/attributes.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/audio_fifo.h b/app/src/main/cpp/include/libavutil/audio_fifo.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/audio_fifo.h rename to app/src/main/cpp/include/libavutil/audio_fifo.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/avassert.h b/app/src/main/cpp/include/libavutil/avassert.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/avassert.h rename to app/src/main/cpp/include/libavutil/avassert.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/avconfig.h b/app/src/main/cpp/include/libavutil/avconfig.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/avconfig.h rename to app/src/main/cpp/include/libavutil/avconfig.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/avstring.h b/app/src/main/cpp/include/libavutil/avstring.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/avstring.h rename to app/src/main/cpp/include/libavutil/avstring.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/avutil.h b/app/src/main/cpp/include/libavutil/avutil.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/avutil.h rename to app/src/main/cpp/include/libavutil/avutil.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/base64.h b/app/src/main/cpp/include/libavutil/base64.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/base64.h rename to app/src/main/cpp/include/libavutil/base64.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/blowfish.h b/app/src/main/cpp/include/libavutil/blowfish.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/blowfish.h rename to app/src/main/cpp/include/libavutil/blowfish.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/bprint.h b/app/src/main/cpp/include/libavutil/bprint.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/bprint.h rename to app/src/main/cpp/include/libavutil/bprint.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/bswap.h b/app/src/main/cpp/include/libavutil/bswap.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/bswap.h rename to app/src/main/cpp/include/libavutil/bswap.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/buffer.h b/app/src/main/cpp/include/libavutil/buffer.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/buffer.h rename to app/src/main/cpp/include/libavutil/buffer.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/camellia.h b/app/src/main/cpp/include/libavutil/camellia.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/camellia.h rename to app/src/main/cpp/include/libavutil/camellia.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/cast5.h b/app/src/main/cpp/include/libavutil/cast5.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/cast5.h rename to app/src/main/cpp/include/libavutil/cast5.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/channel_layout.h b/app/src/main/cpp/include/libavutil/channel_layout.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/channel_layout.h rename to app/src/main/cpp/include/libavutil/channel_layout.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/common.h b/app/src/main/cpp/include/libavutil/common.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/common.h rename to app/src/main/cpp/include/libavutil/common.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/cpu.h b/app/src/main/cpp/include/libavutil/cpu.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/cpu.h rename to app/src/main/cpp/include/libavutil/cpu.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/crc.h b/app/src/main/cpp/include/libavutil/crc.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/crc.h rename to app/src/main/cpp/include/libavutil/crc.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/des.h b/app/src/main/cpp/include/libavutil/des.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/des.h rename to app/src/main/cpp/include/libavutil/des.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/dict.h b/app/src/main/cpp/include/libavutil/dict.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/dict.h rename to app/src/main/cpp/include/libavutil/dict.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/display.h b/app/src/main/cpp/include/libavutil/display.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/display.h rename to app/src/main/cpp/include/libavutil/display.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/downmix_info.h b/app/src/main/cpp/include/libavutil/downmix_info.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/downmix_info.h rename to app/src/main/cpp/include/libavutil/downmix_info.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/error.h b/app/src/main/cpp/include/libavutil/error.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/error.h rename to app/src/main/cpp/include/libavutil/error.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/eval.h b/app/src/main/cpp/include/libavutil/eval.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/eval.h rename to app/src/main/cpp/include/libavutil/eval.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/ffversion.h b/app/src/main/cpp/include/libavutil/ffversion.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/ffversion.h rename to app/src/main/cpp/include/libavutil/ffversion.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/fifo.h b/app/src/main/cpp/include/libavutil/fifo.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/fifo.h rename to app/src/main/cpp/include/libavutil/fifo.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/file.h b/app/src/main/cpp/include/libavutil/file.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/file.h rename to app/src/main/cpp/include/libavutil/file.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/frame.h b/app/src/main/cpp/include/libavutil/frame.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/frame.h rename to app/src/main/cpp/include/libavutil/frame.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/hash.h b/app/src/main/cpp/include/libavutil/hash.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/hash.h rename to app/src/main/cpp/include/libavutil/hash.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/hmac.h b/app/src/main/cpp/include/libavutil/hmac.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/hmac.h rename to app/src/main/cpp/include/libavutil/hmac.h diff --git a/app/src/main/cpp/include/libavutil/hwcontext.h b/app/src/main/cpp/include/libavutil/hwcontext.h new file mode 100644 index 0000000..5e2af09 --- /dev/null +++ b/app/src/main/cpp/include/libavutil/hwcontext.h @@ -0,0 +1,429 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_H +#define AVUTIL_HWCONTEXT_H + +#include "buffer.h" +#include "frame.h" +#include "log.h" +#include "pixfmt.h" + +enum AVHWDeviceType { + AV_HWDEVICE_TYPE_VDPAU, + AV_HWDEVICE_TYPE_CUDA, + AV_HWDEVICE_TYPE_VAAPI, + AV_HWDEVICE_TYPE_DXVA2, + AV_HWDEVICE_TYPE_QSV, +}; + +typedef struct AVHWDeviceInternal AVHWDeviceInternal; + +/** + * This struct aggregates all the (hardware/vendor-specific) "high-level" state, + * i.e. state that is not tied to a concrete processing configuration. + * E.g., in an API that supports hardware-accelerated encoding and decoding, + * this struct will (if possible) wrap the state that is common to both encoding + * and decoding and from which specific instances of encoders or decoders can be + * derived. + * + * This struct is reference-counted with the AVBuffer mechanism. The + * av_hwdevice_ctx_alloc() constructor yields a reference, whose data field + * points to the actual AVHWDeviceContext. Further objects derived from + * AVHWDeviceContext (such as AVHWFramesContext, describing a frame pool with + * specific properties) will hold an internal reference to it. After all the + * references are released, the AVHWDeviceContext itself will be freed, + * optionally invoking a user-specified callback for uninitializing the hardware + * state. + */ +typedef struct AVHWDeviceContext { + /** + * A class for logging. Set by av_hwdevice_ctx_alloc(). + */ + const AVClass *av_class; + + /** + * Private data used internally by libavutil. Must not be accessed in any + * way by the caller. + */ + AVHWDeviceInternal *internal; + + /** + * This field identifies the underlying API used for hardware access. + * + * This field is set when this struct is allocated and never changed + * afterwards. + */ + enum AVHWDeviceType type; + + /** + * The format-specific data, allocated and freed by libavutil along with + * this context. + * + * Should be cast by the user to the format-specific context defined in the + * corresponding header (hwcontext_*.h) and filled as described in the + * documentation before calling av_hwdevice_ctx_init(). + * + * After calling av_hwdevice_ctx_init() this struct should not be modified + * by the caller. + */ + void *hwctx; + + /** + * This field may be set by the caller before calling av_hwdevice_ctx_init(). + * + * If non-NULL, this callback will be called when the last reference to + * this context is unreferenced, immediately before it is freed. + * + * @note when other objects (e.g an AVHWFramesContext) are derived from this + * struct, this callback will be invoked after all such child objects + * are fully uninitialized and their respective destructors invoked. + */ + void (*free)(struct AVHWDeviceContext *ctx); + + /** + * Arbitrary user data, to be used e.g. by the free() callback. + */ + void *user_opaque; +} AVHWDeviceContext; + +typedef struct AVHWFramesInternal AVHWFramesInternal; + +/** + * This struct describes a set or pool of "hardware" frames (i.e. those with + * data not located in normal system memory). All the frames in the pool are + * assumed to be allocated in the same way and interchangeable. + * + * This struct is reference-counted with the AVBuffer mechanism and tied to a + * given AVHWDeviceContext instance. The av_hwframe_ctx_alloc() constructor + * yields a reference, whose data field points to the actual AVHWFramesContext + * struct. + */ +typedef struct AVHWFramesContext { + /** + * A class for logging. + */ + const AVClass *av_class; + + /** + * Private data used internally by libavutil. Must not be accessed in any + * way by the caller. + */ + AVHWFramesInternal *internal; + + /** + * A reference to the parent AVHWDeviceContext. This reference is owned and + * managed by the enclosing AVHWFramesContext, but the caller may derive + * additional references from it. + */ + AVBufferRef *device_ref; + + /** + * The parent AVHWDeviceContext. This is simply a pointer to + * device_ref->data provided for convenience. + * + * Set by libavutil in av_hwframe_ctx_init(). + */ + AVHWDeviceContext *device_ctx; + + /** + * The format-specific data, allocated and freed automatically along with + * this context. + * + * Should be cast by the user to the format-specific context defined in the + * corresponding header (hwframe_*.h) and filled as described in the + * documentation before calling av_hwframe_ctx_init(). + * + * After any frames using this context are created, the contents of this + * struct should not be modified by the caller. + */ + void *hwctx; + + /** + * This field may be set by the caller before calling av_hwframe_ctx_init(). + * + * If non-NULL, this callback will be called when the last reference to + * this context is unreferenced, immediately before it is freed. + */ + void (*free)(struct AVHWFramesContext *ctx); + + /** + * Arbitrary user data, to be used e.g. by the free() callback. + */ + void *user_opaque; + + /** + * A pool from which the frames are allocated by av_hwframe_get_buffer(). + * This field may be set by the caller before calling av_hwframe_ctx_init(). + * The buffers returned by calling av_buffer_pool_get() on this pool must + * have the properties described in the documentation in the corresponding hw + * type's header (hwcontext_*.h). The pool will be freed strictly before + * this struct's free() callback is invoked. + * + * This field may be NULL, then libavutil will attempt to allocate a pool + * internally. Note that certain device types enforce pools allocated at + * fixed size (frame count), which cannot be extended dynamically. In such a + * case, initial_pool_size must be set appropriately. + */ + AVBufferPool *pool; + + /** + * Initial size of the frame pool. If a device type does not support + * dynamically resizing the pool, then this is also the maximum pool size. + * + * May be set by the caller before calling av_hwframe_ctx_init(). Must be + * set if pool is NULL and the device type does not support dynamic pools. + */ + int initial_pool_size; + + /** + * The pixel format identifying the underlying HW surface type. + * + * Must be a hwaccel format, i.e. the corresponding descriptor must have the + * AV_PIX_FMT_FLAG_HWACCEL flag set. + * + * Must be set by the user before calling av_hwframe_ctx_init(). + */ + enum AVPixelFormat format; + + /** + * The pixel format identifying the actual data layout of the hardware + * frames. + * + * Must be set by the caller before calling av_hwframe_ctx_init(). + * + * @note when the underlying API does not provide the exact data layout, but + * only the colorspace/bit depth, this field should be set to the fully + * planar version of that format (e.g. for 8-bit 420 YUV it should be + * AV_PIX_FMT_YUV420P, not AV_PIX_FMT_NV12 or anything else). + */ + enum AVPixelFormat sw_format; + + /** + * The allocated dimensions of the frames in this pool. + * + * Must be set by the user before calling av_hwframe_ctx_init(). + */ + int width, height; +} AVHWFramesContext; + +/** + * Allocate an AVHWDeviceContext for a given pixel format. + * + * @param format a hwaccel pixel format (AV_PIX_FMT_FLAG_HWACCEL must be set + * on the corresponding format descriptor) + * @return a reference to the newly created AVHWDeviceContext on success or NULL + * on failure. + */ +AVBufferRef *av_hwdevice_ctx_alloc(enum AVHWDeviceType type); + +/** + * Finalize the device context before use. This function must be called after + * the context is filled with all the required information and before it is + * used in any way. + * + * @param ref a reference to the AVHWDeviceContext + * @return 0 on success, a negative AVERROR code on failure + */ +int av_hwdevice_ctx_init(AVBufferRef *ref); + +/** + * Open a device of the specified type and create an AVHWDeviceContext for it. + * + * This is a convenience function intended to cover the simple cases. Callers + * who need to fine-tune device creation/management should open the device + * manually and then wrap it in an AVHWDeviceContext using + * av_hwdevice_ctx_alloc()/av_hwdevice_ctx_init(). + * + * The returned context is already initialized and ready for use, the caller + * should not call av_hwdevice_ctx_init() on it. The user_opaque/free fields of + * the created AVHWDeviceContext are set by this function and should not be + * touched by the caller. + * + * @param device_ctx On success, a reference to the newly-created device context + * will be written here. The reference is owned by the caller + * and must be released with av_buffer_unref() when no longer + * needed. On failure, NULL will be written to this pointer. + * @param type The type of the device to create. + * @param device A type-specific string identifying the device to open. + * @param opts A dictionary of additional (type-specific) options to use in + * opening the device. The dictionary remains owned by the caller. + * @param flags currently unused + * + * @return 0 on success, a negative AVERROR code on failure. + */ +int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type, + const char *device, AVDictionary *opts, int flags); + +/** + * Allocate an AVHWFramesContext tied to a given device context. + * + * @param device_ctx a reference to a AVHWDeviceContext. This function will make + * a new reference for internal use, the one passed to the + * function remains owned by the caller. + * @return a reference to the newly created AVHWFramesContext on success or NULL + * on failure. + */ +AVBufferRef *av_hwframe_ctx_alloc(AVBufferRef *device_ctx); + +/** + * Finalize the context before use. This function must be called after the + * context is filled with all the required information and before it is attached + * to any frames. + * + * @param ref a reference to the AVHWFramesContext + * @return 0 on success, a negative AVERROR code on failure + */ +int av_hwframe_ctx_init(AVBufferRef *ref); + +/** + * Allocate a new frame attached to the given AVHWFramesContext. + * + * @param hwframe_ctx a reference to an AVHWFramesContext + * @param frame an empty (freshly allocated or unreffed) frame to be filled with + * newly allocated buffers. + * @param flags currently unused, should be set to zero + * @return 0 on success, a negative AVERROR code on failure + */ +int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags); + +/** + * Copy data to or from a hw surface. At least one of dst/src must have an + * AVHWFramesContext attached. + * + * If src has an AVHWFramesContext attached, then the format of dst (if set) + * must use one of the formats returned by av_hwframe_transfer_get_formats(src, + * AV_HWFRAME_TRANSFER_DIRECTION_FROM). + * If dst has an AVHWFramesContext attached, then the format of src must use one + * of the formats returned by av_hwframe_transfer_get_formats(dst, + * AV_HWFRAME_TRANSFER_DIRECTION_TO) + * + * dst may be "clean" (i.e. with data/buf pointers unset), in which case the + * data buffers will be allocated by this function using av_frame_get_buffer(). + * If dst->format is set, then this format will be used, otherwise (when + * dst->format is AV_PIX_FMT_NONE) the first acceptable format will be chosen. + * + * @param dst the destination frame. dst is not touched on failure. + * @param src the source frame. + * @param flags currently unused, should be set to zero + * @return 0 on success, a negative AVERROR error code on failure. + */ +int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags); + +enum AVHWFrameTransferDirection { + /** + * Transfer the data from the queried hw frame. + */ + AV_HWFRAME_TRANSFER_DIRECTION_FROM, + + /** + * Transfer the data to the queried hw frame. + */ + AV_HWFRAME_TRANSFER_DIRECTION_TO, +}; + +/** + * Get a list of possible source or target formats usable in + * av_hwframe_transfer_data(). + * + * @param hwframe_ctx the frame context to obtain the information for + * @param dir the direction of the transfer + * @param formats the pointer to the output format list will be written here. + * The list is terminated with AV_PIX_FMT_NONE and must be freed + * by the caller when no longer needed using av_free(). + * If this function returns successfully, the format list will + * have at least one item (not counting the terminator). + * On failure, the contents of this pointer are unspecified. + * @param flags currently unused, should be set to zero + * @return 0 on success, a negative AVERROR code on failure. + */ +int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ctx, + enum AVHWFrameTransferDirection dir, + enum AVPixelFormat **formats, int flags); + + +/** + * This struct describes the constraints on hardware frames attached to + * a given device with a hardware-specific configuration. This is returned + * by av_hwdevice_get_hwframe_constraints() and must be freed by + * av_hwframe_constraints_free() after use. + */ +typedef struct AVHWFramesConstraints { + /** + * A list of possible values for format in the hw_frames_ctx, + * terminated by AV_PIX_FMT_NONE. This member will always be filled. + */ + enum AVPixelFormat *valid_hw_formats; + + /** + * A list of possible values for sw_format in the hw_frames_ctx, + * terminated by AV_PIX_FMT_NONE. Can be NULL if this information is + * not known. + */ + enum AVPixelFormat *valid_sw_formats; + + /** + * The minimum size of frames in this hw_frames_ctx. + * (Zero if not known.) + */ + int min_width; + int min_height; + + /** + * The maximum size of frames in this hw_frames_ctx. + * (INT_MAX if not known / no limit.) + */ + int max_width; + int max_height; +} AVHWFramesConstraints; + +/** + * Allocate a HW-specific configuration structure for a given HW device. + * After use, the user must free all members as required by the specific + * hardware structure being used, then free the structure itself with + * av_free(). + * + * @param device_ctx a reference to the associated AVHWDeviceContext. + * @return The newly created HW-specific configuration structure on + * success or NULL on failure. + */ +void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx); + +/** + * Get the constraints on HW frames given a device and the HW-specific + * configuration to be used with that device. If no HW-specific + * configuration is provided, returns the maximum possible capabilities + * of the device. + * + * @param device_ctx a reference to the associated AVHWDeviceContext. + * @param hwconfig a filled HW-specific configuration structure, or NULL + * to return the maximum possible capabilities of the device. + * @return AVHWFramesConstraints structure describing the constraints + * on the device, or NULL if not available. + */ +AVHWFramesConstraints *av_hwdevice_get_hwframe_constraints(AVBufferRef *ref, + const void *hwconfig); + +/** + * Free an AVHWFrameConstraints structure. + * + * @param constraints The (filled or unfilled) AVHWFrameConstraints structure. + */ +void av_hwframe_constraints_free(AVHWFramesConstraints **constraints); + +#endif /* AVUTIL_HWCONTEXT_H */ diff --git a/app/src/main/cpp/include/libavutil/hwcontext_cuda.h b/app/src/main/cpp/include/libavutil/hwcontext_cuda.h new file mode 100644 index 0000000..23a77ce --- /dev/null +++ b/app/src/main/cpp/include/libavutil/hwcontext_cuda.h @@ -0,0 +1,46 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_HWCONTEXT_CUDA_H +#define AVUTIL_HWCONTEXT_CUDA_H + +#include + +#include "pixfmt.h" + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_CUDA. + * + * This API supports dynamic frame pools. AVHWFramesContext.pool must return + * AVBufferRefs whose data pointer is a CUdeviceptr. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVCUDADeviceContext { + CUcontext cuda_ctx; +} AVCUDADeviceContext; + +/** + * AVHWFramesContext.hwctx is currently not used + */ + +#endif /* AVUTIL_HWCONTEXT_CUDA_H */ diff --git a/app/src/main/cpp/include/libavutil/hwcontext_dxva2.h b/app/src/main/cpp/include/libavutil/hwcontext_dxva2.h new file mode 100644 index 0000000..6c36cb4 --- /dev/null +++ b/app/src/main/cpp/include/libavutil/hwcontext_dxva2.h @@ -0,0 +1,72 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_HWCONTEXT_DXVA2_H +#define AVUTIL_HWCONTEXT_DXVA2_H + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_DXVA2. + * + * Only fixed-size pools are supported. + * + * For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer set to a pointer to IDirect3DSurface9. + */ + +#include +#include + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVDXVA2DeviceContext { + IDirect3DDeviceManager9 *devmgr; +} AVDXVA2DeviceContext; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVDXVA2FramesContext { + /** + * The surface type (e.g. DXVA2_VideoProcessorRenderTarget or + * DXVA2_VideoDecoderRenderTarget). Must be set by the caller. + */ + DWORD surface_type; + + /** + * The surface pool. When an external pool is not provided by the caller, + * this will be managed (allocated and filled on init, freed on uninit) by + * libavutil. + */ + IDirect3DSurface9 **surfaces; + int nb_surfaces; + + /** + * Certain drivers require the decoder to be destroyed before the surfaces. + * To allow internally managed pools to work properly in such cases, this + * field is provided. + * + * If it is non-NULL, libavutil will call IDirectXVideoDecoder_Release() on + * it just before the internal surface pool is freed. + */ + IDirectXVideoDecoder *decoder_to_release; +} AVDXVA2FramesContext; + +#endif /* AVUTIL_HWCONTEXT_DXVA2_H */ diff --git a/app/src/main/cpp/include/libavutil/hwcontext_qsv.h b/app/src/main/cpp/include/libavutil/hwcontext_qsv.h new file mode 100644 index 0000000..b98d611 --- /dev/null +++ b/app/src/main/cpp/include/libavutil/hwcontext_qsv.h @@ -0,0 +1,53 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_QSV_H +#define AVUTIL_HWCONTEXT_QSV_H + +#include + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_QSV. + * + * This API does not support dynamic frame pools. AVHWFramesContext.pool must + * contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVQSVDeviceContext { + mfxSession session; +} AVQSVDeviceContext; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVQSVFramesContext { + mfxFrameSurface1 *surfaces; + int nb_surfaces; + + /** + * A combination of MFX_MEMTYPE_* describing the frame pool. + */ + int frame_type; +} AVQSVFramesContext; + +#endif /* AVUTIL_HWCONTEXT_QSV_H */ + diff --git a/app/src/main/cpp/include/libavutil/hwcontext_vaapi.h b/app/src/main/cpp/include/libavutil/hwcontext_vaapi.h new file mode 100644 index 0000000..7fd1a36 --- /dev/null +++ b/app/src/main/cpp/include/libavutil/hwcontext_vaapi.h @@ -0,0 +1,82 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_VAAPI_H +#define AVUTIL_HWCONTEXT_VAAPI_H + +#include + +/** + * @file + * API-specific header for AV_HWDEVICE_TYPE_VAAPI. + * + * Dynamic frame pools are supported, but note that any pool used as a render + * target is required to be of fixed size in order to be be usable as an + * argument to vaCreateContext(). + * + * For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer set to a VASurfaceID. + */ + +/** + * VAAPI connection details. + * + * Allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVVAAPIDeviceContext { + /** + * The VADisplay handle, to be filled by the user. + */ + VADisplay display; +} AVVAAPIDeviceContext; + +/** + * VAAPI-specific data associated with a frame pool. + * + * Allocated as AVHWFramesContext.hwctx. + */ +typedef struct AVVAAPIFramesContext { + /** + * Set by the user to apply surface attributes to all surfaces in + * the frame pool. If null, default settings are used. + */ + VASurfaceAttrib *attributes; + int nb_attributes; + /** + * The surfaces IDs of all surfaces in the pool after creation. + * Only valid if AVHWFramesContext.initial_pool_size was positive. + * These are intended to be used as the render_targets arguments to + * vaCreateContext(). + */ + VASurfaceID *surface_ids; + int nb_surfaces; +} AVVAAPIFramesContext; + +/** + * VAAPI hardware pipeline configuration details. + * + * Allocated with av_hwdevice_hwconfig_alloc(). + */ +typedef struct AVVAAPIHWConfig { + /** + * ID of a VAAPI pipeline configuration. + */ + VAConfigID config_id; +} AVVAAPIHWConfig; + +#endif /* AVUTIL_HWCONTEXT_VAAPI_H */ diff --git a/app/src/main/cpp/include/libavutil/hwcontext_vdpau.h b/app/src/main/cpp/include/libavutil/hwcontext_vdpau.h new file mode 100644 index 0000000..1b7ea1e --- /dev/null +++ b/app/src/main/cpp/include/libavutil/hwcontext_vdpau.h @@ -0,0 +1,44 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_VDPAU_H +#define AVUTIL_HWCONTEXT_VDPAU_H + +#include + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_VDPAU. + * + * This API supports dynamic frame pools. AVHWFramesContext.pool must return + * AVBufferRefs whose data pointer is a VdpVideoSurface. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVVDPAUDeviceContext { + VdpDevice device; + VdpGetProcAddress *get_proc_address; +} AVVDPAUDeviceContext; + +/** + * AVHWFramesContext.hwctx is currently not used + */ + +#endif /* AVUTIL_HWCONTEXT_VDPAU_H */ diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/imgutils.h b/app/src/main/cpp/include/libavutil/imgutils.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/imgutils.h rename to app/src/main/cpp/include/libavutil/imgutils.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/internal.h b/app/src/main/cpp/include/libavutil/internal.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/internal.h rename to app/src/main/cpp/include/libavutil/internal.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/intfloat.h b/app/src/main/cpp/include/libavutil/intfloat.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/intfloat.h rename to app/src/main/cpp/include/libavutil/intfloat.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/intreadwrite.h b/app/src/main/cpp/include/libavutil/intreadwrite.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/intreadwrite.h rename to app/src/main/cpp/include/libavutil/intreadwrite.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/lfg.h b/app/src/main/cpp/include/libavutil/lfg.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/lfg.h rename to app/src/main/cpp/include/libavutil/lfg.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/libm.h b/app/src/main/cpp/include/libavutil/libm.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/libm.h rename to app/src/main/cpp/include/libavutil/libm.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/log.h b/app/src/main/cpp/include/libavutil/log.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/log.h rename to app/src/main/cpp/include/libavutil/log.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/lzo.h b/app/src/main/cpp/include/libavutil/lzo.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/lzo.h rename to app/src/main/cpp/include/libavutil/lzo.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/macros.h b/app/src/main/cpp/include/libavutil/macros.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/macros.h rename to app/src/main/cpp/include/libavutil/macros.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/mastering_display_metadata.h b/app/src/main/cpp/include/libavutil/mastering_display_metadata.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/mastering_display_metadata.h rename to app/src/main/cpp/include/libavutil/mastering_display_metadata.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/mathematics.h b/app/src/main/cpp/include/libavutil/mathematics.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/mathematics.h rename to app/src/main/cpp/include/libavutil/mathematics.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/md5.h b/app/src/main/cpp/include/libavutil/md5.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/md5.h rename to app/src/main/cpp/include/libavutil/md5.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/mem.h b/app/src/main/cpp/include/libavutil/mem.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/mem.h rename to app/src/main/cpp/include/libavutil/mem.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/motion_vector.h b/app/src/main/cpp/include/libavutil/motion_vector.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/motion_vector.h rename to app/src/main/cpp/include/libavutil/motion_vector.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/murmur3.h b/app/src/main/cpp/include/libavutil/murmur3.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/murmur3.h rename to app/src/main/cpp/include/libavutil/murmur3.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/opt.h b/app/src/main/cpp/include/libavutil/opt.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/opt.h rename to app/src/main/cpp/include/libavutil/opt.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/parseutils.h b/app/src/main/cpp/include/libavutil/parseutils.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/parseutils.h rename to app/src/main/cpp/include/libavutil/parseutils.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/pixdesc.h b/app/src/main/cpp/include/libavutil/pixdesc.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/pixdesc.h rename to app/src/main/cpp/include/libavutil/pixdesc.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/pixelutils.h b/app/src/main/cpp/include/libavutil/pixelutils.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/pixelutils.h rename to app/src/main/cpp/include/libavutil/pixelutils.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/pixfmt.h b/app/src/main/cpp/include/libavutil/pixfmt.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/pixfmt.h rename to app/src/main/cpp/include/libavutil/pixfmt.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/random_seed.h b/app/src/main/cpp/include/libavutil/random_seed.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/random_seed.h rename to app/src/main/cpp/include/libavutil/random_seed.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/rational.h b/app/src/main/cpp/include/libavutil/rational.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/rational.h rename to app/src/main/cpp/include/libavutil/rational.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/rc4.h b/app/src/main/cpp/include/libavutil/rc4.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/rc4.h rename to app/src/main/cpp/include/libavutil/rc4.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/replaygain.h b/app/src/main/cpp/include/libavutil/replaygain.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/replaygain.h rename to app/src/main/cpp/include/libavutil/replaygain.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/ripemd.h b/app/src/main/cpp/include/libavutil/ripemd.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/ripemd.h rename to app/src/main/cpp/include/libavutil/ripemd.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/samplefmt.h b/app/src/main/cpp/include/libavutil/samplefmt.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/samplefmt.h rename to app/src/main/cpp/include/libavutil/samplefmt.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/sha.h b/app/src/main/cpp/include/libavutil/sha.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/sha.h rename to app/src/main/cpp/include/libavutil/sha.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/sha512.h b/app/src/main/cpp/include/libavutil/sha512.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/sha512.h rename to app/src/main/cpp/include/libavutil/sha512.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/stereo3d.h b/app/src/main/cpp/include/libavutil/stereo3d.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/stereo3d.h rename to app/src/main/cpp/include/libavutil/stereo3d.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/tea.h b/app/src/main/cpp/include/libavutil/tea.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/tea.h rename to app/src/main/cpp/include/libavutil/tea.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/threadmessage.h b/app/src/main/cpp/include/libavutil/threadmessage.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/threadmessage.h rename to app/src/main/cpp/include/libavutil/threadmessage.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/time.h b/app/src/main/cpp/include/libavutil/time.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/time.h rename to app/src/main/cpp/include/libavutil/time.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/time_internal.h b/app/src/main/cpp/include/libavutil/time_internal.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/time_internal.h rename to app/src/main/cpp/include/libavutil/time_internal.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/timecode.h b/app/src/main/cpp/include/libavutil/timecode.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/timecode.h rename to app/src/main/cpp/include/libavutil/timecode.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/timer.h b/app/src/main/cpp/include/libavutil/timer.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/timer.h rename to app/src/main/cpp/include/libavutil/timer.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/timestamp.h b/app/src/main/cpp/include/libavutil/timestamp.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/timestamp.h rename to app/src/main/cpp/include/libavutil/timestamp.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/tree.h b/app/src/main/cpp/include/libavutil/tree.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/tree.h rename to app/src/main/cpp/include/libavutil/tree.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/twofish.h b/app/src/main/cpp/include/libavutil/twofish.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/twofish.h rename to app/src/main/cpp/include/libavutil/twofish.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/version.h b/app/src/main/cpp/include/libavutil/version.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/version.h rename to app/src/main/cpp/include/libavutil/version.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libavutil/xtea.h b/app/src/main/cpp/include/libavutil/xtea.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libavutil/xtea.h rename to app/src/main/cpp/include/libavutil/xtea.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libswresample/swresample.h b/app/src/main/cpp/include/libswresample/swresample.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libswresample/swresample.h rename to app/src/main/cpp/include/libswresample/swresample.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libswresample/version.h b/app/src/main/cpp/include/libswresample/version.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libswresample/version.h rename to app/src/main/cpp/include/libswresample/version.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libswscale/swscale.h b/app/src/main/cpp/include/libswscale/swscale.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libswscale/swscale.h rename to app/src/main/cpp/include/libswscale/swscale.h diff --git a/app/src/main/cpp/include/armeabi-v7a/libswscale/version.h b/app/src/main/cpp/include/libswscale/version.h similarity index 100% rename from app/src/main/cpp/include/armeabi-v7a/libswscale/version.h rename to app/src/main/cpp/include/libswscale/version.h