5060 Commits

Author SHA1 Message Date
olly
73048f18c1 Remove "r" from instructions for extension modules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188038757
2018-03-07 15:24:33 +00:00
tonihei
82fc5730e7 Fix divergence of timeline between ExoPlayerImpl and ExoPlayerImplInternal.
The playback state in ExoPlayerImpl and ExoPlayerImplInternal is usually kept
in sync. Only the timeline was so far not updated in the same way with the
internal player using a null timeline while ExoPlayerImpl keeps the previous
timeline.

This change removes the need to keep a null timeline which allows to update
the internal timeline in the same way as the external one. This fixes problems
when retrying a failed playback multiple times.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188034988
2018-03-07 15:22:58 +00:00
tonihei
4e69f71e52 Fix wrong start position in resetInternal.
The start position was set to the old start position instead of the current
playback position. We need to set the start position to the current playback
position to ensure a repreperation with the same media starts from the last
playback position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188025439
2018-03-07 15:21:16 +00:00
olly
b40e5d8c0f Derive duration from sample table if missing from track header
Issue: #3926

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188020756
2018-03-07 15:19:38 +00:00
tonihei
2c671711f4 Ensure child source ids are kept in ConcatenatingMediaSource.
Previously, child source ids were reassigned when the media source is reused.
Now the creation of the ids moved to outer level to stay in sync with the list
of child media sources.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188014739
2018-03-07 15:18:02 +00:00
jschlag
cc48b5568c handle errors from vpx_codec_control_ calls in vpx_jni
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187872692
2018-03-07 15:16:28 +00:00
olly
8c24184f8b Propagate failures handling messages on the playback thread
This restores functionality that was lost when we added
support for general timed message delivery.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187866807
2018-03-07 15:14:22 +00:00
tonihei
c0c11af29f Reuse media sources in demo apps.
Especially the cast demo app benefits from this feature as it can keep its
ConcatenatingMediaSource all the time without having to repopulate it
when switching players.

Issue:#3498

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187866048
2018-03-07 15:12:50 +00:00
tonihei
6e5ae87cae Remove initial bitrate estimate from AdaptiveTrackSelection.
This value can now be set in the DefaultBandwidthMeter instead. As a result
NO_VALUE can be removed from BandwidthMeter as we now always provide an
estimate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187865341
2018-03-07 15:11:13 +00:00
tonihei
c3d6731188 Add clear method to ConcatenatingMediaSource.
This simplifies clearing a playlist without having to call removeMediaSource
repeatedly. It will also update the timeline only once.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187863857
2018-03-07 15:09:38 +00:00
tonihei
3eaab9e2ab Group arguments in MediaSourceEventListener.
There is a large number of repeated arguments in the callback methods of
MediaSourceEventListener. Grouping them into load related data and media
related data allows to significantly reduce the amount of boiler plate code
and also simplifies future extensions of either set of data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187857252
2018-03-07 15:07:59 +00:00
tonihei
5fb6fc1226 Allow to specify initial bitrate estimate in DefaultBandwidthMeter.
This value is logically part of the bandwidth estimation and will eventually be
moved there from the adaptive track selection.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187597038
2018-03-07 15:06:22 +00:00
andrewlewis
4373e63fac Make the period and initial window positions match for all HLS streams
Before this change, HlsMediaSource timelines had a period starting at the epoch.
For VOD streams the window position in the period was the program date time.

This change makes period and initial window positions match. For live streams
the window position advances as segments are removed, so its position in the
period is the difference between the initial program date time and the program
date time of the latest playlist.

This also makes it possible to insert ads in VOD HLS content with program date
time, as the period and window are now aligned.

Issue: #3865

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187590948
2018-03-02 09:30:40 +00:00
olly
73b6b20fa3 Improve decoder retention logic.
1. Allow retaining a decoder without any reconfiguration, in addition
   to retaining with reconfiguration (and not retaining)
2. Fix retention logic for video decoders to take into account changing
   ColorInfo
3. Allow retention of audio decoders when possible

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187500285
2018-03-02 09:27:48 +00:00
eguven
380ec82881 Update PlayerView javadoc
Added a note about using TextureView only on hardware accelerated window.

Issue: #3901

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187498594
2018-03-02 09:26:16 +00:00
hoangtc
a3c8062e52 Add support for listening to AspectRatioFrameLayout's aspect ratio update
Currently, AspectRatioFrameLayout may need to resize itself if it could not
satisfy a target aspect ratio. User may want to know when this happen, or
whether this can happen, so they can update their UI accordingly. For
example: show/hide a button to toggle different resize mode only when the
aspect ratio of the view and the content is very different.

GitHub: #3736

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187484241
2018-03-02 09:24:41 +00:00
tonihei
fdfaa02981 Update issue template to use "Issue #1234" as subject for emails.
This is to ensure valid emails don't get a canned response. The canned response
is triggered when the subject doens't contain the word "issue".

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187458580
2018-03-02 09:23:09 +00:00
tonihei
75c3bfb55c Rename Listener for timeline update to avoid confusion with MediaSourceEventListener.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187313128
2018-03-02 09:21:28 +00:00
hoangtc
fcb796a80c Migrate ExoPlayer Gradle build files.
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
2018-03-02 09:20:02 +00:00
tonihei
2f4a3d2e5d Replace ConcatenatingMediaSource with DynamicConcatenatingMediaSource.
The non-dynamic media source has a strict subset of features of the dynamic one and
thus can be replaced.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187299432
2018-03-02 09:16:00 +00:00
tonihei
32b4db361f Send empty timeline for empty DynamicConcatenatingMediaSource immediately.
Without child sources, the timeline can't possibly updated again within the
current looper message. Thus, we can send the empty timeline immediately.

