2356 Commits

Author SHA1 Message Date
tonihei
ec71c05e8b Add possiblity to send messages at playback position.
This adds options to ExoPlayer.sendMessages which allow to specify a window index
and position at which the message should be sent. Additionally, the options can be
configured to use a custom Handler for the messages and whether the message should
be repeated when playback reaches the same position again.

The internal player converts these window positions to period index and position
at the earliest possibility. The internal player also attempts to update these
when the source info is refreshed. A sorted list of pending posts is kept and the
player triggers these posts when the playback position moves over the specified
position.

Issue:#2189

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179683841
2018-01-03 13:34:36 +00:00
tiffanywong
3b633f81b2 Automated g4 rollback of changelist 179563355.
*** Original change description ***

Add possiblity to send messages at playback position.

This adds options to ExoPlayer.sendMessages which allow to specify a window index
and position at which the message should be sent. Additionally, the options can be
configured to use a custom Handler for the messages and whether the message should
be repeated when playback reaches the same position again.

The internal player converts these window positions to period index and position
at the earliest possibility. The internal player also at...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179666357
2018-01-03 13:34:36 +00:00
tonihei
6c2d1e1966 Add possiblity to send messages at playback position.
This adds options to ExoPlayer.sendMessages which allow to specify a window index
and position at which the message should be sent. Additionally, the options can be
configured to use a custom Handler for the messages and whether the message should
be repeated when playback reaches the same position again.

The internal player converts these window positions to period index and position
at the earliest possibility. The internal player also attempts to update these
when the source info is refreshed. A sorted list of pending posts is kept and the
player triggers these posts when the playback position moves over the specified
position.

Issue:#2189

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179563355
2018-01-02 21:36:07 +00:00
tonihei
edbb979551 Allow to configure maximum buffer size in DefaultLoadControl.
This adds a parameter to configure a maximum buffer size in bytes. If left
at its default of C.LENGTH_UNSET, the target buffer is determined using a
overridable method based on the track selection. Also adding a parameter
to decide whether to prioritize time or size constraints.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179048554
2017-12-15 12:09:45 +00:00
aquilescanta
0ccf816a5c Add a bitmask for text tracks' selection flags in DefaultTrackSelector
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179039563
2017-12-15 12:07:01 +00:00
olly
37a275f67e Enable SeekParameters functionality for ExtractorMediaSource
Also fix ClippingMediaSource to consider the start position an
artificial key-frame, and to properly offset the value returned
by getAdjustedSeekPositionUs.

Issue: #2882

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179032243
2017-12-15 12:05:41 +00:00
olly
a092262d0b Update release notes for current 2.6.1 feature set
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178877884
2017-12-13 12:55:25 +00:00
olly
6c4bb2cdec Update release notes to reflect builder -> factory change
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178866131
2017-12-13 12:52:07 +00:00
andrewlewis
e2bba1567e Add Builder for ImaAdsLoader and allow early requestAds
Also fix propagation of ad errors that occur when no player
is attached.

Issue: #3548
Issue: #3556

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178767997
2017-12-12 19:19:27 +00:00
andrewlewis
a4ae206ebe Support non-extractor ads in AdsMediaSource and demo apps
Issue: #3302

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178615074
2017-12-12 19:17:58 +00:00
andrewlewis
f8834dacc6 Use surfaceless context in DummySurface, if available
Issue: #3558

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178604607
2017-12-12 19:12:35 +00:00
andrewlewis
aa01fb85dc Add an option to turn off hiding controls during ads
Issue: #3532

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178372763
2017-12-12 19:07:02 +00:00
andrewlewis
44a8245a1a Fix ad loading when there is no preroll
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178234009
2017-12-12 19:00:11 +00:00
andrewlewis
8b4b01c7f6 Skip ads before the initial player position
Issue: #3527

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178218391
2017-12-12 18:56:01 +00:00
aquilescanta
586e657bd7 Allow opt-in HLS chunkless preparation
If allowed, the media period will try to finish preparation without downloading
chunks (similar to what DashMediaPeriod does). To create track groups,
HlsMediaPeriod will try to obtain as much information as possible from the
master playlist. If any vital information is missing for specific urls,
traditional preparation will take place instead.

