3354 Commits

Author SHA1 Message Date
olly
f3e9166a4e Use DummySurface on S8 where possible
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158838707
2017-06-14 19:29:10 +01:00
olly
fb12a659a2 Fix discarding upstream from DefaultTrackOutput
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158837777
2017-06-14 19:28:01 +01:00
Oliver Woodman
0c1212b309 Fix typo 2017-06-13 14:10:31 +01:00
Oliver Woodman
0f5c30d345 Misc cleanup 2017-06-13 13:35:10 +01:00
ojw28
c6dfccf393 Merge pull request #2756 from kiall/par-debugview
Include Pixel Aspect Ratio in DebugTextViewHelper
2017-06-13 13:21:01 +01:00
ojw28
b95417e783 Merge pull request #2943 from michalliu/dev-v2-fix
check if defaultRefreshRate is reasonable
2017-06-13 13:20:50 +01:00
olly
350998219a Add test for DefaultTrackOutput
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158745843
2017-06-13 13:17:27 +01:00
tonihei
fa4f876668 UI parameter to disable automatically showing playback controls.
(Fixing GitHub issue #2699)

Added controllerAutoShow parameter to decide whether playback controls are
shown automatically. Default is true. Can be overwritten in the XML with
auto_show=false or via SimpleExoPlayerView.setControllerAutoShow(false).

Also inverted the logic of maybeShowControllers and showController.
SimpleExoPlayerView.(show/hide)Controller and PlaybackControlView.(show/hide)
now unconditionally do what they say to allow manual operation.
SimpleExoPlayerView.maybeShowController is used internally to automatically
show playback controls.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158712277
2017-06-13 13:15:13 +01:00
tonihei
dcc2f9bd67 Add meta data class for AbstractConcatenatedTimeline.
(Preparation for GitHub issue #1706)

AbstractConcatenatedTimeline repeatly calls methods of its implementation to
query a specific child timeline. This may be inefficient if the implementation
repeatly executes the same code to find the timeline.

Changed the class such that it now queries all information at once using a meta
data class. As all methods need at least two of four variables anyway, this
doesn't generate unnecessary overhead.

Also generified the UID for the child indices to allow new implementations to
use some other UID besides the index.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158711979
2017-06-13 13:14:01 +01:00
tonihei
629edc2b95 Remove needsContinueLoading from ExoPlayerImplInternal
The same effect can be achieved by checking the isLoading variable of ExoPlayerImplInternal
because this variable is in almost all cases set simultaneously with loadingMediaPeriodHolder.needsContinueLoading.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158697948
2017-06-13 13:11:38 +01:00
andrewlewis
58280f979e Fix continueLoading in IMA deferred periods
continueLoading may be called during preparation, but this is not
handled correctly in the case where a deferred period doesn't
have a source yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158696539
2017-06-13 13:10:26 +01:00
michalliu
dbfbcd6312 check if defaultRefreshRate is reasonable
We found getDefaultDisplay has a very small chance returns null
2017-06-13 15:23:34 +08:00
olly
80be637dcc Allow overriding of getCodecMaxValues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158686545
2017-06-12 10:37:00 +01:00
olly
4510abf278 Update handled schemes for timing element resolution.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158269487
2017-06-12 10:36:52 +01:00
olly
c980eae9c4 Allow overriding of getCodecMaxValues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158686545
2017-06-12 10:32:56 +01:00
olly
5cd3a9baa0 Fix passing of invalid surface to video renderers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158684924
2017-06-12 10:31:53 +01:00
andrewlewis
cb5b6fba01 Allow customization of ExtractorMediaSource's check interval
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158683582
2017-06-12 10:30:33 +01:00
aquilescanta
646047f088 Add nullable annotation to onSourceInfoRefreshed's manifest argument
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158522507
2017-06-12 10:29:17 +01:00
andrewlewis
59315cf923 Fix maximum read ahead logic for repeat mode
Separate MediaPeriodHolder.index and MediaPeriodHolder.periodIndex, so that the
latter is always a period index (which may repeat or jump) whereas the holder
index increases by one each time an item is added to the period holder queue.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158497639
2017-06-12 10:27:00 +01:00
andrewlewis
4e006a9616 Move positionUs parameter from createPeriod to prepare
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158494794
2017-06-12 10:25:49 +01:00
olly
047e0eb645 Renames to prepare for upcoming media buffer changes
Currently, media is discarded from DefaultTrackOutput
and SampleMetadataQueue as soon as it's been read. In
upcoming changes we'll decouple discard and read. This
will make it possible to retain already-read media in
these buffer classes, and allow the read position to
be moved backward as far as media is retained. This is
important for fixing an edge case around 608/EMSG
tracks, and could also underpin future features like
allowing retaining of X-seconds past media in the
buffer.

This change renames some variables and methods to
prepare for the upcoming changes. read/write indices
are renamed to start/end. The upcoming changes will
add a read index that's between the two. isEmpty is
inverted and renamed to hasNextSample, since it will
be possible to not have a next sample (because the
read index == end index) but for the buffer to not
be empty (because start index < read index).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158409630
2017-06-12 10:24:42 +01:00
olly
b7b0fef694 Split InfoQueue into its own class
It's pretty big as an inner class, and is going to get a
little more complicated. I think it makes sense to be
able to consider it in isolation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158393754
2017-06-12 10:22:21 +01:00
olly
1b06ce7407 Fix ArrayIndexOutOfBoundsException in DashMediaPeriod
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158269662
2017-06-12 10:21:09 +01:00
olly
5908d2d7e2 Update handled schemes for timing element resolution.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158269487
2017-06-12 10:19:59 +01:00
tonihei
cdad6a4ef1 Move playback test utils to testutils.
This allows other tests to reuse the util classes without having to link to playbacktests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158214560
2017-06-12 10:18:50 +01:00
Kiall Mac Innes
c24ef592e7 Include Pixel Aspect Ratio in DebugTextViewHelper
Add the video Pixel Aspect Ratio to the DebugTextViewHelper in order
to help debug issues related to PAR changes etc
2017-06-11 16:30:13 +01:00
olly
df99922ac1 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158153988
2017-06-06 18:25:31 +01:00
olly
fb7cb507ea Expose current scrubber position through onScrubStart
Issue: #2910

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158149904
2017-06-06 18:25:22 +01:00
olly
2439c582d4 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158153988
2017-06-06 18:13:02 +01:00
olly
39b1c85c27 Expose current scrubber position through onScrubStart
Issue: #2910

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158149904
2017-06-06 18:11:58 +01:00
olly
1ac8420b7f Constraint buffered percentage to [0,100]
Issue: #2902

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158142754
2017-06-06 17:53:07 +01:00
olly
643083194d Pass non-null logger into DefaultDrmSessionManager
Issue: #2903

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158142226
2017-06-06 17:53:01 +01:00
aquilescanta
a0c884849e For HLS mode, pick the lowest PID track for each track type
This prevents strange behaviors for streams that changes the track declaration
order in the PMT.

NOTE: This should not change ANY behavior other than the one described above.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158140890
2017-06-06 17:52:54 +01:00
olly
79048ffae6 Further cleanup of updateSelectedTrack
- Return early if the selection is unchanged.
- Remove unnecessary variables.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158138187
2017-06-06 17:52:47 +01:00
hoangtc
8241bb8a6e Fix a minor bug with AdaptiveTrackSelection.
When updating track selection, we should only revert back from ideal
track selection to current track selection if the currently selected
track is not black-listed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158135644
2017-06-06 17:52:39 +01:00
aquilescanta
df5e75b76c Pick the lowest quality video when capabilities are exceeded
Issue:#2901

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158006727
2017-06-06 17:52:33 +01:00
andrewlewis
cc748c30c7 Add a null check in DummySurface static initializer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157958694
2017-06-06 17:52:26 +01:00
andrewlewis
9796a09698 Assume CBR for MP3s with Info headers
Issue: #2895

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157841519
2017-06-06 17:52:18 +01:00
olly
c36793ab36 Move adaptation disabling workaround into MediaCodecUtil
This is necessary to make sure that the correct thing happens
where MediaCodecInfo.adaptive is queried directly (for example,
MediaCodecVideoRenderer uses the field to determine how to size
input buffers). Also disable adaptive on Nexus 10.

Issue: #2806

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157583473
2017-06-06 17:52:10 +01:00
aquilescanta
80600ffe1b Ignore invalid EXT-X-PLAYLIST-TYPE values
Issue:#2889

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157571216
2017-06-06 17:52:01 +01:00
olly
c80b60f4ac Constraint seeks within bounds for ConstantBitrateSeeker
We do this everywhere for index based seeking already.

Issue: #2876

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157568788
2017-06-06 17:51:54 +01:00
andrewlewis
854c8d0381 Fix DefaultTimeBar invalidation
Issue: #2871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157562792
2017-06-06 17:51:48 +01:00
aquilescanta
2795269dae Use AVERAGE-BANDWIDTH instead of BANDWIDTH when available
Also prevent BANDWIDTH's regex from matching the AVERAGE-BANDWIDTH attribute.

Issue:#2863

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157219453
2017-06-06 17:51:40 +01:00
olly
5a754fe761 Don't fail if we find a track is unsupported
Use AUDIO_UNKNOWN instead. This is in line with our handling
of video tracks with VIDEO_UNKNOWN.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157209428
2017-06-06 17:51:33 +01:00
olly
67cb7d8da5 Fix SmoothStreaming Timeline
There were a few things wrong. Specifically the case in
the ref'd issue. Also, the timeline was being marked as
non-dynamic in the empty-but-live case (it should be
marked dynamic as segments may be added later).

Issue: #2760

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157103727
2017-06-06 17:50:49 +01:00
aquilescanta
22137f6215 Flexibilize Util.parseXsDateTime to allow single digit hour
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156999955
2017-06-06 17:50:43 +01:00
olly
10f8944060 Don't select more than one audio/video/text track by default
Issue: #2618

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156986606
2017-06-06 17:50:35 +01:00
olly
1316445c00 Constraint buffered percentage to [0,100]
Issue: #2902

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158142754
2017-06-06 16:46:47 +01:00
olly
90c62f636c Pass non-null logger into DefaultDrmSessionManager
Issue: #2903

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158142226
2017-06-06 16:45:41 +01:00
aquilescanta
1637575d4b For HLS mode, pick the lowest PID track for each track type
This prevents strange behaviors for streams that changes the track declaration
order in the PMT.

NOTE: This should not change ANY behavior other than the one described above.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158140890
2017-06-06 16:44:30 +01:00