3409 Commits

Author SHA1 Message Date
Oliver Woodman
74b8c45e6d Minor cleanup to AspectRatioFrameLayout 2017-09-04 11:34:57 +01:00
ojw28
1a6a6c901f Merge pull request #3223 from Shyri/vp09-support
Add support for new codecs parameter string
2017-09-04 10:33:02 +01:00
ojw28
21363d2f8e Merge pull request #3187 from stellabei/stellabei/aspect-ratio-crop
Support zoom mode for AspectRatioFrameLayout
2017-09-04 10:31:21 +01:00
olly
ba0bd72919 Fix typo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167474040
2017-09-04 10:28:54 +01:00
anjalibh
7804c2b079 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
2017-09-04 10:27:38 +01:00
olly
ca2bfbc56e DashManifestParser: Move schemeType up to DrmInitData
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167171407
2017-09-04 10:23:33 +01:00
andrewlewis
daafbb1f1c Add missing Robolectric test path to codebase
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167151714
2017-09-04 10:22:17 +01:00
andrewlewis
f15ce81c47 Move some unit tests to use Robolectric
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167148146
2017-09-04 10:20:59 +01:00
olly
6bd0ba887c 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
2017-08-31 16:33:43 +01:00
andrewlewis
0b78837f35 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: #3216

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167016672
2017-08-31 16:32:28 +01:00
bachinger
84c13ccbf3 Support setRepeatMode (and move shuffle action to PlaybackController)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167013507
2017-08-31 16:31:10 +01:00
andrewlewis
e80a93d799 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
2017-08-31 16:29:44 +01:00
olly
049d41db2a Add license notes for extensions with non-Google dependencies
Issue: #3197

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166988657
2017-08-31 16:28:22 +01:00
Shyri Villar
49c2926e45 Add support for new codecs parameter string 2017-08-30 16:25:50 +02:00
olly
6bf0b7f3de Fix moe config II
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166916769
2017-08-29 23:56:36 +01:00
olly
b0df6dce98 Fix moe config
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166914821
2017-08-29 23:55:19 +01:00
olly
5bed2bf503 Don't copy primary-track format to non-primary tracks
This time plumbing the track type in from the other side.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166898172
2017-08-29 23:17:16 +01:00
olly
d9cd13ce74 Automated rollback of changelist 166843123.
*** Reason for rollback ***

Doesn't work because trackOutputProvider can be null when extracting init data.

*** Original change description ***

Don't copy primary-track format to non-primary tracks

Copying non-primary-track formats to non-primary tracks
looks non-trivial (I tried; went down a dead-end), so
leaving that for now.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166883654
2017-08-29 23:14:33 +01:00
olly
55e928f75a Make LeanbackPlayerAdapter use a ControlDispatcher + Misc cleanup
1. Make LeanbackPlayerAdapter use a ControlDispatcher. This
   allows apps to suppress control events in some circumstances,
   and is in-line with our mobile controls.
2. Misc simplifications and cleanup to LeanbackPlayerAdapter.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166852816
2017-08-29 23:13:13 +01:00
olly
44dc3c3ab3 Make all renderers DRM aware
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166852758
2017-08-29 23:11:55 +01:00
olly
b2c245281a Parse SchemeData from urn:mpeg:dash:mp4protection:2011 element
Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166849631
2017-08-29 23:10:36 +01:00
aquilescanta
aafdd2267a Add media queue support to CastPlayer
Also workaround the non-repeatable queue and fix other minor issues.

