4443 Commits

Author SHA1 Message Date
andrewlewis
bb72d9eb6a Upgrade bintray
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189188071
2018-03-27 23:57:29 +01:00
eguven
d9f2989c9e Add getContentMetadata and applyContentMetadataMutations to Cache interface
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189186679
2018-03-27 23:56:08 +01:00
andrewlewis
234d611175 Automated g4 rollback of changelist 189153913.
*** Reason for rollback ***

This is breaking gradle sync with an error "Error:Cannot create variant 'android-lint' after configuration ':exo-library-core:debugRuntimeElements' has been resolved".

*** Original change description ***

Upgrade bintray-release and gradle versions

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189171139
2018-03-27 23:54:45 +01:00
eguven
bb71b050c9 Add getContentMetadata and applyContentMetadataMutations to SimpleCache
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189169899
2018-03-27 23:53:23 +01:00
eguven
10a48e778e Make CachedContent serialize whole metadata
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189166039
2018-03-27 23:51:56 +01:00
hoangtc
42d7a319cd Match codecs starting with "mp4a" to different Audio MimeTypes
Currently, we are treating all codecs starting with "mp4a" as AAC. However,
some codec strings starting with "mp4a" are not AAC format, as should be
treated differently.

GitHub: #3779

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189163517
2018-03-27 23:50:31 +01:00
andrewlewis
db0d656932 Consolidate position-related error handling in DefaultAudioSink
This is a step towards factoring out position tracking functionality.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189155624
2018-03-27 23:49:03 +01:00
olly
405d39b518 Upgrade bintray-release and gradle versions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189153913
2018-03-27 23:47:32 +01:00
andrewlewis
e6ce6764d7 Clean up DefaultAudioSink
This is a first step towards factoring out position tracking functionality.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189027731
2018-03-27 23:46:04 +01:00
olly
0b182d1849 Remove versions from IMA demo manifest that are now specified via gradle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189000217
2018-03-27 23:44:38 +01:00
pallavipowale
8d6832e8b3 When CacheDataSource ignores cache, report to QoE.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188902403
2018-03-27 23:43:17 +01:00
eguven
e565a46a7d Add DefaultContentMetadata serialization and deserialization
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188889091
2018-03-27 23:40:25 +01:00
aquilescanta
18b1ec7a2f Recreate the cast media queue whenever the timeline is cleared
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188871914
2018-03-13 15:42:24 +00:00
andrewlewis
07f898d441 Use @IntDef for some more int-based enumerations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188853170
2018-03-13 15:41:06 +00:00
tonihei
4f56636328 Add window index and media period id to media source event listener events.
This allows to distinguish between media source events of multi-window and
multi-period media sources. In this change, only media sources currently reporting
events are changed. Proper support in composite sources will be added in a later
change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188847366
2018-03-13 15:39:25 +00:00
eguven
00a7306fd8 Make CachedContent store content length in ContentMetadata
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188742379
2018-03-13 15:37:45 +00:00
tonihei
c38e7b1aeb Simplify list of pending deferred media periods in ConcatenatingMediaSource.
This change also simplifies reporting the right media source events in a
future change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188718504
2018-03-12 15:28:03 +00:00
olly
78e6979725 Fix min api check in RobolectricUtil
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188716201
2018-03-12 15:26:38 +00:00
olly
9c10c2d2a6 Bump version to 2.7.1 and update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188514063
2018-03-12 15:22:31 +00:00
olly
0e756b0e71 Centralize version and target sdk constants
We had these specified directly in AndroidManifest.xml due to
our internal build setup. This change makes our internal build
re-write AndroidManifest.xml to dynamically insert the required
values, meaning they no longer need specifying in each manifest.

Bonus 1: Internally built demo apps now include the CL number at
which they're built in the version name :).

Bonus 2: Removes lint warning that complains min/target SDK
values in the manifest are redundant.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188489115
2018-03-12 15:20:51 +00:00
eguven
e13789bfcc Hide internal DownloadManager states
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188481259
2018-03-12 15:19:16 +00:00
andrewlewis
a58bffbe52 Fix clipping to end of source
Issue: #3966

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188465096
2018-03-12 15:17:09 +00:00
tonihei
8f952162ff Allow multiple media source event listeners.
This is achieved by moving the listener registration and the creation of the
event dispatcher into BaseMediaSource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188461932
2018-03-12 15:15:34 +00:00
eguven
ebfd9d0535 Convert AbstractContentMetadata to DefaultContentMetadata
As it turns out there isn't much gain by subclassing
AbstractContentMetadata. Moved abstract onChange method to a listener
interface.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188353673
2018-03-12 15:13:42 +00:00
bachinger
afd11de57d add a PlayerNotificationManager to post media style notifications.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188352116
2018-03-12 15:12:09 +00:00
tonihei
a526d3fafd Keep window sequence number of playing period if queue is cleared.
This allows to keep the same window sequence number if playback fails and
is then retried without resetting the position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188339509
2018-03-12 15:10:33 +00:00
tonihei
2a737eecc1 Update default max buffer in DefaultLoadControl.
The value is increased to 50 seconds. With that the player can better handle
short network problems. This does NOT increase the maximum memory used as we
still apply the seperate DEFAULT_TARGET_BUFFER_BYTES.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188335603
2018-03-12 15:08:57 +00:00
eguven
2675d03b30 Fix typo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188327736
2018-03-12 15:07:22 +00:00
andrewlewis
81417e1093 Fix workaround for stale passthrough AudioTrack position
When creating a new AC-3 passthrough AudioTrack the position
may advance from an old AudioTrack's position. The workaround
checked for the playback head position returning to zero, but
a subsequent change meant that we'd always start writing data
to the new track immediately (rather than waiting for its
position to 'stabilize' at zero).

Fix the issue by using the AudioTrack position directly. (Nb.
this doesn't handle the case of the stale position before
unwrapping being zero, but it is very unlikely to occur.)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188319795
2018-03-12 15:05:40 +00:00
eguven
5f576819d7 Add test for DefaultLoadControl.shouldContinueLoading
Also simplified shouldContinueLoading condition code and added a builder for DefaultLoadControl.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188306213
2018-03-12 15:04:02 +00:00
andrewlewis
4fa383c026 Work around stalled AudioTrack up to API 28
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188173078
2018-03-07 18:01:31 +00:00
tonihei
b37773c5d6 Keep ExtractorMediaSource duration for repreparation.
This allows to know the duration immediately and fixes the temporary unknown
duration in the UI when repreparing the same extractor media source.

The isSeekable property is still reset to false as we can't actually seek
until the seek map has been reloaded.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188145860
2018-03-07 15:34:05 +00:00
andrewlewis
e9f36f06ec Force rendering a frame every 100 ms
Also remove logic for tracking the next output buffer in LibvpxVideoRenderer, as
this allowed many consecutive frames to be rendered that were actually late
after dropping to keyframe. It looks better to show frames at a consistent
100 ms rate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188144739
2018-03-07 15:32:35 +00:00
zhihuichen
ae82eb7590 Create a new package to fork exoplayer v2 DefaultDrmSessionManager and
DefaultDrmSession

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188079887
2018-03-07 15:30:57 +00:00
bachinger
ae421bb50c Add separate interface RatingCallback to handle user ratings.
To support Google Assistant media apps need to support the action
ACTION_SET_RATING. Before this change developers have to use a QueueEditor for
this which does not have any other mandatory actions required for Assistant.
With this change developers can implement the rating action with the
PlaybackPreparer which they need to implement anyway to support Assistant.

