9060 Commits

Author SHA1 Message Date
ibaker
eb8c174b4c Update WebVttCueParser to parse position alignment values
Currently we assume these are "start", "center", "middle" or "end",
which was correct in a previous draft of the spec:
https://www.w3.org/TR/2014/WD-webvtt1-20141111/#dfn-webvtt-text-position-cue-setting

The released spec uses "line-left", "center" and "line-right":
https://www.w3.org/TR/webvtt1/#webvtt-position-cue-setting

PiperOrigin-RevId: 307371066
2020-04-20 13:29:44 +01:00
Oliver Woodman
ad3fb3d05c Merge pull request #7247 from vadimdolgachev:subtitle_track_name_for_matroska
PiperOrigin-RevId: 307368176
2020-04-20 13:29:34 +01:00
andrewlewis
ccdd1a43c2 Fix AdsMediaSource child sources not being released
Also add unit tests for AdsMediaSource.

PiperOrigin-RevId: 307365492
2020-04-20 13:29:23 +01:00
andrewlewis
02af670a0f Fix gapless playback
Audio processors are now flushed twice after reconfiguration.
The second flush call cleared the pending trim start bytes so
transitions between tracks were no longer gapless.

Fix this by removing logic to clear pending trim bytes on flush.
As a result we may trim data incorrectly if there is a flush
before any data has been handled for seeking to a non-zero
position, but this edge case will happen rarely and the effect
shouldn't be noticeable.

PiperOrigin-RevId: 307344357
2020-04-20 13:29:14 +01:00
olly
fea4376779 Merge trick play tracks into main track groups
Issue: #6054
PiperOrigin-RevId: 307285068
2020-04-20 13:29:05 +01:00
bachinger
8ea33e2315 Support ad tag with default media source
This is the missing attribute to support all features of the Sample with MediaItem. Hence PlayerActivity can use the setMediaItems() method directly without creating actual media sources in the app code.

PiperOrigin-RevId: 307102036
2020-04-20 13:28:56 +01:00
ibaker
9937744f0e Improve the error message when an extractor dump file is not found
PiperOrigin-RevId: 307078446
2020-04-20 13:28:47 +01:00
olly
7ea83d7167 Better tie injection of Cache/CacheDataSource/CacheKeyFactory
PiperOrigin-RevId: 307056661
2020-04-20 13:28:38 +01:00
Oliver Woodman
704993ce7c Merge pull request #7210 from nebyan:CacheKeyFactoryNotUsed
PiperOrigin-RevId: 307045655
2020-04-20 13:28:27 +01:00
tonihei
7350981ef9 Use higher level interface for method parameters where possible.
This makes it easier to use the helper methods because the player doesn't
have to be assigned to a SimpleExoPlayer in all cases.

PiperOrigin-RevId: 307039126
2020-04-20 13:28:16 +01:00
ibaker
ece8d22357 Remove a suppression introduced by the checker-framework 3.3.0 upgrade
Update the comment on a suppression of Field.get(null) which is safe
but blocked by the checker.

These suppressions were introduced in d1e0572448

PiperOrigin-RevId: 307036441
2020-04-20 13:28:07 +01:00
tonihei
ca2105d50c Wait with throwing stuck buffering error until pending load is finished
We currently check for shouldContinueLoading, which is the intention to load,
not playbackInfo.isLoading, which is the actual loading state, when detecting
stuck buffering issues.

They only differ if the LoadControl said stop loading (based on nextLoadPosition),
but there is still a load in flight (updating bufferedPosition). This may cause
the exception to be thrown in edge cases that are only temporary.

PiperOrigin-RevId: 307022608
2020-04-20 13:27:57 +01:00
ibaker
15bbd181e5 Add Format.label to the extractor test dumps
Needed to test issue:#7247

PiperOrigin-RevId: 307016276
2020-04-20 13:27:48 +01:00
bachinger
abadc76872 Merge pull request #7245 from Clement-Jean:silence-media-source-factory
PiperOrigin-RevId: 307010600
2020-04-17 10:44:42 +01:00
kimvde
63da73df00 Add tests for ID3 in Mp3Extractor
PiperOrigin-RevId: 306844582
2020-04-17 10:44:32 +01:00
andrewlewis
efaa98eecf Fix TeeAudioProcessor sink configuration
TeeAudioProcessor needs to configure its sink when it is initially set up.

PiperOrigin-RevId: 306808871
2020-04-17 10:44:24 +01:00
bachinger
d7280f096f Add custom cache key to media item
This is required to migrate the PlayerActivity away from Sample to MediaItem. It hence needs adding buildUpon to MediaItem to mix in the customCacheKey and streamKeys before playback.

PiperOrigin-RevId: 306710643
2020-04-17 10:44:16 +01:00
bachinger
88de774587 Merge pull request #6270 from TiVo:p-iframe-only-playlist
PiperOrigin-RevId: 306677468
2020-04-17 10:44:06 +01:00
kimvde
ed977d1429 Test and fix H265Reader
- Update H265Reader to output the same samples after a seek to 0.
- Add a TsExtractor test for H.265.

PiperOrigin-RevId: 306675050
2020-04-17 10:43:57 +01:00
vadim
fe733428de Add saving subtitle track name for MatroskaExtractor 2020-04-16 22:22:53 +07:00
Clement Jean
3c655981d4 Add tag and Factory to SilenceMediaSource 2020-04-16 22:28:48 +08:00
ibaker
7214ad2d6f Use FrameLayout instead of ViewGroup for Subtitle(Web)View
This is a more specific ViewGroup subclass that handles some of the
layout logic automatically. It's designed to work best with a single
child view, as used here.

