747 Commits

Author SHA1 Message Date
andrewlewis
a0ab96623a Compensate for trimmed audio in buffer time check
After a period transition the first buffer queued has the sum of previous period
durations added to its source presentation timestamp. These durations take into
account gapless edits, but the check on the timestamp was based on the submitted
frame count, not the frame count after trimming.

This change fixes an issue where audio/video would gradually drift apart due to
accumulated error in the audio track position, which could lead to freezing due
to the audio renderer stopping being ready and switching to the standalone media
clock.

Issue: #4559

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213819908
2018-09-21 12:11:34 +01:00
tonihei
e25b7d2148 Add wrapper for Log messages to allow settig the log level.
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.

Issue:#4665

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
2018-09-20 12:12:21 +01:00
aquilescanta
c9e4f6b429 Make HlsMediaSource.Factory take a factory of trackers instead of an instance
This allows creating multiple HLS media sources from a single Factory, as
required by the interface.

Issue:#4814

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213297850
2018-09-20 12:10:53 +01:00
andrewlewis
dc807c11a1 Fix some release notes formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213245186
2018-09-17 17:51:56 +01:00
tonihei
d1df41a39e Fix window index comparison.
To check the validity of a window index it needs to be compared with a greater
or equal sign to the window count.

Issue:#4822

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213234403
2018-09-17 17:50:20 +01:00
olly
6f6f381beb Fix audio and text track selection in the multi-renderer case
If we can select a track that has a strictly higher score than a
selection already made for a renderer of the same type, we should
prefer it.

Issue: #4711

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212835895
2018-09-13 18:44:53 +01:00
olly
b4dfed874d Enable GZIP for SingleSampleMediaSource
Issue: #4771

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212623142
2018-09-12 15:32:14 +01:00
olly
a5a7e988e3 Clip DASH periods to their durations
Issue: #4185

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212619419
2018-09-12 15:30:47 +01:00
tonihei
b1d48179e8 Add support to change shuffle order after playlist creation.
This allows to update the shuffle order after the ConcatenatingMediaSource
has been created. ShuffleOrder objects should be immutable to ensure thread
safety and thus there is no way to do this currently.

Issue:#4791

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212443146
2018-09-12 15:24:23 +01:00
tonihei
21c5b0bf67 Add missing AudioSink discontinuity for stream changes.
When the stream is changed in the audio renderer, the timestamps of the
samples can no longer be expected to match the calculations in the AudioSink.

This change tracks the samples at which the stream is changed and notifies the
AudioSink of the discontinuity.

Issue:#4559
Issue:#3829

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212435859
2018-09-12 15:20:40 +01:00
tonihei
95aa5db148 Reenable edit lists without keyframe again but remove samples before keyframe.
Ignoring all edit lists if they don't start with a keyframe causes A/V sync
issues when valid edit lists are applied at the beginning.

This change allows such edit lists again but removes all samples before the
first keyframe (these samples would be ignored by the renderer anyway if at
the beginning OR cause visible distortions when appended to an unrelated
keyframe).

Issue:#4774
Issue:#4348

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212244407
2018-09-12 15:05:53 +01:00
aquilescanta
b14e0935b1 Add container format sniffing in HLS
Issue:#2025

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211977802
2018-09-12 15:02:57 +01:00
josephmarques
aa7134d538 Adds support for the messageData attribute of the Event element in DASH MPDs for ExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211854408
2018-09-12 14:55:34 +01:00
tonihei
67a2bb3d28 Fix various period preparation and source info refresh error throwing issues
1. Currently, we may throw source info refresh errors while the previous media
   period is still playing.
2. We don't throw if the next period in a playlist fails to prepare and the
   previous renderers are all disabled.
3. We throw source info refresh errors for playlists before playback reaches
   the culprit source.

This change:
1. Defers the exceptions until all existing media periods have been played.
2. Checks for period preparation exception if the next period is not
   getting prepared and the renderer time reached the next period.
3. Does no longer throw from ConcatenatingMediaSource.maybeThrowSourceInfo
   RefreshError. The deferred media periods take care of that for each source
   individually.

