Skip to content

Commit

Permalink
Google release v2 merget to release v2 (#2)
Browse files Browse the repository at this point in the history
* Minimal change to expose segment indices in DefaultDashChunkSource

Issue: google#3037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164614478

* Clean up terminology for MediaSession extension

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164705750

* Fix minor Javadoc error

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706078

* Document usage of the RTMP extension

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706135

* set mediaSession flags properly and keep queue in sync when timeline changes

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164774783

* Support multiple video/text/metadata outputs

We've seen more than one issue filed where a developer has
registered a video listener and been confused by the fact
their SimpleExoPlayerView no longer works properly. There
are also valid use cases for having multiple metadata/text
outputs.

Issue: google#2933
Issue: google#2800
Issue: google#2286
Issue: google#2240

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164839882

* Fix maskingX variables when timeline becomes empty

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164840037

* Restrict usage of secure DummySurface for all Samsung devices.

* Support H262 video in MP4

* Fix possible subrip timing line NPE

* Support crop mode for AspectRatioFrameLayout

* Add flag to CachedContentIndex to disable encryption.  This allows the encryption feature
to be disabled gracefully: encrypted index files may be read, but plaintext will be written.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165196508

* Disable secure dummy surface on all Samsung N devices

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291627

* Update instructions to include Google Maven repository

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291982

* Destroy GL context when releasing dummy surface

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165293386

* Restore the interrupted flag after blocking operations

If the main thread was interrupted during
ExoPlayerImplInternal.blockingSendMessage/release, the interrupted flag was
immediately set but then wait() was called on the next iteration. wait() would
immediately throw InterruptedException, causing the main thread to spin until
the blocking operation completed.

Instead of resetting the flag immediately, reset it after the blocking
operation completes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165426493

* Work around issue with Xiaomi JB devices

Issue: google#3171

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165577562

* Improve FORMAT_UNSUPPORTED_DRM related documentation and logging

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165580016

* Improve MediaSource/MediaPeriod documentation

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628229

* expose setPropertyByteArray, setPropertyString

export setPropertyByteArray, setPropertyString of DefaultDrmSessionManager for easy customization.

* Minor style tweaks

* Allow the app to specify extra ad markers

Issue: google#3184

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165895259

* Remove isFirstWindow/isLastWindow from Timeline.

These methods are only used in one place, and offer duplicate
functionality to checking getNext(Previous)WindowIndex == C.INDEX_UNSET.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165910258

* Fix broken link + minor doc tweak

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165920927

* Handle size==0 in MP4 atoms

Issue: google#3191

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165925148

* Use flavorDimensions for external demo app

- This is soon becoming mandatory.
- It also looks like future versions of com.android.tools.build
  are being distributed via Google's Maven repository.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166058299

* Support aspect ratio fill mode for AspectRatioFrameLayout

* Support zoom mode for AspectRatioFrameLayout

* Allow subclasses to customize the MediaFormat

Make getMediaFormat protected so that subclasses can set additional MediaFormat
keys. For example, if the decoder output needs to be read back via an
ImageReader as YUV data it is necessary to set KEY_COLOR_FORMAT to
COLOR_FormatYUV420Flexible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166195211

* Use Math.abs in Sonic.java

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166820970

* Add support for new codecs parameter string

* google#3215 Additional secure DummySurface device exclusions

* Use UTF-8 everywhere

UTF-8 is the default charset on Android so this should be a no-op change, but
makes the code portable (in case it runs on another platform).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167011583

* Fix ContentDataSource bytesRemaining calculation

The bytesRemaining didn't always take into account any skipped bytes, which
meant that reaching the end of the file was not correctly detected in read().

Issue: google#3216

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167016672

* Allow more aggressive switching for HLS with independent segments

We currently switch without downloading overlapping segments, but
we do not actually switch more aggressively. This change fixes
this. Note there's an implicit assumption made that if one media
playlist declares independent segments, the others will too. This
is almost certainly true in practice, and if it's not the penalty
isn't too bad (the player may try and switch to a higher quality
variant one segment's worth of buffer too soon).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167120992

* HDR 10 bits: Use a separate sampler for U and V dithering.
Using the same sampler introduced some minor horizontal scratches.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167347995

* Fix typo

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167474040

* Minor cleanup to AspectRatioFrameLayout

* Update moe eqiuvalence

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167488837

* Allow EXIF tracks to be exposed

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167493800

* Adding missing license header in IMA build.gradle

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167496569

* Additional secure DummySurface device exclusions

Merge: google#3225

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167502127

* Be robust against unexpected EOS in WebvttCueParser

Issue: google#3228

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167504122

* Rewrite logic for enabling secure DummySurface

Issue: google#3215

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167505797

* Upgrade gradle plugin / wrapper

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167579719

* Don't use MediaCodec.setOutputSurface on Nexus 7 with qcom decoder

Issue: google#3236

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167581198

* Fix position reporting during ads when period has non-zero window offset.

Reporting incorrect positions for ad playbacks was causing IMA to
think the ad wasn't playing, when in fact it was.

Issue: google#3180

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167702032

* Workaround for SurfaceView not being hidden properly

This appears to be fixed in Oreo, but given how harmless
the workaround is we can probably just apply it on all
API levels to be sure.

Issue: google#3160

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167709070

* DecryptionException cleanup + add missing header

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167711928

* Pick up rtmpClient fix

Issue: google#3156

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167718081

* Enable rtmp in external demo app with extensions

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168007345

* Destroy EGLSurface during DummySurface cleanup

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168020525

* Fix attr inheritance in SimpleExoPlayerView

When creating PlaybackControlView inside SimpleExoPlayerView,
we want certain attributes to be passed through. This lets you
set control attributes on the SimpleExoPlayerView directly. We
don't want all attributes to be propagated though; only our own
custom ones.

Not sure if there's a cleaner way to do this. Pragmatically this
solution seems ... ok :)?

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167619801