Issue:#2283

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166848894
2017-08-29 23:09:03 +01:00
olly
f44e30c754 Fix mapping CLEARKEY_UUID to COMMON_PSSH_UUID
This mapping when we call into platform components also needs
to be applied when creating the MediaCrypto instance. The fix
is to stop propagating the UUID through all the createMediaCrypto
methods. This is unnecessary, since the eventual target already
knows its own UUID!

Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166843372
2017-08-29 23:07:39 +01:00
olly
3e76227006 Don't copy primary-track format to non-primary tracks
Copying non-primary-track formats to non-primary tracks
looks non-trivial (I tried; went down a dead-end), so
leaving that for now.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166843123
2017-08-29 23:06:16 +01:00
andrewlewis
ba6d208fe9 Use Math.abs in Sonic.java
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166820970
2017-08-29 23:04:52 +01:00
eguven
cc58b515b7 Make Downloaders open source
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166486294
2017-08-29 23:03:08 +01:00
tonihei
30b31b5679 Support empty concatenations and empty timelines in concatenations.
Both cases were not supported so far. Added tests which all failed in the
previous code version and adapted the concatenated media sources to cope with
empty timelines and empty concatenations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166480344
2017-08-29 23:01:41 +01:00
bachinger
01f4819844 Introduce MediaSessionConnector.CommandReceiver interface and add TimelineQueueEditor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166475351
2017-08-29 23:00:03 +01:00
tonihei
1b9c904dba Add UI for shuffle mode.
This includes an option to show and hide the shuffle mode button. When
pressing the button, the shuffle mode of the player is toggled.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166455759
2017-08-29 22:58:42 +01:00
olly
6907ffb285 Remove unnecessary view casts
findViewById is now defined using generics, which allows
the types to be inferred.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166355555
2017-08-29 22:57:17 +01:00
olly
6e03dcdfa1 Add LocalMediaDrmCallback. Useful for providing local keys.
Issue: #3178

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166330215
2017-08-29 22:55:51 +01:00
olly
57bad31e4c Update documentation with new demo app location
Plus a few misc doc fixes / adjustments

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166323135
2017-08-29 22:54:26 +01:00
tonihei
aa712114c6 Force stop hosted test after timeout.
When hosted tests run into a timeout, the outer test method stops.
However, the hosted test itself may continue running and needs to be
forced-stopped to ensure it does not block any resources needed by
subsequent test methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166208204
2017-08-29 22:52:10 +01:00
tonihei
eeebb3968b Implement shuffle mode logic in ExoPlayerImplInternal.
This is mostly connecting the already stored shuffleMode with the timeline queries
for the playback order.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166199330
2017-08-29 22:50:49 +01:00
bachinger
1305b1155b Migrate MediaSessionConnector to API 26 for shuffle mode.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166198698
2017-08-29 22:49:28 +01:00
tonihei
f7eba77ee0 Add shuffle support to dynamic concatenating media source.
The media source is initialized with a DefaultShuffleOrder which can be changed at
any time. Whenever the list of media source is changed, the shuffle order is adapted
accordingly (either on the app thread if the player is not prepared yet, or on the
player thread). The shuffle order is then used to construct the timeline.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166198488
2017-08-29 22:48:10 +01:00
tonihei
e15633e906 Add shuffle support to ConcatenatingMediaSource.
The media source is initialized with a DefaultShuffleOrder which can be changed at
any time. This shuffle order is then used within the corresponding timeline.

The isRepeatOneAtomic flag is extended to also suppress shuffling (now called
isAtomic only).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166197184
2017-08-29 22:46:54 +01:00
andrewlewis
8115e11489 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
2017-08-29 22:45:28 +01:00
tonihei
b27c25e880 Add fake shuffle order.
This just implements a reverse order which is different from the original order but
still deterministic for simplified testing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166194311
2017-08-29 22:44:13 +01:00
tonihei
9fd19d0e7c Add shuffle logic to concatenated timelines.
The implementation in the abstract base class takes care to forward the queries
to the correct methods given the shuffle mode and a given shuffle order.

All concatenated timeline implementations use an unshuffled order so far. The
handling of the shuffle orders will follow in other changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191165
2017-08-29 22:42:56 +01:00
tonihei
4883a9ba9a Add shuffle support to infinitely looping timeline.
In addition, let unit test assert window indices for both shuffle modes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191069
2017-08-29 22:41:39 +01:00
tonihei
bd81181892 Add shortcut methods to query next or previous window index.
This functionality is most likely needed by UI modules which currently need
to obtain the timeline, the current repeat and shuffle modes and are only then
able to query the next/previous window index using this information.

Adding these methods simplifies these cumbersome requests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181202
2017-08-29 22:40:13 +01:00
tonihei
2c8d5f846e Pass shuffle mode to timeline assertion helper methods.
This allows to test the expected behaviour of timeline with different shuffle modes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181091
2017-08-29 22:38:50 +01:00
tonihei
10f1bd7396 Add shuffle mode parameter to Timeline interface methods.
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.

None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229
2017-08-29 22:37:27 +01:00
Bei Yi
b084821678 Support zoom mode for AspectRatioFrameLayout 2017-08-24 16:13:44 -07:00
Bei Yi
50c485652c Support aspect ratio fill mode for AspectRatioFrameLayout 2017-08-24 14:31:33 -07:00
tonihei
5214bfa7b1 Update ExoPlayerImplInternal with shuffle mode changes.
The shuffle mode is saved using a message on the playback thread.
After setting the shuffle mode, the same media period holder verification
as for repeat mode changes gets executed.

Note: the shuffle mode is not used yet to change the playback order.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166060231
2017-08-22 16:27:18 +01:00
olly
f0bd40a5b6 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
2017-08-22 16:26:03 +01:00
tonihei
6a8c99d037 Support shuffle mode in MediaSessionConnector.
Changes to the player's shuffle mode are forwarded to the media session.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166057425
2017-08-22 16:24:45 +01:00
tonihei
b9a6a40539 Add listener callback for shuffle mode changes.
The listener implementations do not do anything yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166056933
2017-08-22 16:23:27 +01:00