Skip to content

Commit

Permalink
Add gradle instructions to GVR readme + clean up FFMPEG readme
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ojw28 committed Mar 15, 2017
1 parent ccc5e47 commit a6cea62
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
9 changes: 3 additions & 6 deletions extensions/ffmpeg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" && \
Expand Down Expand Up @@ -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:

Expand Down
30 changes: 25 additions & 5 deletions extensions/gvr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a6cea62

Please sign in to comment.