* Add possibility of forcing a specific license URL in HttpMediaDrmCallback

Resubmit of google#3136

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164971900

* Fix build for release

* Bump to 2.5.2

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168155713

* Update extension README with usage instructions

Issue: google#3162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165572088

* Tweak and add READMEs + remove refs to V1

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518

* Update README.md
  • Loading branch information
hishamMuneer authored Sep 14, 2017
1 parent 4cc1695 commit 125e6fe
Show file tree
Hide file tree
Showing 75 changed files with 1,111 additions and 358 deletions.
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,37 @@ and extend, and can be updated through Play Store application updates.

## Documentation ##

* The [developer guide][] provides a wealth of information to help you get
started.
* The [class reference][] documents the ExoPlayer library classes.
* The [developer guide][] provides a wealth of information.
* The [class reference][] documents ExoPlayer classes.
* The [release notes][] document the major changes in each release.
* Follow our [developer blog][] to keep up to date with the latest ExoPlayer
developments!

[developer guide]: https://google.github.io/ExoPlayer/guide.html
[class reference]: https://google.github.io/ExoPlayer/doc/reference
[release notes]: https://github.com/google/ExoPlayer/blob/dev-v2/RELEASENOTES.md
[release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
[developer blog]: https://medium.com/google-exoplayer

## Using ExoPlayer ##

ExoPlayer modules can be obtained via jCenter. It's also possible to clone the
ExoPlayer modules can be obtained from JCenter. It's also possible to clone the
repository and depend on the modules locally.

### Via jCenter ###
### From JCenter ###

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
the `build.gradle` file in the root of your project:
dependency. You need to make sure you have the JCenter and Google repositories
included in the `build.gradle` file in the root of your project:

```gradle
repositories {
jcenter()
google()
}
```

Next add a gradle compile dependency to the `build.gradle` file of your app
module. The following will add a dependency to the full ExoPlayer library:
module. The following will add a dependency to the full library:

```gradle
compile 'com.google.android.exoplayer:exoplayer:r2.X.X'
Expand All @@ -53,8 +56,8 @@ compile 'com.google.android.exoplayer:exoplayer-dash:r2.X.X'
compile 'com.google.android.exoplayer:exoplayer-ui:r2.X.X'
```

The available modules are listed below. Adding a dependency to the full
ExoPlayer library is equivalent to adding dependencies on all of the modules
The available library modules are listed below. Adding a dependency to the full
library is equivalent to adding dependencies on all of the library modules
individually.

* `exoplayer-core`: Core functionality (required).
Expand All @@ -63,11 +66,16 @@ individually.
* `exoplayer-smoothstreaming`: Support for SmoothStreaming content.
* `exoplayer-ui`: UI components and resources for use with ExoPlayer.

For more details, see the project on [Bintray][]. For information about the
latest versions, see the [Release notes][].
In addition to library modules, ExoPlayer has multiple extension modules that
depend on external libraries to provide additional functionality. Some
extensions are available from JCenter, whereas others must be built manaully.
Browse the [extensions directory] and their individual READMEs for details.

More information on the library and extension modules that are available from
JCenter can be found on [Bintray][].

[extensions directory]: https://github.com/google/ExoPlayer/tree/release-v2/extensions/
[Bintray]: https://bintray.com/google/exoplayer
[Release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md

### Locally ###

Expand Down Expand Up @@ -99,22 +107,16 @@ 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)
compile project(':exoplayer-library-ui')
```

## Developing ExoPlayer ##

#### Project branches ####

* The project has `dev-vX` and `release-vX` branches, where `X` is the major
version number.
* Most development work happens on the `dev-vX` branch with the highest major
version number. Pull requests should normally be made to this branch.
* Bug fixes may be submitted to older `dev-vX` branches. When doing this, the
same (or an equivalent) fix should also be submitted to all subsequent
`dev-vX` branches.
* A `release-vX` branch holds the most recent stable release for major version
`X`.
* Development work happens on the `dev-v2` branch. Pull requests should
normally be made to this branch.
* The `release-v2` branch holds the most recent release.

#### Using Android Studio ####

Expand Down
26 changes: 26 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Release notes #

### r2.5.2 ###

* IMA extension: Fix issue where ad playback could end prematurely for some
content types ([#3180](https://github.com/google/ExoPlayer/issues/3180)).
* RTMP extension: Fix SIGABRT on fast RTMP stream restart
([#3156](https://github.com/google/ExoPlayer/issues/3156)).
* UI: Allow app to manually specify ad markers
([#3184](https://github.com/google/ExoPlayer/issues/3184)).
* DASH: Expose segment indices to subclasses of DefaultDashChunkSource
([#3037](https://github.com/google/ExoPlayer/issues/3037)).
* Captions: Added robustness against malformed WebVTT captions
([#3228](https://github.com/google/ExoPlayer/issues/3228)).
* DRM: Support forcing a specific license URL.
* Fix playback error when seeking in media loaded through content:// URIs
([#3216](https://github.com/google/ExoPlayer/issues/3216)).
* Fix issue playing MP4s in which the last atom specifies a size of zero
([#3191](https://github.com/google/ExoPlayer/issues/3191)).
* Workaround playback failures on some Xiaomi devices
([#3171](https://github.com/google/ExoPlayer/issues/3171)).
* Workaround SIGSEGV issue on some devices when setting and swapping surface for
secure playbacks ([#3215](https://github.com/google/ExoPlayer/issues/3215)).
* Workaround for Nexus 7 issue when swapping output surface
([#3236](https://github.com/google/ExoPlayer/issues/3236)).
* Workaround for SimpleExoPlayerView's surface not being hidden properly
([#3160](https://github.com/google/ExoPlayer/issues/3160)).

### r2.5.1 ###

* Fix an issue that could cause the reported playback position to stop advancing
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
classpath 'com.novoda:bintray-release:0.5.0'
}
// Workaround for the following test coverage issue. Remove when fixed:
Expand Down
2 changes: 1 addition & 1 deletion constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ project.ext {
supportLibraryVersion = '25.4.0'
dexmakerVersion = '1.2'
mockitoVersion = '1.9.5'
releaseVersion = 'r2.5.1'
releaseVersion = 'r2.5.2'
modulePrefix = ':'
if (gradle.ext.has('exoplayerModulePrefix')) {
modulePrefix += gradle.ext.exoplayerModulePrefix
Expand Down
4 changes: 2 additions & 2 deletions demo/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Demo application #
# ExoPlayer main demo #

This folder contains a demo application that uses ExoPlayer to play a number
This is the main ExoPlayer demo application. It uses ExoPlayer to play a number
of test streams. It can be used as a starting point or reference project when
developing other applications that make use of the ExoPlayer library.
1 change: 1 addition & 0 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dependencies {
withExtensionsCompile project(path: modulePrefix + 'extension-ima')
withExtensionsCompile project(path: modulePrefix + 'extension-opus')
withExtensionsCompile project(path: modulePrefix + 'extension-vp9')
withExtensionsCompile project(path: modulePrefix + 'extension-rtmp')
compile 'commons-io:commons-io:2.5'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.github.bumptech.glide:glide:4.0.0'
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.novo"
android:versionCode="2501"
android:versionName="2.5.1">
android:versionCode="2502"
android:versionName="2.5.2">

<uses-sdk
android:minSdkVersion="16"
Expand Down
2 changes: 2 additions & 0 deletions demo/src/main/java/com/novo/main/EventLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ private static String getFormatSupportString(int formatSupport) {
return "YES";
case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
return "NO_EXCEEDS_CAPABILITIES";
case RendererCapabilities.FORMAT_UNSUPPORTED_DRM:
return "NO_UNSUPPORTED_DRM";
case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
return "NO_UNSUPPORTED_TYPE";
case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/com/novo/main/PlayerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ private void initializePlayer() {
player = ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector);
player.addListener(this);
player.addListener(eventLogger);
player.addMetadataOutput(eventLogger);
player.setAudioDebugListener(eventLogger);
player.setVideoDebugListener(eventLogger);
player.setMetadataOutput(eventLogger);

simpleExoPlayerView.setPlayer(player);
player.setPlayWhenReady(shouldAutoPlay);
Expand Down
5 changes: 5 additions & 0 deletions extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ExoPlayer extensions #

ExoPlayer extensions are modules that depend on external libraries to provide
additional functionality. Browse the individual extensions and their READMEs to
learn more.
20 changes: 11 additions & 9 deletions extensions/cronet/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# ExoPlayer Cronet extension #

## Description ##

The Cronet extension is an [HttpDataSource][] implementation using [Cronet][].

[HttpDataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer/upstream/HttpDataSource.html
[HttpDataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html
[Cronet]: https://chromium.googlesource.com/chromium/src/+/master/components/cronet?autodive=0%2F%2F

## Build instructions ##
Expand All @@ -22,12 +20,9 @@ and enable the extension:
1. Copy the content of the downloaded `libs` directory into the `jniLibs`
directory of this extension

* In your `settings.gradle` file, add the following line before the line that
applies `core_settings.gradle`:

```gradle
gradle.ext.exoplayerIncludeCronetExtension = true;
```
* In your `settings.gradle` file, add
`gradle.ext.exoplayerIncludeCronetExtension = true` before the line that
applies `core_settings.gradle`.

[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
[here]: https://console.cloud.google.com/storage/browser/chromium-cronet/android
Expand Down Expand Up @@ -56,3 +51,10 @@ new DefaultDataSourceFactory(
new CronetDataSourceFactory(...) /* baseDataSourceFactory argument */);
```
respectively.

## Links ##

* [Javadoc][]: Classes matching `com.google.android.exoplayer2.ext.cronet.*`
belong to this module.

[Javadoc]: https://google.github.io/ExoPlayer/doc/reference/index.html
58 changes: 49 additions & 9 deletions extensions/ffmpeg/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# ExoPlayer FFmpeg extension #

## Description ##

The FFmpeg extension is a [Renderer][] implementation that uses FFmpeg to decode
audio.

[Renderer]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/Renderer.html
The FFmpeg extension provides `FfmpegAudioRenderer`, which uses FFmpeg for
decoding and can render audio encoded in a variety of formats.

## Build instructions ##

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
native components as follows:
[top level README][]. The extension is not provided via JCenter (see [#2781][]
for more information).

In addition, it's necessary to build the extension's native components as
follows:

* Set the following environment variables:

Expand All @@ -34,7 +33,11 @@ NDK_PATH="<path to Android NDK>"
HOST_PLATFORM="linux-x86_64"
```

* Fetch and build FFmpeg. For example, to fetch and build for armeabi-v7a,
* Fetch and build FFmpeg. The configuration flags determine which formats will
be supported. See the [Supported formats][] page for more details of the
available flags.

For example, to fetch and build for armeabi-v7a,
arm64-v8a and x86 on Linux x86_64:

```
Expand Down Expand Up @@ -103,5 +106,42 @@ cd "${FFMPEG_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI="armeabi-v7a arm64-v8a x86" -j4
```

## Using the extension ##

Once you've followed the instructions above to check out, build and depend on
the extension, the next step is to tell ExoPlayer to use `FfmpegAudioRenderer`.
How you do this depends on which player API you're using:

* If you're passing a `DefaultRenderersFactory` to
`ExoPlayerFactory.newSimpleInstance`, you can enable using the extension by
setting the `extensionRendererMode` parameter of the `DefaultRenderersFactory`
constructor to `EXTENSION_RENDERER_MODE_ON`. This will use
`FfmpegAudioRenderer` for playback if `MediaCodecAudioRenderer` doesn't
support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to give
`FfmpegAudioRenderer` priority over `MediaCodecAudioRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add an `FfmpegAudioRenderer`
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
`Renderer` in the list that supports the input media format.
* If you've implemented your own `RenderersFactory`, return an
`FfmpegAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
first `Renderer` in the returned array that supports the input media format.
* If you're using `ExoPlayerFactory.newInstance`, pass an `FfmpegAudioRenderer`
in the array of `Renderer`s. ExoPlayer will use the first `Renderer` in the
list that supports the input media format.

Note: These instructions assume you're using `DefaultTrackSelector`. If you have
a custom track selector the choice of `Renderer` is up to your implementation,
so you need to make sure you are passing an `FfmpegAudioRenderer` to the player,
then implement your own logic to use the renderer for a given track.

[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
[#2781]: https://github.com/google/ExoPlayer/issues/2781
[Supported formats]: https://google.github.io/ExoPlayer/supported-formats.html#ffmpeg-extension

## Links ##

* [Javadoc][]: Classes matching `com.google.android.exoplayer2.ext.ffmpeg.*`
belong to this module.

[Javadoc]: https://google.github.io/ExoPlayer/doc/reference/index.html
Loading

0 comments on commit 125e6fe

Please sign in to comment.