This fixes a recently introduced flakiness in the test.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187295700
2018-03-02 09:14:27 +00:00
andrewlewis
38914f0ba5 Allow clipping offset windows
ClippingMediaSource provides a timeline where the period and window have the
same start/end positions, so when clipping a child timeline with a non-zero
offset between the window and period it is necessary to clear the offset then
apply the offset to the start/end positions used in the ClippingMediaPeriod.

Also add a message to clipping exceptions.

Also fix adjustment of seeks to the start of the clipped view.

Issue: #3888

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187292506
2018-03-02 09:12:54 +00:00
tonihei
b2c445776a Allow parallel reuse of media sources.
This is achieved by adding a BaseMediaSource which keeps a reference count of the
number of times the source has been prepared and forwards to the actual implementations
only once, such that only minimal changes are needed for each media source.

Issue:#3498

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187186691
2018-03-02 09:08:28 +00:00
tonihei
b489f58cdb Change listener notification in DynamicConcatenatingMediaSource.
Up to now we use a boolean "preventListenerNotification" to suppress updates
while other operations are still in progress. This ensures, for example, that
only one initial timeline is issued even for multiple child sources.

As soon as we allow to reuse the same instance, it becomes increasingly difficult
to manage this manual listener notification suppression. Therefore, this change
schedules an update as a new message on the playback thread immediately after the
current message. This way, we also ensure that all simultaneous updates within one
looper message iteration are reported together.

Issue:#3498

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187180342
2018-03-02 09:05:19 +00:00
olly
322e15f63b Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187165173
2018-03-02 09:02:35 +00:00
tonihei
052de3c677
Update ISSUE_TEMPLATE 2018-03-01 10:32:27 +00:00
Sven Wischnowsky
5d1c84cebc support zlib compressed PGS subtitles 2018-02-28 18:08:03 +01:00
Oliver Woodman
aa57062199 Restore equivalence 2018-02-27 13:57:18 +00:00
ojw28
51405c9959
Merge pull request #3863 from drhill/dev-v2_mkvDIVX
add h263 format support in fourcc codecID
2018-02-27 11:24:44 +00:00
ojw28
dc34ff2e6b
Merge pull request #3771 from reudismam/dev-v2
Use the pattern "string literal".equals(something) to prevent NPE …
2018-02-27 11:24:29 +00:00
ojw28
932abaf0bc
Merge pull request #3887 from CoryCharlton/dev-v2
Add abstract logging methods to EventLogger
2018-02-27 11:24:12 +00:00
ojw28
926a276c80
Merge pull request #3900 from AdityaAnand1/patch-1
replace 'compile' with 'implementation'
2018-02-27 11:24:04 +00:00
olly
803f15dec7 Sync issue template
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187026802
2018-02-27 11:06:34 +00:00
tonihei
b47fb2826b Move extension tests to Robolectric.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187021822
2018-02-27 11:03:50 +00:00
olly
d400efd0f7 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187021535
2018-02-27 11:02:12 +00:00
Oliver Woodman
5dade71609 Merge branch 'release-v2' into dev-v2 2018-02-26 15:45:24 +00:00
olly
099cc384a8 Move scheduler into its own top level package
The util package is, in practice, for things that are misc enough
to not warrant their own package. If something is deserving of a
package, it's IMO best placed somewhere else (I know you could
argue it's a util, but you could argue that about almost anything
else as well).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187010018
2018-02-26 15:41:18 +00:00
olly
0de6bb28a2 Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186999051
2018-02-26 15:41:18 +00:00
andrewlewis
c4f82514bf Fix ImaAdsMediaSource isTopLevelSource
AdsMediaSource must be top-level. Currently the (deprecated) ImaAdsMediaSource
can't be used because it prepares its contained AdsMediaSource as a child
source.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186990882
2018-02-26 15:41:18 +00:00
olly
f2f5aac7c5 Allow audio position to jump on first input buffer
Allow the position to jump on receiving the first presentable input buffer,
if and only if the buffer timestamp differs significantly from what was
expected. This prevents a stuck buffering case for streams that are thought
to start at t=0, but actually start at t=large_value.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186990214
2018-02-26 15:41:18 +00:00
Aditya Anand
707b481f2c
replace 'compile' with 'implementation' 2018-02-26 09:11:02 +05:30
Cory Charlton
9f2d53dc21 Fixed the Log.d call in loge 2018-02-23 09:15:14 -08:00
Cory Charlton
afd81146f5 Add abstract logging methods to EventLogger 2018-02-22 13:47:10 -08:00
ojw28
eb9c67fbc5
Merge pull request #3882 from google/dev-v2-r2.7.0
r2.7.0
2018-02-22 11:48:01 +00:00
Oliver Woodman
166c4ba795 Remove dev release notes from 2.7.0 2018-02-22 11:43:02 +00:00
Oliver Woodman
1f6607a9aa Merge branch 'release-v2' into dev-v2-r2.7.0 2018-02-22 11:39:57 +00:00
Oliver Woodman
6054ba418f Fix bad Javadoc 2018-02-22 11:14:03 +00:00
Oliver Woodman
1a5d985e2a Remove stray translations 2018-02-22 10:24:11 +00:00
Oliver Woodman
2cff596162 Allow audio position to jump on first input buffer
Allow the position to jump on receiving the first presentable input buffer,
if and only if the buffer timestamp differs significantly from what was
expected. This prevents a stuck buffering case for streams that are thought
to start at t=0, but actually start at t=large_value.
2018-02-22 10:05:16 +00:00
olly
f69cc191ab Drop EMSG atoms before MOOV
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186454715
2018-02-21 23:42:24 +00:00