5656 Commits

Author SHA1 Message Date
olly
028f3e6438 Don't recreate the audio decoder if Format is unchanged
More specifically, if the parts of the Format that are used
for decoder configuration are unchanged.

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214791234
2018-09-27 19:53:03 +01:00
Oliver Woodman
1dd0533af6 Merge branch 'release-v2' into dev-v2 2018-09-27 19:39:42 +01:00
ojw28
afba6386d3
Merge pull request #4881 from google/dev-v2-r2.9.0
r2.9.0
2018-09-27 19:38:12 +01:00
Oliver Woodman
1f9a003b4b Merge branch 'release-v2' into dev-v2-r2.9.0 2018-09-27 19:37:04 +01:00
tonihei
150e54b560 Fix issue with stale createPeriod events in ConcatenatingMediaSource.
If a source is removed from the playlist, the player may still call createPeriod
for a period of the removed source as long as the new timeline hasn't been handled
by the player. These events are stale and can be ignored by using a dummy media
source. The stale media period will be released when the player handles the updated
timeline.

Issue:#4871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214787090
2018-09-27 17:55:09 +01:00
andrewlewis
66c9d41ba0 Update release notes for 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214784773
2018-09-27 17:54:55 +01:00
tonihei
827ea63657 Fix issue with stale createPeriod events in ConcatenatingMediaSource.
If a source is removed from the playlist, the player may still call createPeriod
for a period of the removed source as long as the new timeline hasn't been handled
by the player. These events are stale and can be ignored by using a dummy media
source. The stale media period will be released when the player handles the updated
timeline.

Issue:#4871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214787090
2018-09-27 17:51:22 +01:00
andrewlewis
a394ab7be3 Update release notes for 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214784773
2018-09-27 17:49:52 +01:00
aquilescanta
e50214a5a1 Add constructor for adding payload reader factory flags
Issue:#4861

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214772527
2018-09-27 17:48:10 +01:00
aquilescanta
2a50621118 Use media item in the cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214750185
2018-09-27 17:46:27 +01:00
cblay
d487b599f8 Also plumb new Timeline through to TrackSelector.selectTracks() so periodId is useful
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214650418
2018-09-27 17:44:40 +01:00
cblay
3073d38a5a Pass MediaPeriodId to TrackSelector.selectTracks()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214638939
2018-09-27 17:42:57 +01:00
aquilescanta
776ad20a50 Add a MediaQueue abstraction to the cast extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214598078
2018-09-27 17:41:10 +01:00
aquilescanta
1bb7ec8203 Make DefaultLoadErrorHandlingPolicy non-final
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214584874
2018-09-26 13:20:26 +01:00
aquilescanta
a8efa27fab Make DefaultLoadErrorHandlingPolicy non-final
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214584874
2018-09-26 13:06:47 +01:00
eguven
c9ebaacae0 Use GlUtil class to share GL methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214582295
2018-09-26 13:05:17 +01:00
tonihei
b2e0a365d3 Add convenience methods player.next() and player.previous()
This simplifies code skipping items in a playlist programatically.

Issue:#4863

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214580742
2018-09-26 13:03:39 +01:00
aquilescanta
083350b7db Do not retry failed loads whose error is FileNotFoundException
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214277073
2018-09-26 13:02:02 +01:00
olly
d92787b58d Don't request session sharing on CDMs that don't support it
Issue: #4834

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214258163
2018-09-24 15:43:22 +01:00
olly
b0cd6cf622 Allow configuration of DefaultLoadControl back buffer
Issue: #4857

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214254231
2018-09-24 15:43:10 +01:00
andrewlewis
614f964cfe Update README for libvpx 1.7.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214227045
2018-09-24 15:42:59 +01:00
olly
321393e7cf Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213979058
2018-09-24 15:42:49 +01:00
eguven
e86d5efb21 Recenter SphericalSurfaceView view on startup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214261973
2018-09-24 15:36:10 +01:00
olly
c934ce744d Don't request session sharing on CDMs that don't support it
Issue: #4834

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214258163
2018-09-24 15:34:43 +01:00
olly
34c37596dd Allow configuration of DefaultLoadControl back buffer
Issue: #4857

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214254231
2018-09-24 15:33:06 +01:00
andrewlewis
56f4717465 Update README for libvpx 1.7.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214227045
2018-09-24 15:31:25 +01:00
olly
275cfd9e77 Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213979058
2018-09-24 15:29:56 +01:00
Arnold Szabo
876080ed1a #4306 - code review fixes 2018-09-21 15:05:43 +03:00
tonihei
108a7099e4 Add missing calls to LoadControl.onTracksSelected.
This method needs to be called whenever the track selection of the current
loading period changes, but also when the loading period itself (and thus
the "loading track selection") changes. These are the same situations in which
we update the loading media period id and thus we can move both updates in
a common helper method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213959982
2018-09-21 12:39:43 +01:00
olly
edf7561b9f Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213951977
2018-09-21 12:39:35 +01:00
andrewlewis
b79156c334 Propagate output format in tunneling mode
From API 23 this uses the timed format queue. Before API 23 the
format is notified as soon as the buffer is queued.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213830729
2018-09-21 12:39:28 +01:00
andrewlewis
b58daf8dc5 Reset start trim only if input was queued
Before this change we would reset the start trim to zero after initial
configuration (at the start of playback) and after seeking to any position. The
fact that no trimming was applied at the start of playback meant that after the
first period transition we'd see a mismatch between the next buffer timestamp
(equal to the duration of the period taking into account edits) and the duration
of audio submitted to the sink.

