5465 Commits

Author SHA1 Message Date
andrewlewis
15d13bdccd Handle metadata failing to decode in MetadataRenderer
Issue: #5149
PiperOrigin-RevId: 223121651
2018-11-28 11:45:45 +00:00
olly
017923ed81 Fall back to TYPE_ROTATION_VECTOR if TYPE_GAME_ROTATION_VECTOR unavailable
Issue: #5119
PiperOrigin-RevId: 222978448
2018-11-27 19:50:45 +00:00
olly
38c53298b0 Strip private ID3 data from HLS sample formats
Issue: #5063
PiperOrigin-RevId: 222975020
2018-11-27 19:49:18 +00:00
olly
1e37d31867 Remove spurious VisibleForTesting annotation
It needs to have package visiblity, otherwise nothing can use it.

PiperOrigin-RevId: 222821546
2018-11-27 19:48:21 +00:00
tonihei
d3f4c18401 Provide Cronet request and response data for subclasses.
Subclasses may want to analyze, log and react to the Cronet-specific
connection data.

Issue:#5134
PiperOrigin-RevId: 222809441
2018-11-27 19:47:09 +00:00
olly
0bcce18976 Assume text tracks in protected SmoothStreaming are not protected
Issue: #4838
PiperOrigin-RevId: 222805051
2018-11-27 19:47:00 +00:00
olly
2cab83e6e4 Fix unnecessary media playlist requests when playing live streams
Issue: #5059
PiperOrigin-RevId: 222803511
2018-11-27 19:46:37 +00:00
olly
3a0b127074 Update content url for IMA demo app
The existing one seems to be dead, and isn't https.

PiperOrigin-RevId: 222795996
2018-11-27 19:46:31 +00:00
Oliver Woodman
9c821777a0 Noop fix to WebvttDecoder
We already have tests for comment blocks, and they already
pass because we discard the comment when we fail to parse it
as a cue. We should just skip it directly, however.
2018-11-27 19:46:25 +00:00
olly
327d23c711 Clarify contribution branch
PiperOrigin-RevId: 222632883
2018-11-27 19:46:19 +00:00
olly
07053aaa51 Add Lint.IfChange/ThenChange for repeat modes
PiperOrigin-RevId: 222630411
2018-11-27 19:46:12 +00:00
olly
2d808010ee Ensure changes are reflected into attrs
PiperOrigin-RevId: 222628386
2018-11-27 19:46:06 +00:00
BrainCrumbz
e99c904179 Merge #5126: fix(playlist): always call onCompletion when moving media sources
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/5126

Closes #5125
Merge 55a4c1e15de7f100f37e38119f1da360910fd1e3 into fe41f17c387b7c18a818c8cf2a1ebcdfbd36836a

PiperOrigin-RevId: 222612873
2018-11-27 19:46:00 +00:00
tonihei
3039c358cc Fix show_buffering attribute values.
The corresponding IntDef has changed without updating the attribute values.

Issue:#5139
PiperOrigin-RevId: 222598044
2018-11-27 19:45:49 +00:00
tonihei
0701fed708 Use overflow-save add operation for blacklisting duration.
This allows to specify open-ended blacklisting with Long.MAX_VALUE.

PiperOrigin-RevId: 222550939
2018-11-27 19:45:03 +00:00
Oliver Woodman
028bd9df8f Remove stray proguard files 2018-11-27 19:42:56 +00:00
olly
d075e4f91b Fix HLS ID3 sniffing
The input.getLength() check is invalid because the length may be
unknown (i.e. if the server doesn't include a Content-Length
response header when serving chunks).

Issue: #5063 (tangentially related only)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222406347
2018-11-27 19:42:49 +00:00
aquilescanta
473ed4cf69 Support removal of ranges from ShuffleOrders
This allows more efficient range removals and is consistent with addition,
which supports adding multiple elements in a single operation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222396310
2018-11-27 19:42:41 +00:00
olly
56b0294ba2 Support Opus and Flac in MP4/DASH
Issue: #4883

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222392621
2018-11-27 19:42:30 +00:00
olly
233ff0729d Add test that DefaultDataSource is able to build an RtmpDataSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222387374
2018-11-27 19:42:12 +00:00
andrewlewis
269615e62f Update IMA SDK and Play Services Ads versions
Since version 17.0 play-services-ads requires specifying AD_MANAGER_APP=true in
AndroidManifest.xml, so add this in the IMA extension's manifest. See also
https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222087771
2018-11-27 19:42:04 +00:00
tonihei
ec43ed7e59 Improve DefaultLoadControl.shouldContinueLoading for the minBuffer=maxBuffer case.
Currently no path may be chosen if
minBufferUs == maxBufferUs == bufferedDurationUs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221639199
2018-11-27 19:41:52 +00:00
tonihei
30941c41c3 Ensure DefaultLoadControl.Builder is single-use.
This is needed because the allocator can't be reused for example.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221638233
2018-11-27 19:41:45 +00:00
olly
c08edc5e0a Workaround for TS seeking
- Increase the search window size to fix TS seeking for problematic
  media we've had provided to us.
- As per my comments on the issue, we should look at doing more here
  to better fix the problem. This will solve the worst of the
  immediate problem, however.