This version does not support tracks with DrmInitData info. This affects tracks
with CDM DRM (e.g: Widevine, Clearkey, etc). AES_128 encryption is not affected.
This information needs to be obtained from media playlists, and this version
only takes the master playlist into account for preparation.

Issue:#3149

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178098759
2017-12-12 18:51:51 +00:00
hoangtc
88dea59cd2 Add ability for media period to discard buffered media at the back of the queue
In some occasions, we may want to discard a part of the buffered media to
improve playback quality. This CL adds this functionality by allowing the
loading media period to re-evaluate its buffer periodically (every 2s) and discard
chunks as it needs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177958910
2017-12-12 18:43:26 +00:00
olly
bb0fae3ee8 Fix playback of FLV live streams with no audio track
Issue: #3188

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177811487
2017-12-04 17:39:43 +00:00
olly
9c63d37791 Support timezone offsets in ISO8601 timestamps
Issue: #3524

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177808106
2017-12-04 17:39:43 +00:00
olly
a9c3ca1cfe Tentative fix for roll-up row count
Issue: #3513

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177804505
2017-12-04 17:38:11 +00:00
andrewlewis
fbccdf594a Use AdaptiveMediaSourceEventListener for ExtractorMediaSource
This is a step towards harmonizing the MediaSource Builders and (potentially)
providing MediaSource factories.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177783157
2017-12-04 17:38:11 +00:00
andrewlewis
7b08899818 Move resetting audio processors to initialize()
The set of active audio processors was only updated on reconfiguration and when
draining playback parameters completed. Draining playback parameters are cleared
in reset(), so if parameters were set while paused then the sink was quickly
reset, without draining completing, the set of active audio processors wouldn't
be updated. This means that a switch to or from speed or pitch = 1 would not be
handled correctly if made while paused and followed by a seek.

