4005 Commits

Author SHA1 Message Date
olly
eb6859e436 Align navigation implementation across UI components
This change also paves the way for splitting out functionality into a utility class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221070262
2018-11-14 17:56:39 +00:00
olly
7508219416 Simplify PlayerControlView fast forward and rewind implementation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221065798
2018-11-14 17:54:58 +00:00
eguven
4754aa59bd Use estimated bitrates in AdaptiveTrackSelection
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220643861
2018-11-14 17:48:20 +00:00
andrewlewis
bce1fab03c Include channel count in capabilities check
Issue: #4690

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220640737
2018-11-14 17:46:39 +00:00
bachinger
91d9fbd95d pass the notification listener to the constructor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220616166
2018-11-14 17:41:45 +00:00
eguven
158bc1edac Add TrackBitrateEstimator and WindowedTrackBitrateEstimator
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220529628
2018-11-14 17:35:16 +00:00
olly
f895be6b1f AudioFocusManager - Treat idle state consistently
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220500268
2018-11-07 20:31:33 +00:00
olly
8d833c319d Fix BasePlayer.next()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220470213
2018-11-07 17:57:42 +00:00
olly
e82d29f47a Make BasePlayer.get[Next/Previous]WindowIndex more useful
When in REPEAT_MODE_ONE, it's unlikely apps want next/previous methods
on the player to keep them in the same window. Music apps in particular
tend to implement next/previous functionality as though repeat mode were
off when in this mode (i.e. current song loops forever during playback,
but next/previous navigation still navigates to next/previous items).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220469655
2018-11-07 17:57:42 +00:00
olly
15dda17905 Make TimelineQueueNavigator shuffle aware
Issue: #5065

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220468285
2018-11-07 17:57:42 +00:00
olly
0dfd478a20 Add missing update on repeat toggle mode change
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220461315
2018-11-07 17:57:42 +00:00
eguven
5a18a98fbd Add TrackSelectionUtil getBitratesUsingPastAndFutureInfo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220447459
2018-11-07 17:57:42 +00:00
eguven
7a114cb374 Uncomment VisibleForTesting annotations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220432564
2018-11-07 17:57:42 +00:00
eguven
d7e23f826b Fix package visibility comments
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220323772
2018-11-07 17:57:42 +00:00
borrelli
0c4d0ee1c1 Fix for #5055 - Cannot disable audio focus after enabled.
This fixes an issue where disabling audio focus handling
while audio focus is held would not release audio focus.

A new test was added for this situation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220316866
2018-11-07 17:57:42 +00:00
andrewlewis
abb7d8a2d5 Include UI module tests in open source push
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220277660
2018-11-07 17:57:42 +00:00
andrewlewis
032883e1d2 Work around non-empty EoS buffers with timestamp 0
Issue: #5045

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220237752
2018-11-06 11:07:06 +00:00
andrewlewis
a8d1f04f92 Document error case for generateAudioSessionIdV21
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220132865
2018-11-06 11:07:06 +00:00
olly
8844694dfd Automated g4 rollback of changelist 219585084.
*** Reason for rollback ***

Rolling forward again as [] should fix issue that prompted the rollback

*** Original change description ***

Automated g4 rollback of changelist 219130576.

*** Original change description ***

Re-enable codec re-use

Issue: #2826

***

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220124362
2018-11-06 11:07:06 +00:00
eguven
0afd9c17e6 Add TrackSelectionUtil getBitratesUsingPastInfo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220066159
2018-11-06 11:07:06 +00:00
eguven
37f4540156 Move BaseGvrPlayerActivity to com.google.android.exoplayer2.ext.gvr
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219829614
2018-11-06 11:07:06 +00:00
olly
c5db69d22c Fix further issues with decoder re-use
It's no longer guaranteed that onOutputFormatChanged will always be
called when the renderer is re-enabled, since the codec may be kept
and its output format may not change. Hence we need to avoid resetting
state in onDisabled that we need when the renderer is enabled again.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219821519
2018-11-06 11:07:06 +00:00
olly
251c420767 Experimental parameter for setting a render time limit in MediaCodecRenderer
Currently, MediaCodecRenderer's render loop does not have any time limit. We
always try to drain and feed as much buffers as possible. This may lead to a
pattern of feeding phase takes too much time from previous loop, which makes
the next draining phase drops all buffers, making these buffers available for
feeding all at once, and the pattern keeps repeating.

This CL adds an experimental parameter for setting a time limit. If the time
limit is exceeded, the feeding process stops even if more input could be fed.
The default behavior is unchanged

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219820386
2018-11-06 11:07:06 +00:00
aquilescanta
34797651c2 Add support for .cmf* extension in DefaultHlsExtractorFactory
This makes extractor selection a bit more efficient for some CMAF files.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219795105
2018-11-02 16:02:02 +00:00
aquilescanta
32927bb62c Update the DefaultExtractorInput's peek buffer length on each write
This prevents leaving an inconsistent state after a EOF exception.