PiperOrigin-RevId: 306654947
2020-04-15 17:42:19 +01:00
olly
ba0028ca2c Parse trick-play role flags from DASH manifests
Issue: #6054
PiperOrigin-RevId: 306641689
2020-04-15 17:42:19 +01:00
aquilescanta
50926658b6 Avoid throwing an exception for sample default values
Allows playback of content when the default value is
not valid, but not used for any samples.

Issue: #7207
PiperOrigin-RevId: 306631376
2020-04-15 17:42:19 +01:00
christosts
91690f06ed Add Clock#currentTimeMillis()
PiperOrigin-RevId: 306602043
2020-04-15 17:42:19 +01:00
tonihei
823419761f Allow custom playback session id generator.
This allows users to inject their own session id logic.

PiperOrigin-RevId: 306597785
2020-04-15 17:42:19 +01:00
aquilescanta
4d22121cde Capitalize r's in HlsMediaPlaylist byte ranges
PiperOrigin-RevId: 306504969
2020-04-15 17:42:19 +01:00
olly
6cff8a6ad0 Don't select trick-play tracks by default
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306504362
2020-04-15 17:42:18 +01:00
olly
a99288a6fa Pass UriSample to DownloadTracker
PiperOrigin-RevId: 306469450
2020-04-15 17:42:18 +01:00
olly
66f1c04445 Fix capabilities check for low frame-rate content
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306437452
2020-04-15 17:42:18 +01:00
aquilescanta
edc25ddc8d Fix javadoc typo
PiperOrigin-RevId: 306431216
2020-04-15 17:42:18 +01:00
tonihei
6a491e1294 Verify MediaSources passed to set/addMediaSources are non-null.
Even though they are annotated as non-null, Java users can pass in null values.
So we should verify the input to fail fast.

PiperOrigin-RevId: 306425487
2020-04-15 17:42:18 +01:00
tonihei
76ad0bc4ff Fix NPE in AdaptiveBitrateTest due to missing Looper.
The new TestExoPlayer.Builder asserts that a Looper is present in
the constructor, although it can be set later for cases where no
such Looper exists.

PiperOrigin-RevId: 306403491
2020-04-15 17:42:18 +01:00
ibaker
af81238c92 Delete ExtractorAsserts.assertThrows
This doesn't seem to be used anywhere

PiperOrigin-RevId: 306391995
2020-04-15 17:42:18 +01:00
olly
d1e0572448 Suppress warnings in preparation for Checker Framework 3.3.0 upgrade.
PiperOrigin-RevId: 305810757
2020-04-15 17:36:11 +01:00
ibaker
2dafb8fd69 Disallow FakeTrackOutput.format() without sampleMetadata() in between
In general an extractor shouldn't be outputting multiple formats with
no samples in between.

PiperOrigin-RevId: 305674393
2020-04-09 16:44:31 +01:00
ibaker
dfd5c512f6 Tweak PassthroughSectionPayloadReader to allow timestamp to change
PiperOrigin-RevId: 305674374
2020-04-09 16:44:19 +01:00
ibaker
d9a8622bd5 Eagerly set the format in PassthroughSectionPayloadReader.init
This reverts 94315ab757

This fixes issue:#7177

PiperOrigin-RevId: 305674114
2020-04-09 16:44:07 +01:00
gyumin
e250900a57 Add mute/unmute to DeviceComponent
PiperOrigin-RevId: 305648273
2020-04-09 16:43:54 +01:00
nebyan
a944b5cc4c CacheKeyFactory is not used. 2020-04-09 14:34:00 +03:00
kimvde
d33c5ac0b3 Improve tests and samples naming in TsExtractor
PiperOrigin-RevId: 305526093
2020-04-08 21:49:12 +01:00
olly
2e51182f53 Update misc dependencies
PiperOrigin-RevId: 305503804
2020-04-08 21:49:03 +01:00
kimvde
afc2858ad0 Add PsExtractor test for AC3
PiperOrigin-RevId: 305503256
2020-04-08 21:48:54 +01:00
olly
376d02ac3f Upgrade cast dependency
Issue: #7191
PiperOrigin-RevId: 305502293
2020-04-08 21:48:45 +01:00
kimvde
dc80cf32b6 Add TsExtractor tests for LATM and H264
PiperOrigin-RevId: 305475709
2020-04-08 21:48:36 +01:00
gyumin
dbfb6b183c Implement DeviceComponent of SimpleExoPlayer
PiperOrigin-RevId: 305460260
2020-04-08 21:48:27 +01:00
christosts
7504ce763e Add QoePingStore and QoePingItem
This is the first CL for the offline qoe reporting
feature. Refer to the design doc for full information.

Design doc: go/exoplayer-offline-qoe

PiperOrigin-RevId: 305459231
2020-04-08 21:48:18 +01:00
christosts
e7fd6a0e01 SimpleExoplayer Builder for testing
Create a Builder that creates SimpleExoPlayer instances with fake
components, suitable for testing.

Basically extracts the Builder from ExoPlayerTestRunner to a standalone
class that can be re-used.

PiperOrigin-RevId: 305458419
2020-04-08 21:48:08 +01:00
kimvde
703fb777c4 Optimize extractors sniffing order
Issue: #6410
PiperOrigin-RevId: 305436352
2020-04-08 21:47:58 +01:00
bachinger
4e2a0f6032 simplify PlayerActivity towards using the media item only
PiperOrigin-RevId: 305300409
2020-04-08 21:47:48 +01:00