This change modifies the behavior so that we reset the start trim to zero only
if some audio was queued since configuration. This is incorrect in the case of
starting playback at a non-zero position, but fixes the common case of starting
at zero. As before, a later seek to any position is handled via a flush and
resets the trim as required.

Transitions from one period to the next are unaffected by this change.

One way to implement start trimming correctly would be to provide the input
buffer timestamp to the audio processors and only trim when handling audio from
the start of the stream, but that is a larger change so left for later.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213828511
2018-09-21 12:39:19 +01:00
andrewlewis
a5fc7883a6 Add IMA tests to presubmit
Also fix internal build by adding some methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213828434
2018-09-21 12:39:09 +01:00
andrewlewis
7e55a6311f Fix ImaAdsLoaderTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213824217
2018-09-21 12:39:00 +01:00
andrewlewis
1c07b95fbb 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:38:50 +01:00
tonihei
d411ace97d Add missing calls to LoadControl.onTracksSelected.
This method needs to be called whenever the track selection of the current
loading period changes, but also when the loading period itself (and thus
the "loading track selection") changes. These are the same situations in which
we update the loading media period id and thus we can move both updates in
a common helper method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213959982
2018-09-21 12:21:18 +01:00
olly
bd3bf3fc8d Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213951977
2018-09-21 12:19:48 +01:00
andrewlewis
03fe503f1c Propagate output format in tunneling mode
From API 23 this uses the timed format queue. Before API 23 the
format is notified as soon as the buffer is queued.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213830729
2018-09-21 12:18:12 +01:00
andrewlewis
300dc05e85 Reset start trim only if input was queued
Before this change we would reset the start trim to zero after initial
configuration (at the start of playback) and after seeking to any position. The
fact that no trimming was applied at the start of playback meant that after the
first period transition we'd see a mismatch between the next buffer timestamp
(equal to the duration of the period taking into account edits) and the duration
of audio submitted to the sink.

This change modifies the behavior so that we reset the start trim to zero only
if some audio was queued since configuration. This is incorrect in the case of
starting playback at a non-zero position, but fixes the common case of starting
at zero. As before, a later seek to any position is handled via a flush and
resets the trim as required.

Transitions from one period to the next are unaffected by this change.

One way to implement start trimming correctly would be to provide the input
buffer timestamp to the audio processors and only trim when handling audio from
the start of the stream, but that is a larger change so left for later.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213828511
2018-09-21 12:16:32 +01:00
andrewlewis
d0fb4b4729 Add IMA tests to presubmit
Also fix internal build by adding some methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213828434
2018-09-21 12:14:51 +01:00
andrewlewis
e90d36cb69 Fix ImaAdsLoaderTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213824217
2018-09-21 12:13:13 +01:00
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
Oliver Woodman
7d90396c27 Cleanup 2018-09-20 12:55:10 +01:00
ojw28
1e3c2a6b37 Merge pull request #4801 from nicklasl/trackselector-filter-on-framerate
Trackselector filter on framerate
2018-09-20 12:54:56 +01:00
Oliver Woodman
4b33d3c8a2 Cleanup 2018-09-20 12:46:31 +01:00
ojw28
2a235184c0
Merge pull request #4801 from nicklasl/trackselector-filter-on-framerate
Trackselector filter on framerate
2018-09-20 12:40:13 +01:00
tonihei
b07eef6d44 Fix drm nullability warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213650027
2018-09-20 12:32:10 +01:00
tonihei
6323c1904f Stop overriding deprecated method.
Fixed and random track selection were still overriding the deprecated version
of updateSelectedTrack.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213637728
2018-09-20 12:30:38 +01:00
tonihei
5c1829f063 Deprecate FixedTrackSelecion.Factory.
The only use of track selection factories is as adaptive track selection factories
in the DefaultTrackSelector. Using the fixed track selection factory here is dangerous
as it will throw if more than one track is selected.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213637500
2018-09-20 12:29:00 +01:00
olly
64b50ff9e6 Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213599127
2018-09-20 12:27:18 +01:00