4978 Commits

Author SHA1 Message Date
sofijajvc
62618f24ec Remove copybara exclusions and add extension to the demo app
Issue: #3353
PiperOrigin-RevId: 273949689
2019-10-10 14:46:16 +01:00
ibaker
60566721d4 Enable ID3-in-EMSG for HLS streams
This supports both chunkless & traditional preparation

PiperOrigin-RevId: 273938344
2019-10-10 14:46:07 +01:00
sofijajvc
5cf82a5079 Support GL rendering with SimpleExoPlayer and PlayerView
PiperOrigin-RevId: 273760294
2019-10-10 14:45:14 +01:00
olly
3d0886f458 Fix bogus reporting of audio focus loss
Playback cannot be suppressed if playWhenReady=false

PiperOrigin-RevId: 273726084
2019-10-10 14:44:39 +01:00
Oliver Woodman
4026c8a01e Merge pull request #6502 from caiiiyua:bug_default_dash_chunk_source_wrong_segmentnumshift
PiperOrigin-RevId: 273549830
2019-10-08 20:55:25 +01:00
andrewlewis
fab2a0d55e Fix VideoDecoderOutputBuffer supplemental data
The limit of this.supplementalData was not reset.

PiperOrigin-RevId: 273515718
2019-10-08 20:55:15 +01:00
Cai Yuanqing
d2b221b95b Issue: #6501 Wrong segmentNumShift was calculated in copyWithNewRepresentation
When newIndex overlaps oldIndex with newstarttime < oldstarttime, according to the segNum of endtime
in newIndex and oldIndexLastSegnum to calculate the segmentNumShift.
2019-10-08 09:07:27 +13:00
olly
b052ea9bed Parse Label elements for adaptation sets
Issue: #6297
PiperOrigin-RevId: 273297284
2019-10-07 16:32:50 +01:00
samrobinson
a8adb97b5d Move AudioFocusManager to different package & made default visibility.
PiperOrigin-RevId: 273263822
2019-10-07 16:32:03 +01:00
olly
c269890259 Define default colors as constants
It's confusing that app:played_color also modifies the colors
that derive from it, but the corresponding setter does not. It
seems generally clearer just to define constants.

PiperOrigin-RevId: 273249557
2019-10-07 16:31:55 +01:00
sofijajvc
fa06f0b4cc Fix video decoder GL rendering
Calculate stride and width ratio per each plane.

PiperOrigin-RevId: 272916423
2019-10-07 16:31:47 +01:00
sofijajvc
8f3a363dd2 Add OpenGL support to av1 extension: Libgav1VideoRenderer
Move reusable code from LibvpxVideoRenderer to SimpleDecoderVideoRenderer.
Pass outputBuffer to renderOutputBuffer method instead of keeping the reference in the renderer.

PiperOrigin-RevId: 272899549
2019-10-07 16:31:39 +01:00
samrobinson
27b90fba0e Make WakeLockManager package private.
PiperOrigin-RevId: 272888174
2019-10-07 16:31:31 +01:00
olly
efe6e6408a Cleanup: Only clamp seek positions for FFWD/RWND
It's confusing that seekTo(player, windowIndex, positionMs) does
clamping, because it only makes sense if windowIndex is the current
window.

Note: This doesn't actually fix anything (other than code clarity).
In cases where we were passing other windowIndices, we always
passed 0 as the position and so the clamping logic wouldn't have
had any effect.
PiperOrigin-RevId: 272857104
2019-10-04 13:33:09 +01:00
tonihei
4297800f38 Update logic to set isLoading.
We currently set it to shouldContinueLoading, which isn't correct if
shouldContinueLoading is set to false and we still have an ongoing load.

Change it to also be true if the media period is still loading.

PiperOrigin-RevId: 272823473
2019-10-04 13:32:34 +01:00
aquilescanta
69cf7d130e Fix acquisition of placeholder sessions
Issue:#4867
PiperOrigin-RevId: 272698404
2019-10-04 13:32:27 +01:00
andrewlewis
3d5ab29da7 Add @RequiresApi(18) for FrameworkMediaDrm
Without this Android Studio shows a warning for newInstance.

