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
This commit is contained in:
olly 2017-03-15 10:28:50 -07:00 committed by Oliver Woodman
parent ccc5e472b0
commit a6cea62c1b
2 changed files with 28 additions and 11 deletions

View File

@ -31,9 +31,7 @@ FFMPEG_EXT_PATH="${EXOPLAYER_ROOT}/extensions/ffmpeg/src/main"
NDK_PATH="<path to Android NDK>"
```
* Fetch and build FFmpeg.
For example, to fetch and build for armv7a:
* Fetch and build FFmpeg. For example, to fetch and build for armv7a:
```
cd "${FFMPEG_EXT_PATH}/jni" && \
@ -69,15 +67,14 @@ make -j4 && \
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 && \
${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
like this:

View File

@ -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
of surround sound and ambisonic soundfields.
## Instructions ##
## Using the extension ##
If using SimpleExoPlayer, override SimpleExoPlayer.buildAudioProcessors to
return a GvrAudioProcessor.
The easiest way to use the extension is to add it as a gradle dependency. You
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
MediaCodecAudioRenderer's constructor.
```gradle
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/
[GvrAudioSurround]: https://developers.google.com/vr/android/reference/com/google/vr/sdk/audio/GvrAudioSurround