725 Commits

Author SHA1 Message Date
olly
8c793184d9 Fix crash when bad VTT timestamp encountered
Issue: #3396

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173868849
2017-11-01 14:05:11 +00:00
Oliver Woodman
d02e1df4b4 Clean up VideoFrameReleaseTimeHelper 2017-10-27 19:22:59 +01:00
ojw28
eb54da596d
Merge pull request #3345 from drhill/dev-v2_framerate_switch
make videoframereleasetimehelper get refresh rate when it's enabled, …
2017-10-27 18:54:38 +01:00
olly
dd5905a9fb Don't query empty timeline for next/previous windows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173668909
2017-10-27 16:31:21 +01:00
olly
3285851147 Pass prepareAcks in SourceInfo
This makes it a bit more obvious what's going on during
preparation. In particular, it makes it clear that
MSG_SOURCE_INFO_REFRESHED arrives before MSG_TRACKS_CHANGED.

Issue: #3362

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173392080
2017-10-27 16:17:05 +01:00
eguven
8b3ec4800c Set cause of the exceptions in AtomicFile.startWrite()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173388899
2017-10-27 16:15:34 +01:00
olly
3c201a0491 Pass MediaSource instance through onSourceInfoRefreshed
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173382423
2017-10-27 16:13:59 +01:00
olly
88b6df1d08 Disable secure DummySurface on Samsung devices on API level 25
Issue: #3373

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173381588
2017-10-27 16:12:34 +01:00
andrewlewis
7c18baa23f 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=173379623
2017-10-27 16:10:45 +01:00
mishaque
5a91a71cd0 Make CronetDataSource interruptable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173262660
2017-10-27 16:07:30 +01:00
olly
ea764b1b79 Fix retry count for live streams in ExtractorMediaPeriod
Also simplify boolean condition in ExtractorMediaSource

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173247443
2017-10-27 16:06:01 +01:00
olly
e5e984f4c6 Re-order events into more of a natural ordering
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173232494
2017-10-27 16:04:33 +01:00
olly
c4f3cad586 Better behavior if media doesn't support DRM scheme
We don't expect this case to occur, since track selection is
normally expected to check canAcquireSession before selecting
a track. Nevertheless, if an attempt is made to acquire a
session when the media doesn't support the manager's UUID, we
should fail in a more graceful way.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173124170
2017-10-27 16:01:40 +01:00
olly
3289e3e9cb Be robust against provideProvisionResponse throwing unchecked exceptions
Other catch blocks in this class catch everything. This one should
too.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173118891
2017-10-27 16:00:15 +01:00
andrewlewis
43d70bdde9 Ignore seekTo if an ad is playing
Issue: #3309

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173114842
2017-10-27 15:58:51 +01:00
olly
82edf01c22 Re-use single session when multiSession disabled
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173098862
2017-10-27 15:55:46 +01:00
andrewlewis
9306b24c65 Fix some Android Studio inspection warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173085316
2017-10-27 15:54:17 +01:00
eguven
9568802c6d Persist DownloadActions in DownloadManager
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172875067
2017-10-27 15:52:41 +01:00
Drew Hill
2081667591 cleanups for videoframereleasetimehelper 2017-10-24 11:19:26 -04:00
Drew Hill
3830307cd3 fix not initialized error 2017-10-19 20:28:49 -04:00
Drew Hill
84afad0748 adjustments 2017-10-19 16:24:41 -04: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
Drew Hill
feff4d3e02 fix missing cause of display refresh rate changing between videoframereleasetimehelper constructor and enable being called 2017-10-19 12:49:51 -04:00
Oliver Woodman
64b928e77f Stylistic cleanup 2017-10-19 17:28:24 +01:00
ojw28
28bd4661ed Merge pull request #3371 from andymiao858/dev-v2
Fix FLV AVCVIDEOPACKET  CTS Type Issue
2017-10-19 17:23:50 +01:00
eguven
7d0ec68d86 Put DownloadTasks on hold until preceding conflicting tasks are complete
Tasks conflict if both of them work on the same media and at least one
of them is remove action.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172741795
2017-10-19 16:52:43 +01:00
andrewlewis
bb3dea5191 Remove USE_CHORD_PITCH
We have been using USE_CHORD_PITCH == false for a while and the quality of
pitch changes seems fine. It's now possible to set the sample rate too, but
this only works if USE_CHORD_PITCH is false, so remove the constant.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172736631
2017-10-19 16:51:29 +01:00
andrewlewis
08706f9bfb Retain playback position on re-preparation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172736350
2017-10-19 16:50:04 +01:00
olly
d09f872179 Fix positions passed to TrackSelection
- When transitioning to a new period, the value of bufferedDurationUs
  passed to TrackSelection.updateSelectedTrack was incorrectly set to
  0. It should have been set to correctly reflect buffered media in
  previous periods still being played out.
- This change fixes the issue described above, and also propagates the
  playback position through to this method. The position of the next
  load within the period can be calculated by adding the position and
  bufferedDurationUs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172736101