PiperOrigin-RevId: 272660373
2019-10-04 13:32:12 +01:00
andrewlewis
957387855e Add missing player null check
PiperOrigin-RevId: 272654378
2019-10-04 13:32:04 +01:00
aquilescanta
433526e034 Deprecate DefaultDrmSessionManager factory methods and migrate main demo app
PiperOrigin-RevId: 272643202
2019-10-04 13:31:56 +01:00
sofijajvc
737b5cd82d Fix GL error logging
Log only if an error occured.

PiperOrigin-RevId: 272618322
2019-10-04 13:31:48 +01:00
olly
3c235dfc1f Make factories return specific types
PiperOrigin-RevId: 272614917
2019-10-04 13:31:40 +01:00
olly
e377e13d50 Clean up DashManifestParserTest
Also improve some tests by asserting the parser is left in
the correct position (assertNextTag).

PiperOrigin-RevId: 272614768
2019-10-04 13:31:33 +01:00
olly
fbb4715646 Minor upstream cleanup
PiperOrigin-RevId: 272614610
2019-10-04 13:31:25 +01:00
Cai Yuanqing
9ec94a4bdc Check the new index contains the old index based on stat time instead of segNum 2019-10-04 13:55:25 +13:00
tonihei
4f640bc62e Add SequencableLoader.isLoading
This method allows the player to figure out whether we still have an ongoing
load even if LoadControl.shouldContinueLoading returns false.

PiperOrigin-RevId: 272445577
2019-10-02 21:30:07 +01:00
tonihei
bc9a0860e0 Clear renderedFirstFrame at stream changes even if no reconfiguration is needed
This ensures a more consistent playback behavior no matter if an item is the
first playlist item or a later one. For example, each playlist item gets its
own onRenderedFirstFrame callback and other logic within the renderer that
force renders the first frame more quickly is also triggered.

PiperOrigin-RevId: 272434814
2019-10-02 21:29:52 +01:00
ibaker
f7b8d07cd2 Add specific error message if file-not-found for path with fragment or query
This doesn't change the current behaviour, just adds a clear error message
to the developer with instructions on how to avoid it.

Issue:#6470
PiperOrigin-RevId: 272405556
2019-10-02 21:29:45 +01:00
ibaker
6780b802e0 Pass the raw ICY metadata through IcyInfo
The ICY 'spec' isn't really clear/tight enough to do anything more
specific than this I think.

Issue:#6476
PiperOrigin-RevId: 272405322
2019-10-02 21:29:37 +01:00
ibaker
db68aa9490 Rollback of 01f484cbe9
*** Original commit ***

Modify EventMessageDecoder to return null if decoding fails (currently throws exceptions)

This matches the documentation on MetadataDecoder.decode:
"@return The decoded metadata object, or null if the metadata could not be decoded."

***

PiperOrigin-RevId: 272405287
2019-10-02 21:29:30 +01:00
samrobinson
f5873b8f00 WakeLock handling
Created the WakeLockManager for use in SimpleExoPlayer.
Added a setter in SimpleExoPlayer to adjust this functionality.

Issue:#5846
PiperOrigin-RevId: 272176998
2019-10-02 21:29:21 +01:00
aquilescanta
af9ce21e2f Log failures when instantiating Framework MediaDrms
PiperOrigin-RevId: 272166041
2019-10-02 21:29:06 +01:00
tonihei
7d8bee799b Add convenience Player.isCurrentWindowLive method.
PiperOrigin-RevId: 272005632
2019-10-02 21:28:51 +01:00
tonihei
dd4f9bcaae Add Timeline.Window.isLive
This flag is currently merged into Window.isDynamic, which isn't always true
because
1. A window can be dynamic for other reasons (e.g. when the duration is still
missing).
2. A live stream can be become non-dynamic when it ends.

