Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google release v2 merget to release v2 #2

Merged
merged 61 commits into from
Sep 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
74e8acf
Minimal change to expose segment indices in DefaultDashChunkSource
ojw28 Aug 8, 2017
bc08295
Clean up terminology for MediaSession extension
ojw28 Aug 9, 2017
154f17e
Fix minor Javadoc error
ojw28 Aug 9, 2017
5fedbf7
Document usage of the RTMP extension
ojw28 Aug 9, 2017
cf6c247
set mediaSession flags properly and keep queue in sync when timeline …
marcbaechinger Aug 9, 2017
99f603c
Support multiple video/text/metadata outputs
ojw28 Aug 10, 2017
1f20e6f
Fix maskingX variables when timeline becomes empty
ojw28 Aug 10, 2017
b9ead4b
Restrict usage of secure DummySurface for all Samsung devices.
ojw28 Aug 11, 2017
44fa0b4
Support H262 video in MP4
Aug 17, 2017
85d6c0f
Fix possible subrip timing line NPE
dbrain Aug 17, 2017
7bde58a
Support crop mode for AspectRatioFrameLayout
stellabei Aug 17, 2017
e198667
Add flag to CachedContentIndex to disable encryption. This allows th…
Aug 14, 2017
a2a2acf
Disable secure dummy surface on all Samsung N devices
ojw28 Aug 15, 2017
04131a1
Update instructions to include Google Maven repository
ojw28 Aug 15, 2017
0e16c43
Destroy GL context when releasing dummy surface
ojw28 Aug 15, 2017
94a5e9b
Restore the interrupted flag after blocking operations
andrewlewis Aug 16, 2017
7e9b1fc
Work around issue with Xiaomi JB devices
ojw28 Aug 17, 2017
38bc289
Improve FORMAT_UNSUPPORTED_DRM related documentation and logging
AquilesCanta Aug 17, 2017
d824aa9
Improve MediaSource/MediaPeriod documentation
ojw28 Aug 17, 2017
51dac58
expose setPropertyByteArray, setPropertyString
dulmandakh Aug 9, 2017
47e3b4d
Minor style tweaks
ojw28 Aug 17, 2017
4c51d38
Allow the app to specify extra ad markers
andrewlewis Aug 21, 2017
351b8a6
Remove isFirstWindow/isLastWindow from Timeline.
tonihei Aug 21, 2017
85bc8a0
Fix broken link + minor doc tweak
ojw28 Aug 21, 2017
cc5cfd4
Handle size==0 in MP4 atoms
ojw28 Aug 21, 2017
8524fb3
Use flavorDimensions for external demo app
ojw28 Aug 22, 2017
9aa4aa8
Support aspect ratio fill mode for AspectRatioFrameLayout
stellabei Aug 24, 2017
b80e3af
Support zoom mode for AspectRatioFrameLayout
stellabei Aug 24, 2017
bbb0308
Allow subclasses to customize the MediaFormat
andrewlewis Aug 23, 2017
64b1566
Use Math.abs in Sonic.java
andrewlewis Aug 29, 2017
3137fcd
Add support for new codecs parameter string
Shyri Aug 30, 2017
219ad8a
#3215 Additional secure DummySurface device exclusions
dbrain Aug 31, 2017
e70df7c
Use UTF-8 everywhere
andrewlewis Aug 30, 2017
2d4efff
Fix ContentDataSource bytesRemaining calculation
andrewlewis Aug 30, 2017
d942775
Allow more aggressive switching for HLS with independent segments
ojw28 Aug 31, 2017
acd16d6
HDR 10 bits: Use a separate sampler for U and V dithering.
Sep 2, 2017
5cb78fa
Fix typo
ojw28 Sep 4, 2017
92185aa
Minor cleanup to AspectRatioFrameLayout
ojw28 Sep 4, 2017
65b14ba
Update moe eqiuvalence
ojw28 Sep 4, 2017
a73601f
Allow EXIF tracks to be exposed
andrewlewis Sep 4, 2017
3d38e62
Adding missing license header in IMA build.gradle
andrewlewis Sep 4, 2017
5ceccac
Additional secure DummySurface device exclusions
ojw28 Sep 4, 2017
61ee1f6
Be robust against unexpected EOS in WebvttCueParser
ojw28 Sep 4, 2017
8676c4a
Rewrite logic for enabling secure DummySurface
ojw28 Sep 4, 2017
2853bf8
Upgrade gradle plugin / wrapper
ojw28 Sep 5, 2017
d187d29
Don't use MediaCodec.setOutputSurface on Nexus 7 with qcom decoder
ojw28 Sep 5, 2017
8719d41
Fix position reporting during ads when period has non-zero window off…
ojw28 Sep 6, 2017
6139501
Workaround for SurfaceView not being hidden properly
ojw28 Sep 6, 2017
cdcdea2
DecryptionException cleanup + add missing header
ojw28 Sep 6, 2017
ab94bd8
Pick up rtmpClient fix
ojw28 Sep 6, 2017
09a8c7c
Enable rtmp in external demo app with extensions
ojw28 Sep 8, 2017
a5302be
Destroy EGLSurface during DummySurface cleanup
ojw28 Sep 8, 2017
24b4cb8
Fix attr inheritance in SimpleExoPlayerView
ojw28 Sep 5, 2017
4c1fd23
Add possibility of forcing a specific license URL in HttpMediaDrmCall…
ojw28 Aug 11, 2017
2d2062b
Fix build for release
Sep 9, 2017
9b18130
Bump to 2.5.2
ojw28 Sep 10, 2017
b174bcc
Update extension README with usage instructions
andrewlewis Aug 17, 2017
4ce862a
Tweak and add READMEs + remove refs to V1
ojw28 Aug 17, 2017
2fb09db
Merge pull request #3253 from google/dev-v2-r2.5.2
ojw28 Sep 10, 2017
9a02667
Update README.md
ojw28 Sep 10, 2017
a64f8a9
Merge branch 'release-v2' of https://github.com/google/ExoPlayer into…
hishamMuneer Sep 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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