2017-10-19 16:48:39 +01:00
aquilescanta
2cfc478c3e Allow extractor injection for HLS
Issue:#2748

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172726367
2017-10-19 16:47:04 +01:00
andrewlewis
eb08e1a5c3 Work around AudioTrack Bluetooth connection issue
If connecting a Bluetooth audio device fails, the AudioTrack may be left in a
bad state, where it is not actually playing and its position has jumped back to
zero. Detect and work around this case by resetting the track.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172600912
2017-10-19 16:42:52 +01:00
olly
b8ef1dcc78 Fix MediaPeriod position param Javadoc.
prepare and selectTracks receive the position from which any
loading should start, where-as continueLoading receives the
actual playback position. These are different in the case that
a previous period is still being played out.

Also removed "relative to the start of the period" from prepare
documentation because it couldn't really be relative to anything
else.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172592769
2017-10-19 16:41:23 +01:00
andrewlewis
1e79d6eb84 Fix seeking with repeated periods
newPlayingPeriodHolder could be set then updated if seeking to a repeated period
that was loaded more than once. This led to MediaPeriodHolders leaking.

Only set newPlayingPeriodHolder once so that any later holders with the same
period identifier get released.

Also add a regression test. FakeMediaSource checks that all created
MediaPeriods were released when it is released.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172591937
2017-10-19 16:39:57 +01:00
olly
fc5e8ee516 Add some additional device specific workarounds
Issue: #3355
Issue: #3257

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172587141
2017-10-19 16:37:10 +01:00
苗华栋(Rabbit)
69e50a43a8 add readSignedInt24 in ParsableByteArray 2017-10-19 23:18:12 +08:00
miaohuadong
5895884c53 Fix bug 2017-10-19 14:10:18 +08:00
苗华栋(Rabbit)
4f8f87221e Fix FLV AVCVIDEOPACKET -> compositionTimeMs Type from UI 24 to SI 24 2017-10-18 23:03:26 +08:00
andrewlewis
f9249d23ea Add an extractor flag for ignoring edit lists
Issue: #3358

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172464053
2017-10-17 18:28:39 +01:00
olly
2c10e6f1c3 We're not playing an ad if the timeline is empty.
Issue: #3334

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172447125
2017-10-17 18:27:26 +01:00
andrewlewis
ac31dc7c7a Allow setting output sample rate in SonicAudioProcessor
This is not really useful with the DefaultAudioSink, but could be used in a
custom AudioSink when mixing audio from sources that have different sample
rates.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172434482
2017-10-17 18:24:53 +01:00
andrewlewis
9356363117 Document load() exceptions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172329677
2017-10-17 18:22:14 +01:00
aquilescanta
d0758c9393 Fix typo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172328148
2017-10-17 18:20:49 +01:00
olly
ebf19c4028 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172133622
2017-10-16 12:52:02 +01:00
Oliver Woodman
29ba640351 Delete accidentally added files 2017-10-13 23:14:49 +01:00
Oliver Woodman
12513e9898 Tweak recently merged pull requests 2017-10-13 20:40:08 +01:00
ojw28
40d8b29c9e Merge pull request #3328 from ValveSoftware/dev-v2-multiversion
Allow multiple PSSH boxes for same system
2017-10-13 20:29:44 +01:00
olly
cad88512f5 Only parse common-encryption sinf boxes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172124807
2017-10-13 19:57:03 +01:00
olly
2fee010938 Workaround/Fix #3351
1. Ignore edit list where the sequence doesn't contain a sync
   sample, rather than failing.
2. Make Mp4Extractor.readAtomPayload so it doesn't try and read
   the same payload twice if a failure occurs parsing it.
3. Make processAtomEnded so that it doesn't pop the moov if
   parsing it fails.

Issue: #3351

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172106244
2017-10-13 19:55:50 +01:00
tonihei
b71effb7b0 Fix MobileHarness playback tests.
This change fixes various issues:
 - MobileHarness sometimes allocated devices with SDK < 16. As we have no tests running
   on these SDKs, a new dimension filter for the mobile_test target ensures that only
   devices with SDK >= 16 are selected. A similar filter for SDK version is also added
   to the ABR playback tests to ensure no old devices are selected.
 - DRM specific tests are skipped for Api < 18, but were not able to run because the
   DashTestRunner class tried to link to the MediaDrm constructor. Moved the
   constructor to a seperate Builder class to allow execution on Api levels 16 and 17.
 - DashWidevineOfflineTest also tried to access code for Api >= 18 without checking
   the current level.
 - Action implementations which are waiting for events did not ensure that they have a
   nextAction to wait for. This caused NullPointerExceptions when this next action was
   scheduled.
 - DefaultDrmSession always restored the offline keys when a new license was requested,
   even if the keys were already restored. These repeated slow calls to restoreKeys
   resulted in high numbers of dropped buffers.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171974859
2017-10-13 19:50:20 +01:00
Drew Hill
3a1a032fa8 change to use displaymanager listener for refresh rate updating 2017-10-12 14:52:14 -04:00