Commit a6cea62c by olly Committed by Oliver Woodman

Add gradle instructions to GVR readme + clean up FFMPEG readme

Note: Depending on the GVR extension via gradle wont work until
we actually push a release

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150208524
parent ccc5e472
...@@ -31,9 +31,7 @@ FFMPEG_EXT_PATH="${EXOPLAYER_ROOT}/extensions/ffmpeg/src/main" ...@@ -31,9 +31,7 @@ FFMPEG_EXT_PATH="${EXOPLAYER_ROOT}/extensions/ffmpeg/src/main"
NDK_PATH="<path to Android NDK>" NDK_PATH="<path to Android NDK>"
``` ```
* Fetch and build FFmpeg. * Fetch and build FFmpeg. For example, to fetch and build for armv7a:
For example, to fetch and build for armv7a:
``` ```
cd "${FFMPEG_EXT_PATH}/jni" && \ cd "${FFMPEG_EXT_PATH}/jni" && \
...@@ -69,15 +67,14 @@ make -j4 && \ ...@@ -69,15 +67,14 @@ make -j4 && \
make install-libs make install-libs
``` ```
* Build the JNI native libraries. * Build the JNI native libraries. Repeat this step for any other architectures
you need to support.
``` ```
cd "${FFMPEG_EXT_PATH}"/jni && \ cd "${FFMPEG_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=armeabi-v7a -j4 ${NDK_PATH}/ndk-build APP_ABI=armeabi-v7a -j4
``` ```
Repeat these steps for any other architectures you need to support.
* In your project, you can add a dependency on the extension by using a rule * In your project, you can add a dependency on the extension by using a rule
like this: like this:
......
...@@ -6,13 +6,33 @@ The GVR extension wraps the [Google VR SDK for Android][]. It provides a ...@@ -6,13 +6,33 @@ The GVR extension wraps the [Google VR SDK for Android][]. It provides a
GvrAudioProcessor, which uses [GvrAudioSurround][] to provide binaural rendering GvrAudioProcessor, which uses [GvrAudioSurround][] to provide binaural rendering
of surround sound and ambisonic soundfields. of surround sound and ambisonic soundfields.
## Instructions ## ## Using the extension ##
If using SimpleExoPlayer, override SimpleExoPlayer.buildAudioProcessors to The easiest way to use the extension is to add it as a gradle dependency. You
return a GvrAudioProcessor. need to make sure you have the jcenter repository included in the `build.gradle`
file in the root of your project:
If constructing renderers directly, pass a GvrAudioProcessor to ```gradle
MediaCodecAudioRenderer's constructor. repositories {
jcenter()
}
```
Next, include the following in your module's `build.gradle` file:
```gradle
compile 'com.google.android.exoplayer:extension-gvr:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
library being used.
## Using GvrAudioProcessor ##
* If using SimpleExoPlayer, override SimpleExoPlayer.buildAudioProcessors to
return a GvrAudioProcessor.
* If constructing renderers directly, pass a GvrAudioProcessor to
MediaCodecAudioRenderer's constructor.
[Google VR SDK for Android]: https://developers.google.com/vr/android/ [Google VR SDK for Android]: https://developers.google.com/vr/android/
[GvrAudioSurround]: https://developers.google.com/vr/android/reference/com/google/vr/sdk/audio/GvrAudioSurround [GvrAudioSurround]: https://developers.google.com/vr/android/reference/com/google/vr/sdk/audio/GvrAudioSurround
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment