4783 Commits

Author SHA1 Message Date
aquilescanta
35460dc735 Add santoni and mido to codecNeedsSetOutputSurfaceWorkaround
Issue:#4006

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189896023
2018-03-28 00:24:01 +01:00
eguven
522f8c8a99 Make demo app play content from download cache
It's inserted before HttpDataSource as read only.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189815245
2018-03-28 00:22:15 +01:00
eguven
764d18f68f Add ability to play filtered manifests in PlayerActivity
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189796293
2018-03-28 00:20:27 +01:00
cblay
dfa31f02e3 DashMediaSource: Do not use TIME_UNSET publishTime to check for stale dynamic manifest
Also convert left side from milliseconds to microseconds for comparison

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189784833
2018-03-28 00:19:07 +01:00
andrewlewis
c9d827fa2c Poll the audio timestamp more frequently at the start of playback
Add logic to poll AudioTimestamp at different rates depending on when
playback starts and how the audio timestamp advances.

This fixes a pause about 500 ms after starting playback that occurs on some
devices and also makes our polling interval match the recommendations of the
AudioTrack documentation.

Issue: #3830
Issue: #3841

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189765200
2018-03-28 00:16:26 +01:00
tonihei
95d591e0ce Handle default position in DeferredMediaPeriod.
When creating DeferredMediaPeriods, we don't know the actual timeline yet and
thus the default position is also unknown. We can still forward the correct
default position by forwarding it the deferred media period as soon as it
becomes known.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189763460
2018-03-28 00:15:01 +01:00
bachinger
6674f63b8b Omit fast forward and rewind actions when current window is not seekable
Issue: #4001

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189722812
2018-03-28 00:12:21 +01:00
andrewlewis
aad5927a2b Update audio renderer position before pausing
As part of pausing DefaultAudioSink, its position-related fields are reset. If
the audio timestamp API was in use, this results in falling back to the
getPlaybackHeadPosition API, which (on some devices) can lead to a jump in the
reported position.

Sample the position before pausing instead of after, to avoid this jump.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189713376
2018-03-28 00:11:01 +01:00
andrewlewis
99959d6130 Fix handling of getLatency throwing
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189582319
2018-03-28 00:08:17 +01:00
tonihei
e3a90a44b7 Support media source events for composite media sources.
This is achieved by automatically registering a listener for child sources in
compositions. The composite media source has the chance to correct the
reported window index and media period id in the MediaLoadData of the events.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189575414
2018-03-28 00:06:58 +01:00
tonihei
6b527da462 Used fixed time frame in clipping media period.
Currently, whenever the clipping is updated, we move the time frame of the
clipped period to start at 0. This causes problems when we are already playing
this period and the renderer position does no longer match the stream
positions.

This change keeps the time frame of the clipped media period as it is and
instead specifies the offset of the window in the period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189570277
2018-03-28 00:05:35 +01:00
eguven
371f3acea8 Prevent multiple instances of SimpleCache in the same folder
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189562865
2018-03-28 00:04:14 +01:00
andrewlewis
245c59cecc Factor out position tracking from DefaultAudioSink
DefaultAudioSink had a lot of code related to tracking the position of the
underlying AudioTrack, and working around issues with the position APIs.

Move this code to a separate class responsible for position tracking. This is in
preparation for improving the audio timestamp polling behavior.

This change is intended not to cause any behavior changes.

Issue: #3841

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189344743
2018-03-28 00:02:54 +01:00
aquilescanta
137d70b092 Clear fatal errors in Loader#startLoading
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189323050
2018-03-28 00:00:11 +01:00
tonihei
c7c9a1e9e4 Send media source events for fake media sources.
This allows to test sending events when using fake media sources.
The FakeMediaSource now simulates a manifest load when being prepared.
And the FakeMediaPeriod simulates a media load when being prepared.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189205285
2018-03-27 23:58:52 +01:00
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
Jianyong Xiao
75f8711bd9 code review comments 2018-03-23 01:55:17 -07:00
Jianyong Xiao
05d5096b3a Provide an option to skip file descriptor sync in CacheDataSink 2018-03-19 01:34:35 -07:00
ojw28
b6155d2e08
Merge pull request #3983 from google/dev-v2-r2.7.1
r2.7.1
2018-03-14 00:17:06 +00:00
Oliver Woodman
ff43df1e89 Remove versions from IMA demo manifest that are now specified via gradle 2018-03-13 23:48:55 +00:00
Oliver Woodman
bd71a60f48 Remove stray test 2018-03-13 23:44:52 +00:00
aquilescanta
5706105b7c 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:45:00 +00: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
olly
f9b70c2374 Bump version to 2.7.1 and update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188514063
2018-03-13 12:18:53 +00:00
olly
bdc5b5624d 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-13 12:17:00 +00:00
olly
29839ab6a6 Fix min api check in RobolectricUtil
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188716201
2018-03-13 11:54:12 +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