Issue:#2668
Issue:#5973
PiperOrigin-RevId: 271999378
2019-10-02 21:28:43 +01:00
tonihei
26dd4aad68 Add missing methods to EventLogger.
PiperOrigin-RevId: 271998087
2019-10-02 21:28:36 +01:00
tonihei
6a2d04e3ce Reflect playback suppression in PlaybackStats states.
Also split existing SUSPENDED state into ABANDONED and INTERUPTED_BY_AD for
more clarity.

PiperOrigin-RevId: 271997824
2019-10-02 21:28:28 +01:00
ibaker
f0723a27b7 Move HLS mapped track picking into a separate method
This helps reduce the amount of nesting in HlsSampleStreamWrapper.track()

PiperOrigin-RevId: 271983779
2019-10-02 21:28:20 +01:00
tonihei
9cc927bc64 Don't block on a dead thread when waiting for messages.
PiperOrigin-RevId: 271983192
2019-10-02 21:28:13 +01:00
sofijajvc
7c199eb1ad Move vpx constant for setting output renderer to common constants file
This will be used by both av1 and vp9 extensions.

PiperOrigin-RevId: 271949754
2019-10-02 21:28:05 +01:00
ibaker
bab12af597 Tweak Id3Decoder error message to print hex instead of int
Before: "Unexpected first three bytes of ID3 tag header: 6845556"
After: "Unexpected first three bytes of ID3 tag header: 0x687474"
PiperOrigin-RevId: 271949486
2019-10-02 21:27:57 +01:00
andrewlewis
9f8002f16a Update LINT.IfChange for extension constants
PiperOrigin-RevId: 271617996
2019-10-02 21:27:42 +01:00
aquilescanta
b50da6d72e Add DefaultDrmSessionManager.Builder
Issue:#6334
Issue:#4721
Issue:#6334
Issue:#4867
PiperOrigin-RevId: 271577773
2019-10-02 21:27:35 +01:00
sofijajvc
22c3be75ea Extract vpx code used for GL rendering to common classes
This will be used by both vp9 and av1 Exoplayer extensions.

PiperOrigin-RevId: 271568429
2019-10-02 21:27:27 +01:00
aquilescanta
d632cb86c1 Make multisession work well with placeholder session
Issue:#4867
PiperOrigin-RevId: 271404942
2019-10-02 21:27:19 +01:00
ibaker
f0b9889ef6 Remove duplicated tracksEnded check in HlsSampleStreamWrapper
PiperOrigin-RevId: 271364512
2019-10-02 21:27:12 +01:00
ibaker
b57c356fbf Reshuffle {audio,video}SampleQueue{Index,MappingDone} into fields mapped by type
PiperOrigin-RevId: 271364200
2019-10-02 21:27:04 +01:00
aquilescanta
5a8c4b90f4 Add getFlags implementation to DefaultDrmSessionManager
Issue:#4867
PiperOrigin-RevId: 271348533
2019-10-02 21:26:56 +01:00
tonihei
d185cea73b Forward isPlaying/playbackSuppressionReason changes to analytics listeners.
PiperOrigin-RevId: 271347407
2019-10-02 21:26:49 +01:00
tonihei
004b9e8e8c Add EventListener.onPlaybackSuppressionReasonChanged
Adding this callback makes sense for completeness (we have similar callbacks
for all other playback state properties), and also to detect audio focus loss
while buffering which would currently trigger no callback because isPlaying
is still false.

Issue:#6203
PiperOrigin-RevId: 271347351
2019-10-02 21:26:41 +01:00
sofijajvc
60a9cf68c9 Add OpenGL support to av1 extension: jni library
Update native gav1GetFrame method.

PiperOrigin-RevId: 271160989
2019-10-02 21:26:34 +01:00
aquilescanta
c2bab7a745 Introduce ExoMediaDrm.Provider into DefaultDrmSessionManager
Issue:#4721
PiperOrigin-RevId: 271127127
2019-10-02 21:26:19 +01:00