- The memory usage is non-trivial, particularly with the increased
  search window size. I've made the allocations only live whilst
  determining duration and seeking to address this. I've done the same
  for PS just for consistency.

Issue: #5097

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221449988
2018-11-27 19:41:26 +00:00
olly
84fc24492f DASH: Fix detection of end of live events
The remaining work is to split Window.isDynamic so that it's
possible to represent a window that wont be appended to, but
may still be removed from.

Issue: #4780

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221439220
2018-11-27 19:40:58 +00:00
olly
177f3883e9 Noop cleanup of binary seeking / duration reading.
This is a precursor for fixing the ref'd issue. These classes are
well tested, so the tests passing should give you reasonable
confidence I didn't break anything :).

Issue: #5097

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221435824
2018-11-27 19:40:32 +00:00
olly
0311e153f3 Document need to call MediaSessionCompat.setActive
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221078075
2018-11-27 19:40:23 +00:00
aquilescanta
f7ed39ee17 Add constructor to DefaultShuffleOrder to support sideloaded shuffle orders
Issue: #4915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221075615
2018-11-27 19:39:52 +00:00
olly
2426a047f1 Make support-media-compat an API dependency
The extension cannot be used without also using support-media-compat
(e.g. to instantiate a MediaSessionCompat). So it may as well be an
API dependency.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221072128
2018-11-27 19:39:41 +00:00
andrewlewis
d9462b9d2b Include channel count in capabilities check
Issue: #4690

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220640737
2018-11-27 19:34:04 +00:00
ojw28
b5beb32618
Merge pull request #5037 from google/dev-v2-r2.9.1
r2.9.1
2018-11-08 16:48:20 +00:00
Oliver Woodman
a02a75ba57 Fix audio focus 2018-11-07 19:24:02 +00:00
olly
f5c3b30290 Fix BasePlayer.next()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220470213
2018-11-07 18:05:32 +00:00
olly
6bc0408222 Make BasePlayer.get[Next/Previous]WindowIndex more useful
When in REPEAT_MODE_ONE, it's unlikely apps want next/previous methods
on the player to keep them in the same window. Music apps in particular
tend to implement next/previous functionality as though repeat mode were
off when in this mode (i.e. current song loops forever during playback,
but next/previous navigation still navigates to next/previous items).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220469655
2018-11-07 18:05:25 +00:00
olly
fd98d70a11 Make TimelineQueueNavigator shuffle aware
Issue: #5065

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220468285
2018-11-07 18:05:13 +00:00
olly
b8b8844083 Add missing update on repeat toggle mode change
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220461315
2018-11-07 18:04:36 +00:00
borrelli
ac0b11edc0 Fix for #5055 - Cannot disable audio focus after enabled.
This fixes an issue where disabling audio focus handling
while audio focus is held would not release audio focus.

A new test was added for this situation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220316866
2018-11-07 18:03:46 +00:00
andrewlewis
54075ed166 Remove executable bit from some resources
Copybara propagates this bit on the files, so removing it avoids some
unnecessary changes in the first migrated commit.

Also losslessly optimize two PNG files.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220268951
2018-11-07 17:59:50 +00:00
andrewlewis
3e35b6d016 Work around non-empty EoS buffers with timestamp 0
Issue: #5045

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220237752
2018-11-06 11:10:40 +00:00
andrewlewis
e347239ac5 Document error case for generateAudioSessionIdV21
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220132865
2018-11-06 11:09:20 +00:00
olly
af2b3f578f Tweak dev guide / readme
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220059244
2018-11-06 11:09:09 +00:00
aquilescanta
8f57d85881 Add support for .cmf* extension in DefaultHlsExtractorFactory
This makes extractor selection a bit more efficient for some CMAF files.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219795105
2018-11-02 16:05:07 +00:00
aquilescanta
6d84b2a496 Update the DefaultExtractorInput's peek buffer length on each write
This prevents leaving an inconsistent state after a EOF exception.

Issue:#5039

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219785275
2018-11-02 16:04:59 +00:00
andrewlewis
1866e6bfba Double the buffer duration for AC3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219765107
2018-11-02 16:04:46 +00:00
Oliver Woodman
57042adec7 Remove methods now in BasePlayer 2018-11-01 11:55:40 +00:00
aquilescanta
10511e56cf Add constructor for adding payload reader factory flags
Issue:#4861

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214772527
2018-11-01 11:33:12 +00:00
olly
f9a805070a Bump version to 2.9.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219609471
2018-11-01 11:29:52 +00:00
andrewlewis
7876999ae7 Fix extended service number calculation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219597894
2018-11-01 11:24:24 +00:00
tonihei
e4c20aa3de Add convenience methods player.next() and player.previous()
This simplifies code skipping items in a playlist programatically.

Issue:#4863

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214580742
2018-11-01 09:43:12 +00:00
tonihei
bbd82cf5da Add BasePlayer to avoid code duplication for common convenience methods.
A lot of methods just forward to other methods and there is no conceivable
way a player should implement it another way. Moving these methods to a
base player class allows to remove duplicated code across our player
implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215374192
2018-11-01 09:41:38 +00:00