Skip to content

Commit

Permalink
Migrate to NDK r26b
Browse files Browse the repository at this point in the history
  • Loading branch information
equeim committed Oct 13, 2023
1 parent 92804df commit 9772e08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/decoder_ffmpeg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ FFMPEG_MODULE_PATH="$(pwd)/libraries/decoder_ffmpeg/src/main"
```

* Download the [Android NDK][] and set its location in a shell variable.
This build configuration has been tested on NDK r21.
This build configuration has been tested on NDK r26b.

```
NDK_PATH="<path to Android NDK>"
Expand Down
8 changes: 7 additions & 1 deletion libraries/decoder_ffmpeg/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
// limitations under the License.
apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle"

android.namespace = 'androidx.media3.decoder.ffmpeg'
android {
namespace = 'androidx.media3.decoder.ffmpeg'
defaultConfig {
// NDK r26+ requires at least 21
minSdkVersion 21
}
}

// Configure the native build only if ffmpeg is present to avoid gradle sync
// failures if ffmpeg hasn't been built according to the README instructions.
Expand Down
4 changes: 2 additions & 2 deletions libraries/decoder_ffmpeg/src/main/jni/build_ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cd "${FFMPEG_MODULE_PATH}/jni/ffmpeg"
--libdir=android-libs/armeabi-v7a \
--arch=arm \
--cpu=armv7-a \
--cross-prefix="${TOOLCHAIN_PREFIX}/armv7a-linux-androideabi16-" \
--cross-prefix="${TOOLCHAIN_PREFIX}/armv7a-linux-androideabi21-" \
--nm="${TOOLCHAIN_PREFIX}/llvm-nm" \
--ar="${TOOLCHAIN_PREFIX}/llvm-ar" \
--ranlib="${TOOLCHAIN_PREFIX}/llvm-ranlib" \
Expand Down Expand Up @@ -78,7 +78,7 @@ make clean
--libdir=android-libs/x86 \
--arch=x86 \
--cpu=i686 \
--cross-prefix="${TOOLCHAIN_PREFIX}/i686-linux-android16-" \
--cross-prefix="${TOOLCHAIN_PREFIX}/i686-linux-android21-" \
--nm="${TOOLCHAIN_PREFIX}/llvm-nm" \
--ar="${TOOLCHAIN_PREFIX}/llvm-ar" \
--ranlib="${TOOLCHAIN_PREFIX}/llvm-ranlib" \
Expand Down

0 comments on commit 9772e08

Please sign in to comment.