15 Commits

Author SHA1 Message Date
rohks
c78abaac3f Simplify Flac extension build process
Removed `Android.mk` and `Application.mk`, allowing `CMake` to run directly from the build.gradle file. Users no longer need to check out `NDK` or depend on it, simplifying the usage of the Flac extension.

Also fixed a copy-pasted comment in `CMakeLists.txt` of Opus and IAMF.

PiperOrigin-RevId: 684769561
2024-10-11 03:09:32 -07:00
rohks
2640ebd58f Add 16 KB page support for decoder extensions on Android 15
We need to rebuild any native components of the app to prevent crashes on devices with 16 KB page support.

Tested on a device that supports 16 KB pages and runs Android 15, as well as on older Android devices.

Issue: androidx/media#1685
PiperOrigin-RevId: 684488244
2024-10-10 10:18:20 -07:00
rohks
6acddfeee6 Simplify IAMF extension build process
Removed `Android.mk` and `Application.mk`, allowing `CMake` to run directly from the `build.gradle` file. Users no longer need to check out `NDK` or depend on it, simplifying the usage of the IAMF extension.

PiperOrigin-RevId: 684471874
2024-10-10 09:32:25 -07:00
rohks
8f82a15e48 Return early when audioManager is null
Also declare and use `AudioFormat` directly instead of building it later.

PiperOrigin-RevId: 683637116
2024-10-08 08:42:56 -07:00
ivanbuper
ebb550a9f1 Fix WrongConstant lint failure for IamfDecoder#OUTPUT_PCM_ENCODING
To avoid `WrongConstant` failures with methods that expect
`C.@PcmEncoding`, `OUTPUT_PCM_ENCODING` now points to the constant in
`C` instead of `AudioFormat`.

#cherrypick

PiperOrigin-RevId: 670251463
2024-09-02 10:20:55 -07:00
ktrajkovski
ab366e2626 Fix licensing link from http to https in IAMF related files.
PiperOrigin-RevId: 664845636
2024-08-19 09:38:49 -07:00
ktrajkovski
63b45b7503 Build IAMF libraries with gradle and ndk-build.
In order to support building with `gradle` a new `build.gradle` file was added together with `Android.mk`, `Application.mk`, and `libiamf.mk` necessary for local builds with NDK.

After this change, IAMF files may also be played in the ExoPlayer demo built locally (without blaze).

PiperOrigin-RevId: 664841684
2024-08-19 09:29:47 -07:00
ktrajkovski
0b23285bae Add nativeDecoderPointer field to IamfDecoder.
Moving this field to `IamfDecoder` instead of `iamf_jni` allows multiple instances of the IAMF decoder with possibly different configurations at the same time.

PiperOrigin-RevId: 662548068
2024-08-13 09:38:44 -07:00
ktrajkovski
92cff64321 Add spatial effects to IAMF support in Exoplayer.
Check if the output device supports spatialization for the requested output format. If so, return a stream decoded for 6 channels in a 5.1 layout. Otherwise, return a stream decoded for 2 channels in a binaural layout.

PiperOrigin-RevId: 662546818
2024-08-13 09:34:50 -07:00
ktrajkovski
20df8b282a Collect configuration values in IamfDecoder.
Instead of hard-coding values in multiple files, all default values are declared in `IamfDecoder`. Additionally, the max number of frames used for output buffer initialisation is fetched from `libiamf` native functions.

PiperOrigin-RevId: 658772175
2024-08-02 06:30:34 -07:00
ktrajkovski
04bfeec751 Add decoding functions to IamfDecoder and LibiamfAudioRender.
PiperOrigin-RevId: 657621223
2024-07-30 09:33:31 -07:00
ibaker
8360e44e07 Remove multidex config from iamf_decoder library's
`AndroidManifest.xml`. This doesn't have Gradle wiring yet, so was
probably missed as part of https://github.com/androidx/media/pull/1549.

PiperOrigin-RevId: 657549817
2024-07-30 05:22:49 -07:00
ktrajkovski
a1f20de3a9 Import a library for a Java clarity fix.
PiperOrigin-RevId: 655488843
2024-07-24 02:38:00 -07:00
ktrajkovski
2793ba845e Implement IamfDecoder and LibiamfAudioRenderer configuration.
PiperOrigin-RevId: 655212678
2024-07-23 10:23:48 -07:00
ktrajkovski
104fcc1c76 Add skeleton of the IAMF JNI wrapper for the native decoder in libiamf.
PiperOrigin-RevId: 652761237
2024-07-16 02:54:21 -07:00