Issue:#4661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211819436
2018-09-12 14:52:33 +01:00
olly
502fae7cd4 Bump version to 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211792952
2018-09-06 13:47:59 +01:00
olly
c3c309b8a8 Blacklist OMX.SEC.mp3.dec on SM-T530
Issue: #4519

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211646358
2018-09-06 12:04:48 +01:00
tonihei
782dee266d Change past to present tense in release notes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211612207
2018-09-05 12:34:59 +01:00
olly
c57fe1897c Add ExoPlayer.retry convenience method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211463309
2018-09-05 12:33:28 +01:00
olly
70f8aeb10b Clean up release notes in preparation for 2.9.0
- Try and put things into a vaguely sane order
- Remove/simplify overly-detailed release notes

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211447350
2018-09-05 12:29:39 +01:00
olly
80e64e58ec WAV: Don't output data beyond the data limit
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211446207
2018-09-05 12:28:13 +01:00
tonihei
3a802eb06c Add onDrmSessionAcquired and onDrmSessionReleased callbacks.
To report DRM session metrics in the future as part of the listener, we need
a callback at the end of the drm session to get the final metric state.
For completion, the session acquired callback is also added.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211328412
2018-09-03 14:15:51 +01:00
tonihei
d308fff88d Restructure media period queue tracker in AnalyticsCollector.
The current structure tries to associate events to media periods and windows
based on the reported values and the current timeline. However the reported
EventTime may not always be consistent in case the timeline doesn't contain
windows or media periods yet or not anymore.

The recent changes to MediaPeriodId allow to use it as a unique identifer for
media periods independent of the timeline. This enables more accurate tracking
of the media period queue and prevents reporting events with inconsistent
data.

Issue:#4492
Issue:#4634

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210713120
2018-09-03 14:09:35 +01:00
tonihei
6b9e1824ad Extend updateSelectedTrack method with additional information.
This provides the list of currently buffered media chunks and iterators over
the potential next chunks to the track selection. Having these two parameters
enables more advanced decision logic based on this data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210551812
2018-09-03 14:04:45 +01:00
eguven
a429f4819e Use camera motion metadata to stabilize 360 videos
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210537375
2018-08-28 16:43:53 +01:00
andrewlewis
efe8f09f45 Propagate EoS in renderer when using video tunneling
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210529471
2018-08-28 16:40:55 +01:00
andrewlewis
9c36773602 Fix playback of postrolls with multiple ads
At the point of starting to play a postroll, source info refreshes for future
postroll ads in the same ad group would cause a seek that incorrectly identified
the media period to play as the content media period. Fix the logic in
getAdGroupIndexForPositionUs to address this.

Also handle empty postroll ad breaks by resetting the expected ad group index
when we send content complete.

Issue: #4710
Issue: #4681

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210071054
2018-08-24 16:02:38 +01:00
aquilescanta
24d04a26e4 Add support for variable substition in HLS
Issue:#4422

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209958623
2018-08-24 16:01:08 +01:00
tonihei
74e2384fb6 Add response headers to LoadEventInfo.
The response headers of the last load are available from the loading source
when creating media source events and can be easily forwarded.

Issue:#4361
Issue:#4615

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209900693
2018-08-24 15:55:01 +01:00
eguven
02a8964fe2 Support VR180 videos
If available parse and use spherical metadata:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209754080
2018-08-24 15:44:24 +01:00
olly
b34c46415d Bump version to 2.8.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209134753
2018-08-17 13:27:42 +01:00
andrewlewis
d05d2fcea9 Support seamless adaptation of xHE-AAC audio streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209113673
2018-08-17 11:15:58 +01:00
Oliver Woodman
32bd69d4b2 Cleanup recent merged pull requests 2018-08-16 17:02:08 +01:00
andrewlewis
e7ef75342c Scale up initial video decoder maximum input size
When playing a playlist where the exact maximum input size is known from the
container for each item, it may be necessary to recreate the decoder to increase
its maximum input buffer size at the point of transitioning from one item to the
next, which can make transitions non-seamless.

Scale up the initial video decoder maximum input size so playlist item
transitions with small increases in maximum sample size don't require
reinitialization.