Move resetting active audio processors from configure (where if the active audio
processors were reset we'd always initialize a new AudioTrack) to initialize().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177442098
2017-12-04 17:38:11 +00:00
aquilescanta
58e60e1f9d Use the Builder pattern for DefaultTrackSelector#Parameters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177438430
2017-12-04 17:38:11 +00:00
tonihei
f46cb907b7 Add stop with position reset to Player interface.
The ExoPlayerImpl implementation forwards the stop request with this optional
parameter. To ensure correct masking (e.g. when timeline updates arrive after
calling reset in ExoPlayerImpl but before resetInternal in
ExoPlayerImplInternal), we use the existing prepareAck counter and extend it
also count stop operations. For this to work, we also return the updated
empty timeline after finishing the reset.

The CastPlayer doesn't support the two reset options so far.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177132107
2017-12-04 17:38:11 +00:00
aquilescanta
16c43c6bb7 Support undefined text track language when preferred is not available
Also slightly improve language normalization/documentation.

For this CL, it is assumed that null and "und" languages are different
entities. Once we fully tackle language tag normalization, we can decide
whether to normalize the "undefined" language.

Issue:#2867
Issue:#2980

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177008509
2017-11-27 21:28:34 +00:00
olly
91bcde033c Fix release notes (change was cherry-picked)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176768835
2017-11-23 15:18:24 +00:00
tonihei
aac53cac56 Add reason to onTimelineChanged.
Currently onTimelineChanged doesn't allow to distinguish easily between the
different reasons why it's being called. Especially, finding
out whether a new media source has been prepared or the current source
refreshed dynamically was impossible without tightly coupling the player
operations with the listener.

The new reasons provide this disdinction by either indicating a newly
initialized media source, a dynamic update to an existing timeline
or manifest, or a reset of the player (which usually results in an
empty timeline).

The original onTimelineChanged method without reason is kept in the
DefaultEventListener as deprecated to prevent the need to update all
existing listeners in one go.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176478701
2017-11-21 13:07:46 +00:00
olly
275292cb63 Report additional position discontinuities
- Properly report internal discontinuities
- Add DISCONTINUITY_REASON_SEEK_ADJUSTMENT to distinguish
  seek adjustments from other internal discontinuity events

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176367365
2017-11-21 13:04:47 +00:00
andrewlewis
2a685da4eb Improve robustness of ImaAdsLoader
Remove an assertion that there was a call to pause content between two
content -> ad transitions.

Also, only use the player position for resuming an ad on reattaching if the
player is currently playing an ad, in case IMA pauses content before the player
actually transitions to an ad.

Issue: #3430

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176365842
2017-11-21 13:00:36 +00:00
hoangtc
0de57cbfae Allow more flexible loading strategy when loading multiple sub streams.
Currently for a DASH ChunkSource that consists of multiple sub-streams, we
always use a CompositeSequenceableLoader, which only allows the furthest behind
loader or any loader that are behind current playback position to continue
loading.
This changes allow clients to have more flexibility when deciding the loading
strategy:
- They can construct a different kind of composite SequenceableLoader from
the sub-loaders, and use it by injecting a different CompositeSequeableLoaderFactory accordingly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176363870
2017-11-21 12:59:11 +00:00
andrewlewis
c4fe0e6482 Add support for Dolby Atmos
Issue: #2465

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176341309
2017-11-20 13:43:31 +00:00
hoangtc
2a02171c42 Add Builder to SingleSampleMediaSource.
Add Builder pattern to SingleSampleMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176332964
2017-11-20 13:34:45 +00:00
hoangtc
e349905039 Add Builder to ExtractorMediaSource.
Add Builder pattern to ExtractorMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176088810
2017-11-17 18:56:25 +00:00
andrewlewis
b8aedfbf4f Add support for float output for FfmpegAudioRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175940553
2017-11-17 18:53:26 +00:00
andrewlewis
15a2f47f31 Add support for float output in DefaultAudioSink
Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175936872
2017-11-17 18:51:43 +00:00
olly
8537376a2c Update release notes with dev-v2 section
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175852052
2017-11-17 18:50:17 +00:00
olly
d50f7317a2 Update 2.6.0 release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175546817
2017-11-13 20:01:35 +00:00
olly
96a856c0b5 Drop the 'r' from release version.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175543465
2017-11-13 20:00:02 +00:00
olly
cb72d42e3e Update 2.6.0 release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174853112
2017-11-13 14:59:08 +00:00
olly
b5b87d6a27 Bump to 2.6.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174467964
2017-11-03 16:12:34 +00:00
olly
c2d05f4405 Bump to 2.5.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172758309
2017-10-19 18:10:27 +01:00
olly
26d789e6d3 Tweak release notes for 2.5.3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169374725
2017-09-20 11:59:01 +01:00
olly
ed76882271 Bump version + release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169257339
2017-09-19 18:26:05 +01:00
olly
340d0be40a Bump to 2.5.2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168155713
2017-09-10 16:48:39 +01:00
olly
b8c6ed6701 Bump to 2.5.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164595874
2017-08-08 16:42:42 +01:00
olly
9ecec92b56 Finalize r2.5.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434615
2017-08-07 11:53:04 +01:00
olly
1109bf50dd Bump version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164126494
2017-08-04 12:33:50 +01:00
olly
c01c8cd2a6 Bump version to 2.5.0-beta2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163830353
2017-08-01 16:23:39 +01:00
olly
13732fe618 Release notes + version bump for 2.5.0-beta1
There's no way to represent a beta in our integer versioning
scheme. I propose we just set it the same for all betas + the
stable release. The versioning for the demo app isn't that
important, so I've just put it directly to 2.5.0 as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162749130
2017-07-21 17:39:12 +01:00
olly
eb38601626 Update release notes + bump version number
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162514848
2017-07-19 19:57:48 +01:00
olly
4ee0b2e1c8 Update release notes + bump version number
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160663100
2017-06-30 18:54:35 +01:00