https://developer.android.com/guide/topics/media-apps/interacting-with-assistant.html#transport_controls

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188056722
2018-03-07 15:29:17 +00:00
olly
b7c9912a3d Make TrackGroup and TrackGroupArray parcelable
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188047131
2018-03-07 15:27:45 +00:00
eguven
f81dc44112 Add ContentMetadata and AbstractContentMetadata
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188041418
2018-03-07 15:26:08 +00:00
olly
73048f18c1 Remove "r" from instructions for extension modules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188038757
2018-03-07 15:24:33 +00:00
tonihei
82fc5730e7 Fix divergence of timeline between ExoPlayerImpl and ExoPlayerImplInternal.
The playback state in ExoPlayerImpl and ExoPlayerImplInternal is usually kept
in sync. Only the timeline was so far not updated in the same way with the
internal player using a null timeline while ExoPlayerImpl keeps the previous
timeline.

This change removes the need to keep a null timeline which allows to update
the internal timeline in the same way as the external one. This fixes problems
when retrying a failed playback multiple times.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188034988
2018-03-07 15:22:58 +00:00
tonihei
4e69f71e52 Fix wrong start position in resetInternal.
The start position was set to the old start position instead of the current
playback position. We need to set the start position to the current playback
position to ensure a repreperation with the same media starts from the last
playback position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188025439
2018-03-07 15:21:16 +00:00
olly
b40e5d8c0f Derive duration from sample table if missing from track header
Issue: #3926

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188020756
2018-03-07 15:19:38 +00:00
tonihei
2c671711f4 Ensure child source ids are kept in ConcatenatingMediaSource.
Previously, child source ids were reassigned when the media source is reused.
Now the creation of the ids moved to outer level to stay in sync with the list
of child media sources.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188014739
2018-03-07 15:18:02 +00:00
jschlag
cc48b5568c handle errors from vpx_codec_control_ calls in vpx_jni
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187872692
2018-03-07 15:16:28 +00:00
olly
8c24184f8b Propagate failures handling messages on the playback thread
This restores functionality that was lost when we added
support for general timed message delivery.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187866807
2018-03-07 15:14:22 +00:00
tonihei
c0c11af29f Reuse media sources in demo apps.
Especially the cast demo app benefits from this feature as it can keep its
ConcatenatingMediaSource all the time without having to repopulate it
when switching players.

Issue:#3498

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187866048
2018-03-07 15:12:50 +00:00
tonihei
6e5ae87cae Remove initial bitrate estimate from AdaptiveTrackSelection.
This value can now be set in the DefaultBandwidthMeter instead. As a result
NO_VALUE can be removed from BandwidthMeter as we now always provide an
estimate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187865341
2018-03-07 15:11:13 +00:00
tonihei
c3d6731188 Add clear method to ConcatenatingMediaSource.
This simplifies clearing a playlist without having to call removeMediaSource
repeatedly. It will also update the timeline only once.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187863857
2018-03-07 15:09:38 +00:00
tonihei
3eaab9e2ab Group arguments in MediaSourceEventListener.
There is a large number of repeated arguments in the callback methods of
MediaSourceEventListener. Grouping them into load related data and media
related data allows to significantly reduce the amount of boiler plate code
and also simplifies future extensions of either set of data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187857252
2018-03-07 15:07:59 +00:00
tonihei
5fb6fc1226 Allow to specify initial bitrate estimate in DefaultBandwidthMeter.
This value is logically part of the bandwidth estimation and will eventually be
moved there from the adaptive track selection.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187597038
2018-03-07 15:06:22 +00:00
andrewlewis
4373e63fac Make the period and initial window positions match for all HLS streams
Before this change, HlsMediaSource timelines had a period starting at the epoch.
For VOD streams the window position in the period was the program date time.

This change makes period and initial window positions match. For live streams
the window position advances as segments are removed, so its position in the
period is the difference between the initial program date time and the program
date time of the latest playlist.

This also makes it possible to insert ads in VOD HLS content with program date
time, as the period and window are now aligned.

Issue: #3865

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187590948
2018-03-02 09:30:40 +00:00