Issue: #4510

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208650244
2018-08-16 16:39:38 +01:00
andrewlewis
8854aa415f Add support for setting auxiliary audio effects
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208611493
2018-08-14 10:02:58 +01:00
andrewlewis
5f75d6ea13 Target API 28
Apps targeting API 28 by default do not grant permission for cleartext traffic,
so update the demo app to show a warning if loading an HTTP URI will fail. See
https://developer.android.com/about/versions/pie/android-9.0-changes-28 for
information on behavior changes in API 28.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208204937
2018-08-13 14:04:14 +01:00
aquilescanta
d399c00f9e Add support for multiple alternative EXT-X-KEY in HLS
Also add support for parsing PlayReady DRM information

Issue:#4180

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208094290
2018-08-13 14:00:34 +01:00
andrewlewis
5a8af74b4b Improve handling of consecutive empty ad groups
Issue: #4030
Issue: #4280

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208055792
2018-08-13 13:55:03 +01:00
borrelli
9db0dbc0e9 Allow SimpleExoPlayer to handle audio focus
Add automatic audio focus handling to SimpleExoPlayer. Audio focus
handling is an opt-in feature that can be requested by passing
the system's AudioManager and an AudioFocusConfiguration to
SimpleExoPlayer.setAudioFocusConfiguration.

When audio focus is being managed by SimpleExoPlayer, the player
will transparently handle pausing playback during
AUDIOFOCUS_LOSS_TRANSIENT, as well as lowering playback volume
during AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208045732
2018-08-13 13:52:32 +01:00
olly
63bfa3d413 Use gradle dependencies for Cronet extension
This also allows us to distribute the extension via jCenter

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207874626
2018-08-13 13:43:02 +01:00
andrewlewis
a3c08465eb Fix typos in release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207852110
2018-08-13 13:40:15 +01:00
sammon
d3686cf8a2 Updating DefaultHttpDataSource to allow for http methods other than GET and POST,
as specified by DataSpec.httpMethod.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207769779
2018-08-13 13:39:10 +01:00
olly
cab1d02c0c Allow setting constant bitrate flags in DefaultExtractorsFactory
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207566605
2018-08-07 16:25:01 +01:00
olly
ecee873b64 Mini cleanup of improved seeking support for release
* Make dedicated section in RELEASENOTES
* Clean up AMR FACTORY

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207550281
2018-08-06 17:18:51 +01:00
olly
89e2a61c80 Update release notes for release
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207532902
2018-08-06 14:36:23 +01:00
hoangtc
077f2c3036 Supports seeking for TS Streams.
This CL adds support for seeking witin TS streams by using binary search. For
any seek timestamp, it tries to find the location in the stream where PCR
timestamp is close to the target timestamp, and return this position as the
seek position.

Github: #966.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207529906
2018-08-06 14:35:12 +01:00
olly
454b106921 Fix freezing playing multi-period DASH with EventStreams
EventSampleStream.readData required eventStreamUpdatable to be
false for END_OF_STREAM to be returned, but it was only being
set to false when the manifest became static. This change also
sets it to false if the period is not the last one in a dynamic
manifest. It also renames it the parameter to appendable, since
that's what it really represents. Events may still be removed
from the start of the EventStream as the period starts moving
out of the live window.

Issue: #4492

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207517265
2018-08-06 11:38:33 +01:00
hoangtc
c3d8ad2488 Add supports for Seeking in ADTS format using a constant bitrate seekmap.
- Use ConstantBitrateSeeker to implement seeking for ADTS format. Since most
ADTS streams are VBR, we use the average bitrate of the first 1000 frames as
the average bit rate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207509651
2018-08-06 11:33:06 +01:00
andrewlewis
b3b8356766 Fix DefaultTimeBar accessibility class name
See https://support.google.com/accessibility/android/answer/7661305.

Also fix/suppress nullability warnings.

Issue: #4611

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207245115
2018-08-06 11:28:03 +01:00
olly
d744c979ee Update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206921981
2018-08-06 11:17:35 +01:00
hoangtc
f08ad55892 Supports seeking for MPEG PS Streams.
This CL adds support for seeking within PS streams by using binary search. For
any seek timestamp, it tries to find the location in the stream where SCR
timestamp is close to the target timestamp, and return this position as the
seek position.

Github: #4476.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206787691
2018-08-01 13:49:21 +01:00