Issue:#5039

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219785275
2018-11-02 16:00:33 +00:00
andrewlewis
3b1d0e270b Double the buffer duration for AC3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219765107
2018-11-02 15:57:20 +00:00
eguven
76688589d2 Add TrackSelectionUtil.getAverageBitrates method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219636548
2018-11-02 15:54:10 +00:00
olly
e1c6229cc8 Bump version to 2.9.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219609471
2018-11-01 11:22:39 +00:00
andrewlewis
36fef95f47 Fix extended service number calculation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219597894
2018-11-01 11:21:11 +00:00
ishani
f76b80c3cb Automated g4 rollback of changelist 219130576.
*** Original change description ***

Re-enable codec re-use

Issue: #2826

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219585084
2018-11-01 11:19:35 +00:00
Oliver Woodman
a442c72814 Fix nullability 2018-10-31 20:40:57 +00:00
Oliver Woodman
2dfe7a7ad6 Misc fixes / stylistic consistency changes for merged pull requests 2018-10-31 20:37:59 +00:00
ojw28
16326bae46
Merge pull request #4930 from Comcast/program_information
Add Support for Parsing ProgramInformation
2018-10-31 20:21:44 +00:00
ojw28
3b7d0b7923
Merge pull request #5004 from pakerfeldt/status-message-invalidresponsecodeexception
Provide http status message to InvalidResponseCodeException
2018-10-31 20:01:56 +00:00
Oliver Woodman
f1d31bdf4f Fix test 2018-10-31 19:49:24 +00:00
Oliver Woodman
097c045bef Resolve conflicts 2018-10-31 19:45:32 +00:00
ojw28
02573297f4
Merge pull request #4996 from YukiMatsumura/fix-idle-requirements
fix checkIdleRequirement
2018-10-31 19:17:25 +00:00
ojw28
0501b677ad
Merge pull request #4911 from Comcast/feature/hls-audio-text-id-uniqueness
Create unique id for HLS audio and text tracks
2018-10-31 19:17:14 +00:00
eguven
9d947a56f8 Add MediaChunkListIterator
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219472988
2018-10-31 17:48:08 +00:00
olly
5f6c907c65 Reset DefaultBandwidthMeter on network type change
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219454931
2018-10-31 14:00:57 +00:00
andrewlewis
7d99794bb8 Allow MP4s with truncated stco to be played
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219448836
2018-10-31 13:59:17 +00:00
andrewlewis
1094da2b61 Fix player state transitions for postroll ads
Before this change, the player state would be STATE_ENDED then
STATE_BUFFERING (when the postroll ad was marked as played) then
STATE_ENDED again.

Queueing a final content media period with start point equal to
the content duration after a postroll ensures that the player
state doesn't change to STATE_ENDED transiently.

Switch from using C.TIME_END_OF_SOURCE to C.TIME_UNSET for media
periods that should not have an end point and are not followed
by an ad.

Content media periods before postrolls have end position
C.TIME_END_OF_SOURCE. If the postroll ad loads, its content
position is set to the content duration, which should be known
at the point of loading the postroll, then a final 'empty'
content media period with start position equal to its duration
is queued. If the postroll fails to load, this empty content
media period is queued up directly after the preceding content
media period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219443683
2018-10-31 13:54:15 +00:00
olly
053a7bc0b9 Simplify DefaultDrmSession event handling
- Handling EVENT_PROVISION_REQUIRED is unnecessary because we handle
  it via NotProvisionedException, which was thrown on all API levels.
- Handling EVENT_KEY_EXPIRED during playback is unnecessary. All it
  does is cause an error to be thrown, but an error will be thrown
  anyway out of the MediaCodec when it tries to use the expired keys.
  It's currently a race condition where the error gets thrown from,
  where-as having it always be thrown from one place is preferable.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219172021
2018-10-31 13:50:51 +00:00
olly
7eeeb40d24 Add options for controlling audio track selection
Issue: #3314

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219158729
2018-10-31 13:49:08 +00:00
olly
069e3cbf7d Clean up DefaultTrackSelectorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219139356
2018-10-31 13:47:26 +00:00
olly
038238430b Re-enable codec re-use
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219130576
2018-10-31 13:45:45 +00:00
olly
4824f352de Decouple input format and codec format
This paves the way to cleanly fix the first two issues
listed in [] onDisabled will null inputFormat,
but nulling of codecFormat will remain tied to the codec
being released.

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219125458
2018-10-31 13:44:03 +00:00
eguven
5de17b9adc Add support for playing spherical videos on Daydream
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219119888
2018-10-31 13:42:19 +00:00
olly
194d0f3331 Add a bit of structure DefaultTrackSelector, for sanity
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219109829
2018-10-31 13:38:51 +00:00
eguven
ed32e2a7f7 Add TrackSelectionUtil.getAverageBitrate method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218877191
2018-10-31 13:37:06 +00:00