Update READMEs with new local build instructions

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160290097
This commit is contained in:
olly 2017-06-27 10:11:26 -07:00 committed by Oliver Woodman
parent efb367b417
commit d5c2cf79f4
9 changed files with 101 additions and 122 deletions

View File

@ -20,6 +20,11 @@ and extend, and can be updated through Play Store application updates.
## Using ExoPlayer ## ## Using ExoPlayer ##
ExoPlayer modules can be obtained via jCenter. It's also possible to clone the
repository and depend on the modules locally.
### Via jCenter ###
The easiest way to get started using ExoPlayer is to add it as a gradle The easiest way to get started using ExoPlayer is to add it as a gradle
dependency. You need to make sure you have the jcenter repository included in dependency. You need to make sure you have the jcenter repository included in
the `build.gradle` file in the root of your project: the `build.gradle` file in the root of your project:
@ -64,6 +69,39 @@ latest versions, see the [Release notes][].
[Bintray]: https://bintray.com/google/exoplayer [Bintray]: https://bintray.com/google/exoplayer
[Release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md [Release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
### Locally ###
Cloning the repository and depending on the modules locally is required when
using some ExoPlayer extension modules. It's also a suitable approach if you
want to make local changes to ExoPlayer, or if you want to use a development
branch.
First, clone the repository into a local directory and checkout the desired
branch:
```sh
git clone https://github.com/google/ExoPlayer.git
git checkout release-v2
```
Next, add the following to your project's `settings.gradle` file, replacing
`path/to/exoplayer` with the path to your local copy:
```gradle
gradle.ext.exoplayerRoot = 'path/to/exoplayer'
gradle.ext.exoplayerModulePrefix = 'exoplayer-'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
```
You should now see the ExoPlayer modules appear as part of your project. You can
depend on them as you would on any other local module, for example:
```gradle
compile project(':exoplayer-library-core')
compile project(':exoplayer-library-dash')
compile project(':exoplayer-library-ui)
```
## Developing ExoPlayer ## ## Developing ExoPlayer ##
#### Project branches #### #### Project branches ####

View File

@ -11,13 +11,10 @@ The Cronet Extension is an [HttpDataSource][] implementation using [Cronet][].
## Build Instructions ## ## Build Instructions ##
* Checkout ExoPlayer along with Extensions: To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
``` [top level README][]. In addition, it's necessary to get the Cronet libraries
git clone https://github.com/google/ExoPlayer.git and enable the extension:
```
* Get the Cronet libraries:
1. Find the latest Cronet release [here][] and navigate to its `Release/cronet` 1. Find the latest Cronet release [here][] and navigate to its `Release/cronet`
directory directory
@ -27,6 +24,12 @@ git clone https://github.com/google/ExoPlayer.git
1. Copy the content of the downloaded `libs` directory into the `jniLibs` 1. Copy the content of the downloaded `libs` directory into the `jniLibs`
directory of this extension directory of this extension
* In ExoPlayer's `settings.gradle` file, uncomment the Cronet extension * In your `settings.gradle` file, add the following line before the line that
applies `core_settings.gradle`:
```gradle
gradle.ext.exoplayerIncludeCronetExtension = true;
```
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
[here]: https://console.cloud.google.com/storage/browser/chromium-cronet/android [here]: https://console.cloud.google.com/storage/browser/chromium-cronet/android

View File

@ -9,11 +9,10 @@ audio.
## Build instructions ## ## Build instructions ##
* Checkout ExoPlayer along with Extensions To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
``` [top level README][]. In addition, it's necessary to build the extension's
git clone https://github.com/google/ExoPlayer.git native components as follows:
```
* Set the following environment variables: * Set the following environment variables:
@ -25,8 +24,6 @@ FFMPEG_EXT_PATH="${EXOPLAYER_ROOT}/extensions/ffmpeg/src/main"
* Download the [Android NDK][] and set its location in an environment variable: * Download the [Android NDK][] and set its location in an environment variable:
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
``` ```
NDK_PATH="<path to Android NDK>" NDK_PATH="<path to Android NDK>"
``` ```
@ -106,20 +103,5 @@ cd "${FFMPEG_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI="armeabi-v7a arm64-v8a x86" -j4 ${NDK_PATH}/ndk-build APP_ABI="armeabi-v7a arm64-v8a x86" -j4
``` ```
* In your project, you can add a dependency on the extension by using a rule [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
like this: [Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
```
// in settings.gradle
include ':..:ExoPlayer:library'
include ':..:ExoPlayer:extension-ffmpeg'
// in build.gradle
dependencies {
compile project(':..:ExoPlayer:library')
compile project(':..:ExoPlayer:extension-ffmpeg')
}
```
* Now, when you build your app, the extension will be built and the native
libraries will be packaged along with the APK.

View File

@ -10,11 +10,10 @@ ExoPlayer to play Flac audio on Android devices.
## Build Instructions ## ## Build Instructions ##
* Checkout ExoPlayer along with Extensions: To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
``` [top level README][]. In addition, it's necessary to build the extension's
git clone https://github.com/google/ExoPlayer.git native components as follows:
```
* Set the following environment variables: * Set the following environment variables:
@ -26,8 +25,6 @@ FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"
* Download the [Android NDK][] and set its location in an environment variable: * Download the [Android NDK][] and set its location in an environment variable:
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
``` ```
NDK_PATH="<path to Android NDK>" NDK_PATH="<path to Android NDK>"
``` ```
@ -47,20 +44,5 @@ cd "${FLAC_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4 ${NDK_PATH}/ndk-build APP_ABI=all -j4
``` ```
* In your project, you can add a dependency to the Flac Extension by using a [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
rule like this: [Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
```
// in settings.gradle
include ':..:ExoPlayer:library'
include ':..:ExoPlayer:extension-flac'
// in build.gradle
dependencies {
compile project(':..:ExoPlayer:library')
compile project(':..:ExoPlayer:extension-flac')
}
```
* Now, when you build your app, the Flac extension will be built and the native
libraries will be packaged along with the APK.

View File

@ -6,7 +6,10 @@ 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.
## Using the extension ## [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
## Getting the extension ##
The easiest way to use the extension is to add it as a gradle dependency. You 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` need to make sure you have the jcenter repository included in the `build.gradle`
@ -27,12 +30,15 @@ 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 where `rX.X.X` is the version, which must match the version of the ExoPlayer
library being used. library being used.
## Using GvrAudioProcessor ## Alternatively, you can clone the ExoPlayer repository and depend on the module
locally. Instructions for doing this can be found in ExoPlayer's
[top level README][].
## Using the extension ##
* If using SimpleExoPlayer, override SimpleExoPlayer.buildAudioProcessors to * If using SimpleExoPlayer, override SimpleExoPlayer.buildAudioProcessors to
return a GvrAudioProcessor. return a GvrAudioProcessor.
* If constructing renderers directly, pass a GvrAudioProcessor to * If constructing renderers directly, pass a GvrAudioProcessor to
MediaCodecAudioRenderer's constructor. MediaCodecAudioRenderer's constructor.
[Google VR SDK for Android]: https://developers.google.com/vr/android/ [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
[GvrAudioSurround]: https://developers.google.com/vr/android/reference/com/google/vr/sdk/audio/GvrAudioSurround

View File

@ -9,6 +9,14 @@ alongside content.
[IMA]: https://developers.google.com/interactive-media-ads/docs/sdks/android/ [IMA]: https://developers.google.com/interactive-media-ads/docs/sdks/android/
[MediaSource]: https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/source/MediaSource.java [MediaSource]: https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/source/MediaSource.java
## Getting the extension ##
To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
[top level README][].
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
## Using the extension ## ## Using the extension ##
Pass a single-window content `MediaSource` to `ImaAdsMediaSource`'s constructor, Pass a single-window content `MediaSource` to `ImaAdsMediaSource`'s constructor,
@ -21,6 +29,7 @@ select and build one of the `withExtensions` build variants of the demo app in
Android Studio. You can find IMA test content in the "IMA sample ad tags" Android Studio. You can find IMA test content in the "IMA sample ad tags"
section of the app. section of the app.
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
[sample ad tags]: https://developers.google.com/interactive-media-ads/docs/sdks/android/tags [sample ad tags]: https://developers.google.com/interactive-media-ads/docs/sdks/android/tags
## Known issues ## ## Known issues ##

View File

@ -5,19 +5,12 @@
The OkHttp Extension is an [HttpDataSource][] implementation using Square's The OkHttp Extension is an [HttpDataSource][] implementation using Square's
[OkHttp][]. [OkHttp][].
## Using the extension ## [HttpDataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html
[OkHttp]: https://square.github.io/okhttp/
The easiest way to use the extension is to add it as a gradle dependency. You ## Getting the extension ##
need to make sure you have the jcenter repository included in the `build.gradle`
file in the root of your project:
```gradle The easiest way to use the extension is to add it as a gradle dependency:
repositories {
jcenter()
}
```
Next, include the following in your module's `build.gradle` file:
```gradle ```gradle
compile 'com.google.android.exoplayer:extension-okhttp:rX.X.X' compile 'com.google.android.exoplayer:extension-okhttp:rX.X.X'
@ -26,5 +19,8 @@ compile 'com.google.android.exoplayer:extension-okhttp:rX.X.X'
where `rX.X.X` is the version, which must match the version of the ExoPlayer where `rX.X.X` is the version, which must match the version of the ExoPlayer
library being used. library being used.
[HttpDataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html Alternatively, you can clone the ExoPlayer repository and depend on the module
[OkHttp]: https://square.github.io/okhttp/ locally. Instructions for doing this can be found in ExoPlayer's
[top level README][].
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md

View File

@ -10,11 +10,10 @@ ExoPlayer to play Opus audio on Android devices.
## Build Instructions ## ## Build Instructions ##
* Checkout ExoPlayer along with Extensions: To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
``` [top level README][]. In addition, it's necessary to build the extension's
git clone https://github.com/google/ExoPlayer.git native components as follows:
```
* Set the following environment variables: * Set the following environment variables:
@ -26,8 +25,6 @@ OPUS_EXT_PATH="${EXOPLAYER_ROOT}/extensions/opus/src/main"
* Download the [Android NDK][] and set its location in an environment variable: * Download the [Android NDK][] and set its location in an environment variable:
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
``` ```
NDK_PATH="<path to Android NDK>" NDK_PATH="<path to Android NDK>"
``` ```
@ -52,23 +49,8 @@ cd "${OPUS_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4 ${NDK_PATH}/ndk-build APP_ABI=all -j4
``` ```
* In your project, you can add a dependency to the Opus Extension by using a [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
rule like this: [Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
```
// in settings.gradle
include ':..:ExoPlayer:library'
include ':..:ExoPlayer:extension-opus'
// in build.gradle
dependencies {
compile project(':..:ExoPlayer:library')
compile project(':..:ExoPlayer:extension-opus')
}
```
* Now, when you build your app, the Opus extension will be built and the native
libraries will be packaged along with the APK.
## Notes ## ## Notes ##

View File

@ -10,11 +10,10 @@ VP9 video on Android devices.
## Build Instructions ## ## Build Instructions ##
* Checkout ExoPlayer along with Extensions: To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
``` [top level README][]. In addition, it's necessary to build the extension's
git clone https://github.com/google/ExoPlayer.git native components as follows:
```
* Set the following environment variables: * Set the following environment variables:
@ -26,8 +25,6 @@ VP9_EXT_PATH="${EXOPLAYER_ROOT}/extensions/vp9/src/main"
* Download the [Android NDK][] and set its location in an environment variable: * Download the [Android NDK][] and set its location in an environment variable:
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
``` ```
NDK_PATH="<path to Android NDK>" NDK_PATH="<path to Android NDK>"
``` ```
@ -66,23 +63,8 @@ cd "${VP9_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4 ${NDK_PATH}/ndk-build APP_ABI=all -j4
``` ```
* In your project, you can add a dependency to the VP9 Extension by using a the [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
following rule: [Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
```
// in settings.gradle
include ':..:ExoPlayer:library'
include ':..:ExoPlayer:extension-vp9'
// in build.gradle
dependencies {
compile project(':..:ExoPlayer:library')
compile project(':..:ExoPlayer:extension-vp9')
}
```
* Now, when you build your app, the VP9 extension will be built and the native
libraries will be packaged along with the APK.
## Notes ## ## Notes ##
@ -94,4 +76,3 @@ dependencies {
`${VP9_EXT_PATH}/jni/libvpx` or `${VP9_EXT_PATH}/jni/libyuv` respectively. But `${VP9_EXT_PATH}/jni/libvpx` or `${VP9_EXT_PATH}/jni/libyuv` respectively. But
please note that `generate_libvpx_android_configs.sh` and the makefiles need please note that `generate_libvpx_android_configs.sh` and the makefiles need
to be modified to work with arbitrary versions of libvpx and libyuv. to be modified to work with arbitrary versions of libvpx and libyuv.