diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..551ccc1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,31 @@
+# Gradle
+.gradle/
+**/build/
+
+# Android local config
+local.properties
+
+# Android Studio / IntelliJ IDEA
+.idea/
+*.iml
+
+# Android native build outputs
+.cxx/
+**/.cxx/
+.externalNativeBuild/
+**/.externalNativeBuild/
+
+# APK/AAB outputs
+*.apk
+*.ap_
+*.aab
+
+# Java / Kotlin build artifacts
+*.class
+
+# Logs
+*.log
+
+# OS metadata
+.DS_Store
+Thumbs.db
diff --git a/README.md b/README.md
index c01a1a1..1f5db9c 100644
--- a/README.md
+++ b/README.md
@@ -339,6 +339,7 @@ Add ``` android:extractNativeLibs="false" ``` to application in the Manifest.xml
### Build scripts (FFmpeg .so binaries configuration)
The FFmpeg binaries for this project were assembled with help of [ffmpeg-android-maker](https://github.com/Javernaut/ffmpeg-android-maker) by Javernaut (Oleksandr Berezhnyi).
Custom Amplituda configuration (`configuration-build.sh`) is available in the root directory of the project.
+Current binaries are built from FFmpeg 7.1.4 (`ffmpeg-7.1.4.tar.xz`, SHA-256 `71f4aac3573ed9060489cb62526a6c7dda815ae10993789611acd7be9fa9fbf4`).
## Feedback
andriy.serb1@gmail.com
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavformat/version.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavformat/version.h
index 70c554c..66aa465 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavformat/version.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavformat/version.h
@@ -32,7 +32,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 7
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/bswap.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/bswap.h
index f53e576..c1e6591 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/bswap.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/bswap.h
@@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
- return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
+ return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/common.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/common.h
index 3b830da..bf23aa5 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/common.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/common.h
@@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
- val= (GET_BYTE);\
+ val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
- unsigned int tmp = (GET_BYTE) - 128;\
+ unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
@@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
- val = (GET_16BIT);\
+ val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
- val = (GET_16BIT) - 0xDC00;\
+ val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/dovi_meta.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/dovi_meta.h
index 5e8a1e4..99af82c 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/dovi_meta.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/dovi_meta.h
@@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}
+/**
+ * Gets the specified Dolby Vision Display Management (DM) metadata
+ * @param index must be non negative and below data->num_ext_blocks
+ */
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/ffversion.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/ffversion.h
index 48f04a6..0347403 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/ffversion.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "7.1.1"
+#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/hwcontext_qsv.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/hwcontext_qsv.h
index 35530e4..3c16a8a 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/hwcontext_qsv.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/hwcontext_qsv.h
@@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;
#endif /* AVUTIL_HWCONTEXT_QSV_H */
-
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/samplefmt.h b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/samplefmt.h
index 43a57a4..6e55d71 100644
--- a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/samplefmt.h
+++ b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/include/libavutil/samplefmt.h
@@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
- * @return the pointer to the filled buffer or NULL if sample_fmt is
- * unknown or in case of other errors
+ * @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavcodec-amplituda.so b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavcodec-amplituda.so
index 9abeaef..794b2ad 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavcodec-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavcodec-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavformat-amplituda.so b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavformat-amplituda.so
index 7a2e596..242a698 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavformat-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavformat-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavutil-amplituda.so b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavutil-amplituda.so
index ed081b7..607ff70 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavutil-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libavutil-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libswresample-amplituda.so b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libswresample-amplituda.so
index 6af6dd8..e74c494 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libswresample-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/arm64-v8a/lib/libswresample-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavformat/version.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavformat/version.h
index 70c554c..66aa465 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavformat/version.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavformat/version.h
@@ -32,7 +32,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 7
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/bswap.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/bswap.h
index f53e576..c1e6591 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/bswap.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/bswap.h
@@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
- return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
+ return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/common.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/common.h
index 3b830da..bf23aa5 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/common.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/common.h
@@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
- val= (GET_BYTE);\
+ val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
- unsigned int tmp = (GET_BYTE) - 128;\
+ unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
@@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
- val = (GET_16BIT);\
+ val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
- val = (GET_16BIT) - 0xDC00;\
+ val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/dovi_meta.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/dovi_meta.h
index 5e8a1e4..99af82c 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/dovi_meta.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/dovi_meta.h
@@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}
+/**
+ * Gets the specified Dolby Vision Display Management (DM) metadata
+ * @param index must be non negative and below data->num_ext_blocks
+ */
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/ffversion.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/ffversion.h
index 48f04a6..0347403 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/ffversion.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "7.1.1"
+#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/hwcontext_qsv.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/hwcontext_qsv.h
index 35530e4..3c16a8a 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/hwcontext_qsv.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/hwcontext_qsv.h
@@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;
#endif /* AVUTIL_HWCONTEXT_QSV_H */
-
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/samplefmt.h b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/samplefmt.h
index 43a57a4..6e55d71 100644
--- a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/samplefmt.h
+++ b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/include/libavutil/samplefmt.h
@@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
- * @return the pointer to the filled buffer or NULL if sample_fmt is
- * unknown or in case of other errors
+ * @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavcodec-amplituda.so b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavcodec-amplituda.so
index fb77126..d32a36b 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavcodec-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavcodec-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavformat-amplituda.so b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavformat-amplituda.so
index ef5628e..c16b1cd 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavformat-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavformat-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavutil-amplituda.so b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavutil-amplituda.so
index a6399a7..4567e54 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavutil-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libavutil-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libswresample-amplituda.so b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libswresample-amplituda.so
index 4f4a995..0d19079 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libswresample-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/armeabi-v7a/lib/libswresample-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavformat/version.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavformat/version.h
index 70c554c..66aa465 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavformat/version.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavformat/version.h
@@ -32,7 +32,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 7
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/bswap.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/bswap.h
index f53e576..c1e6591 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/bswap.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/bswap.h
@@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
- return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
+ return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/common.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/common.h
index 3b830da..bf23aa5 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/common.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/common.h
@@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
- val= (GET_BYTE);\
+ val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
- unsigned int tmp = (GET_BYTE) - 128;\
+ unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
@@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
- val = (GET_16BIT);\
+ val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
- val = (GET_16BIT) - 0xDC00;\
+ val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/dovi_meta.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/dovi_meta.h
index 5e8a1e4..99af82c 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/dovi_meta.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/dovi_meta.h
@@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}
+/**
+ * Gets the specified Dolby Vision Display Management (DM) metadata
+ * @param index must be non negative and below data->num_ext_blocks
+ */
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/ffversion.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/ffversion.h
index 48f04a6..0347403 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/ffversion.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "7.1.1"
+#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/hwcontext_qsv.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/hwcontext_qsv.h
index 35530e4..3c16a8a 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/hwcontext_qsv.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/hwcontext_qsv.h
@@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;
#endif /* AVUTIL_HWCONTEXT_QSV_H */
-
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/samplefmt.h b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/samplefmt.h
index 43a57a4..6e55d71 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/samplefmt.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86/include/libavutil/samplefmt.h
@@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
- * @return the pointer to the filled buffer or NULL if sample_fmt is
- * unknown or in case of other errors
+ * @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/lib/libavcodec-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86/lib/libavcodec-amplituda.so
index ff6b9aa..9aae327 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86/lib/libavcodec-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86/lib/libavcodec-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/lib/libavformat-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86/lib/libavformat-amplituda.so
index 627bacb..8f1a6b5 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86/lib/libavformat-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86/lib/libavformat-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/lib/libavutil-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86/lib/libavutil-amplituda.so
index 31fadc3..5f042da 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86/lib/libavutil-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86/lib/libavutil-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86/lib/libswresample-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86/lib/libswresample-amplituda.so
index 7cd883a..cddf6e4 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86/lib/libswresample-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86/lib/libswresample-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavformat/version.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavformat/version.h
index 70c554c..66aa465 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavformat/version.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavformat/version.h
@@ -32,7 +32,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 7
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/bswap.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/bswap.h
index f53e576..c1e6591 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/bswap.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/bswap.h
@@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
#ifndef av_bswap64
static inline uint64_t av_const av_bswap64(uint64_t x)
{
- return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
+ return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32));
}
#endif
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/common.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/common.h
index 3b830da..bf23aa5 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/common.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/common.h
@@ -486,13 +486,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
- val= (GET_BYTE);\
+ val= (uint8_t)(GET_BYTE);\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
{ERROR}\
while (val & top) {\
- unsigned int tmp = (GET_BYTE) - 128;\
+ unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
if(tmp>>6)\
{ERROR}\
val= (val<<6) + tmp;\
@@ -511,11 +511,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
- val = (GET_16BIT);\
+ val = (uint16_t)(GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
- val = (GET_16BIT) - 0xDC00;\
+ val = (uint16_t)(GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
{ERROR}\
val += (hi<<10) + 0x10000;\
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/dovi_meta.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/dovi_meta.h
index 5e8a1e4..99af82c 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/dovi_meta.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/dovi_meta.h
@@ -369,6 +369,10 @@ av_dovi_get_color(const AVDOVIMetadata *data)
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
}
+/**
+ * Gets the specified Dolby Vision Display Management (DM) metadata
+ * @param index must be non negative and below data->num_ext_blocks
+ */
static av_always_inline AVDOVIDmData *
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
{
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/ffversion.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/ffversion.h
index 48f04a6..0347403 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/ffversion.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "7.1.1"
+#define FFMPEG_VERSION "7.1.4"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/hwcontext_qsv.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/hwcontext_qsv.h
index 35530e4..3c16a8a 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/hwcontext_qsv.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/hwcontext_qsv.h
@@ -84,4 +84,3 @@ typedef struct AVQSVFramesContext {
} AVQSVFramesContext;
#endif /* AVUTIL_HWCONTEXT_QSV_H */
-
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/samplefmt.h b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/samplefmt.h
index 43a57a4..6e55d71 100644
--- a/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/samplefmt.h
+++ b/amplituda/src/main/cpp/ffmpeg/x86_64/include/libavutil/samplefmt.h
@@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
* @param sample_fmt the number of the sample format to print the
* corresponding info string, or a negative value to print the
* corresponding header.
- * @return the pointer to the filled buffer or NULL if sample_fmt is
- * unknown or in case of other errors
+ * @return the pointer to the filled buffer or NULL in case of other errors
*/
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavcodec-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavcodec-amplituda.so
index 3689815..0c36cda 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavcodec-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavcodec-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavformat-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavformat-amplituda.so
index 8fbbf53..a0df7da 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavformat-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavformat-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavutil-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavutil-amplituda.so
index 83fe47e..09cd130 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavutil-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libavutil-amplituda.so differ
diff --git a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libswresample-amplituda.so b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libswresample-amplituda.so
index 7f3c11c..a582e69 100755
Binary files a/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libswresample-amplituda.so and b/amplituda/src/main/cpp/ffmpeg/x86_64/lib/libswresample-amplituda.so differ
diff --git a/configuration-build.sh b/configuration-build.sh
index 36e2c25..98ff4b7 100755
--- a/configuration-build.sh
+++ b/configuration-build.sh
@@ -33,6 +33,7 @@ EXTRA_LDFLAGS="-Wl,-z,max-page-size=16384 $DEP_LD_FLAGS"
--sysroot=${SYSROOT_PATH} \
--cc=${FAM_CC} \
--cxx=${FAM_CXX} \
+ --stdc=gnu17 \
--ld=${FAM_LD} \
--ar=${FAM_AR} \
--as=${FAM_CC} \
@@ -42,7 +43,7 @@ EXTRA_LDFLAGS="-Wl,-z,max-page-size=16384 $DEP_LD_FLAGS"
--extra-cflags="-O3 -fPIC $DEP_CFLAGS" \
--extra-ldflags="$EXTRA_LDFLAGS" \
--enable-shared \
- --enable-network \
+ --disable-network \
--disable-static \
--disable-vulkan \
--disable-gpl \
diff --git a/sample/build.gradle b/sample/build.gradle
index 26a2e30..1f8f584 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -34,5 +34,6 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.5.0'
+ implementation 'com.github.massoudss:waveformSeekBar:5.0.2'
implementation project(":amplituda")
}
diff --git a/sample/src/main/java/com/linc/sample/MainActivity.java b/sample/src/main/java/com/linc/sample/MainActivity.java
index c40236a..430c529 100644
--- a/sample/src/main/java/com/linc/sample/MainActivity.java
+++ b/sample/src/main/java/com/linc/sample/MainActivity.java
@@ -3,13 +3,18 @@
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatActivity;
+
import android.Manifest;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
+
import java.io.File;
import java.util.Arrays;
+import java.util.List;
import java.util.Locale;
+
+import com.masoudss.lib.WaveformSeekBar;
import com.linc.amplituda.Amplituda;
import com.linc.amplituda.AmplitudaProgressListener;
import com.linc.amplituda.AmplitudaResult;
@@ -20,6 +25,8 @@
public class MainActivity extends AppCompatActivity {
+ private WaveformSeekBar waveformSeekBar;
+
private final ActivityResultLauncher permissionLauncher = registerForActivityResult(
new ActivityResultContracts.RequestPermission(),
isGranted -> processAudio()
@@ -29,6 +36,7 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
+ waveformSeekBar = findViewById(R.id.waveformSeekBar);
String permission = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
? Manifest.permission.READ_MEDIA_AUDIO : Manifest.permission.READ_EXTERNAL_STORAGE;
permissionLauncher.launch(permission);
@@ -36,9 +44,9 @@ protected void onCreate(Bundle savedInstanceState) {
private void processAudio() {
Amplituda amplituda = new Amplituda(this);
- amplituda.setLogConfig(Log.ERROR, true);
+ amplituda.setLogConfig(Log.DEBUG, true);
amplituda.processAudio(
- "/storage/emulated/0/Music/Linc - Amplituda.mp3",
+ R.raw.kygo,
Compress.withParams(Compress.PEAK, 1),
Cache.withParams(Cache.REFRESH),
new AmplitudaProgressListener() {
@@ -47,18 +55,26 @@ public void onStartProgress() {
super.onStartProgress();
System.out.println("Start Progress");
}
+
@Override
public void onStopProgress() {
super.onStopProgress();
System.out.println("Stop Progress");
}
+
@Override
public void onProgress(ProgressOperation operation, int progress) {
String currentOperation = "";
switch (operation) {
- case PROCESSING: currentOperation = "Process audio"; break;
- case DECODING: currentOperation = "Decode audio"; break;
- case DOWNLOADING: currentOperation = "Download audio from url"; break;
+ case PROCESSING:
+ currentOperation = "Process audio";
+ break;
+ case DECODING:
+ currentOperation = "Decode audio";
+ break;
+ case DOWNLOADING:
+ currentOperation = "Download audio from url";
+ break;
}
System.out.printf("%s: %d%% %n", currentOperation, progress);
}
@@ -67,6 +83,7 @@ public void onProgress(ProgressOperation operation, int progress) {
}
private void printResult(AmplitudaResult> result) {
+ waveformSeekBar.setSampleFrom(toIntArray(result.amplitudesAsList()));
System.out.printf(Locale.US,
"Audio info:\n" +
"millis = %d\n" +
@@ -95,4 +112,12 @@ private void printResult(AmplitudaResult> result) {
);
}
-}
\ No newline at end of file
+ private int[] toIntArray(List amplitudes) {
+ int[] samples = new int[amplitudes.size()];
+ for (int i = 0; i < amplitudes.size(); i++) {
+ samples[i] = amplitudes.get(i);
+ }
+ return samples;
+ }
+
+}
diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml
index 41b1f1c..a5ec34a 100644
--- a/sample/src/main/res/layout/activity_main.xml
+++ b/sample/src/main/res/layout/activity_main.xml
@@ -1,13 +1,33 @@
-
+ android:layout_height="match_parent"
+ android:gravity="top"
+ android:layout_marginTop="16dp"
+ android:orientation="vertical"
+ android:padding="24dp">
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
-
\ No newline at end of file
+
+
+