aquilescanta
0670782de8
Avoid using trickplay variants for preparing an HLS stream
...
PiperOrigin-RevId: 324810361
2020-08-07 19:00:38 +01:00
olly
71fd335bcd
Simplify output format propagation
...
PiperOrigin-RevId: 324805335
2020-08-07 19:00:28 +01:00
olly
4d03d30890
Audio extension decoders: Pass decoder to getOutputFormat
...
It seems generally useful to have access to the decoder in
getOutputFormat. We're currently working around lack of access
by using member variables in the concrete audio extension
renderers. In the case of the Ffmpeg extension, holding a
reference to the decoder is preventing it from being garbage
collected when the decoder is released by the base class.
PiperOrigin-RevId: 324799670
2020-08-07 19:00:18 +01:00
tonihei
a6be8eeb6b
Prevent extractor reuse after upstream discard.
...
After discarding upstream we shouldn't reuse the extractor from the
(newly) last media chunk because the extractor may have been reused
already by the discarded chunks.
Also add an assertion to SampleQueue that prevents the hard-to-detect
failure mode of overlapping sample byte ranges.
Issue: #7690
PiperOrigin-RevId: 324785093
2020-08-07 19:00:09 +01:00
tonihei
33af7a4536
Don't log mediaId in EventLogger and DefaultMediaSourceFactory.
...
The media id defaults to the URI that shouldn't be logged to logcat.
PiperOrigin-RevId: 324770157
2020-08-07 18:59:59 +01:00
olly
b2ea48f4e2
Fix parameter comments that don't match the formal parameter name
...
More information:
https://docs.google.com/a/google.com/document/d/1lzK04DqCZgjOoGQfBT053QIrCvlsyAAwLo0jfqcN6ds/edit?usp=sharing
Tested:
TAP --sample ran all affected tests and none failed
http://test/OCL:324422822:BASE:324408434:1596318556672:a8b3beed
PiperOrigin-RevId: 324621068
2020-08-07 18:59:40 +01:00
christosts
f4287ed070
Add a builder for DownloadRequest
...
PiperOrigin-RevId: 324616617
2020-08-07 18:59:30 +01:00
christosts
129ef7ccd4
DefaultMediaSourceFactory sets the offline license
...
PiperOrigin-RevId: 324610991
2020-08-07 18:59:21 +01:00
olly
be88143fcd
Remove deprecated parts of demo app IntentUtil
...
PiperOrigin-RevId: 324604419
2020-08-07 18:59:11 +01:00
olly
5c879ac8f8
Final string import for 2.12
...
PiperOrigin-RevId: 324579230
2020-08-07 18:58:51 +01:00
andrewlewis
9392dff225
Call VideoAdPlayerCallback.onLoaded
...
This callback was not notified before, which could theoretically lead to ad
loading timing out. In practice it doesn't currently happen because the timeout
appears to start when the ad cue point is reached, not when loadAd is called.
We notify onLoaded when the ad media period is prepared (for HTML5 the
recommendation is to notify on the HTMLMediaElement 'canplay' event, which this
roughly corresponds to).
PiperOrigin-RevId: 324568407
2020-08-07 18:58:31 +01:00
olly
42a7083b5c
FragmentedMp4Extractor: Fix clearHeaderSize handling
...
PiperOrigin-RevId: 324560994
2020-08-07 18:58:21 +01:00
olly
a04769f2d5
Tweak DefaultDrmSessionManager Mode Javadoc
...
PiperOrigin-RevId: 324557397
2020-08-07 18:58:11 +01:00
tonihei
d625af67db
Add load cancelation support to DASH and SS
...
Issue: #7244 added this feature to HLS. This change is the exact copy
in ChunkSampleStream to add the same support to the other adaptive
formats.
Note that ChunkSampleStream doesn't support slicing, so we can't cancel
a read-from chunk, and we need to prevent reading into an already
canceled chunk load so that the chunk can be automatically discarded
after the cancelation.
Issue: #2848
PiperOrigin-RevId: 324179972
2020-08-01 12:56:39 +01:00
ibaker
c8f039f0a9
Document that ConditionVariable instances start closed
...
PiperOrigin-RevId: 324002247
2020-08-01 12:56:21 +01:00
christosts
12bd36d41a
Migrate test resettingMediaSourcesGivesFreshSourceInfo() to TestExoPlayer
...
PiperOrigin-RevId: 323985679
2020-08-01 12:56:03 +01:00
aquilescanta
6d0696a3c8
Stop auto-generating a CEA-608 track for standalone TS
...
PiperOrigin-RevId: 323811839
2020-08-01 12:55:54 +01:00
samrobinson
d6ee5b84d3
Group overloaded method together.
...
PiperOrigin-RevId: 323806853
2020-08-01 12:55:45 +01:00
krocard
6e3fc5e40a
OMX.broadcom.video_decoder.tunnel.secure needs EOS workaround
...
The passthrough codec does not propagate
the EOS back to ExoPlayer.
Issue: https://github.com/google/ExoPlayer/issues/7647
PiperOrigin-RevId: 323758941
2020-08-01 12:55:18 +01:00
christosts
33360513a2
Migrate ExoPlayerTest.readAheadToEndDoesNotResetRenderer to TestExoplayer
...
PiperOrigin-RevId: 323758590
2020-08-01 12:55:09 +01:00
christosts
075ef824ec
Migrate ExoPlayerTest.playShortDurationPeriods to use TestExoPlayer
...
PiperOrigin-RevId: 323754499
2020-08-01 12:55:00 +01:00
olly
7f10800e25
Restore wrapping of MediaCodec ISEs in MediaCodecDecoderException
...
Wrapping MediaCodec ISEs in MediaCodecDecoderException lets us attach
MediaCodecInfo, which contains lots of useful information such as the
MediaCodec name, the codec capabilities, etc.
PiperOrigin-RevId: 323575782
2020-08-01 12:54:51 +01:00
christosts
bcb9ad22af
Migrate ExoPlayerTest to use TestExoPlayer.
...
Tests playSinglePeriodTimeline and playMultiPeriodTimeline are migrated
to use TestExoplayer.
PiperOrigin-RevId: 323546141
2020-08-01 12:54:42 +01:00
christosts
ce0f814b77
Migrate ExoPlayerTest.playEmptyTimeline to TestExoPlayer
...
PiperOrigin-RevId: 323544694
2020-08-01 12:54:33 +01:00
gyumin
437275caed
Implement device info/volume methods
...
PiperOrigin-RevId: 323544314
2020-08-01 12:54:23 +01:00
olly
dc10292708
Change getCodecOperatingRate visibility.
...
PiperOrigin-RevId: 323477041
2020-08-01 12:54:14 +01:00
olly
1ed5d8b563
Rollback of bf5e6c7862
...
*** Original commit ***
Pass startPositionUs into Renderer.replaceStream
Plumb this down into BaseRenderer.onStreamChanged and use it when
deciding whether to render the first frame of a new period.
***
PiperOrigin-RevId: 323447253
2020-07-28 00:00:36 +01:00
aquilescanta
684994fe61
Remove Renderer references to Format.drmInitData
...
PiperOrigin-RevId: 323392470
2020-07-28 00:00:27 +01:00
aquilescanta
51e65ff55a
Remove canAcquireSession from DrmSessionManager
...
It's been replaced by getExoMediaCryptoType().
PiperOrigin-RevId: 323382332
2020-07-28 00:00:18 +01:00
olly
7edc4b1f1e
FLV: Ignore invalid SCRIPTDATA name type, rather than fail playback
...
Issue: #7675
PiperOrigin-RevId: 323371286
2020-07-28 00:00:10 +01:00
ibaker
67408ca7fb
Fix var-args warning in DownloadManagerTest
...
From Truth docs:
"To test that the iterable contains the same elements as an array,
prefer containsExactlyElementsIn(Object[]). It makes clear that the
given array is a list of elements, not an element itself. This helps
human readers and avoids a compiler warning."
https://truth.dev/api/1.0.1/com/google/common/truth/IterableSubject.html#containsExactly-java.lang.Object...-
PiperOrigin-RevId: 323367341
2020-07-28 00:00:01 +01:00
ibaker
fda3b3d8ec
Use static imports for methods that make sense without their class name
...
PiperOrigin-RevId: 323349585
2020-07-27 23:59:52 +01:00
ibaker
7083dbf7b4
Remove zero-args ParsableByteArray#reset() method
...
It's potentially confusing that this resets both position & limit, so
require callers to pass `limit` explicitly, or call setPosition(0)
if that's actually what they intended.
This makes enforcing the limit in an upcoming change slightly safer.
PiperOrigin-RevId: 323340485
2020-07-27 23:59:43 +01:00
ibaker
ce2e6e2fd6
Hide ParsableByteArray#data behind a getter
...
This allows us to enforce the limit because the array can only be
reassigned through reset(byte[]) or reset(byte[], int) (which update
the limit)
PiperOrigin-RevId: 323339960
2020-07-27 23:59:34 +01:00
ibaker
478f59fd08
Replace ExoPlayer's functional types with Guava alternatives
...
This removes Supplier, Function and Predicate. Consumer is kept because
Guava doesn't have an equivalent (Java 8 does, but we can't use that
yet).
#exofixit
PiperOrigin-RevId: 323324392
2020-07-27 23:59:25 +01:00
insun
f99023e887
Makes controls initially hidden
...
Also, there was a bug that controls are always shown at the beginning
even when controlview's hide() is called.
PiperOrigin-RevId: 323300617
2020-07-27 23:59:16 +01:00
olly
5fa7b879a2
Increase MP3 sniff bytes
...
MP3 is last in the sniffing order now, so I think it's fine to do this
without worrying about impacting on other file types.
PiperOrigin-RevId: 322996771
2020-07-27 23:58:58 +01:00
olly
0ce2632ad1
Clean up some Format documentation
...
- Fix spurious line break
- Try and cut down on references to other components
PiperOrigin-RevId: 322971988
2020-07-27 23:58:40 +01:00
insun
6fb28a8dc9
Hide fullscreen button if no listener is registered
...
PiperOrigin-RevId: 322912266
2020-07-24 10:48:43 +01:00
claincly
ec78bde50c
Add support for MediaCodecAudioRenderer to use float output
...
Enables the MediaCodec to use float PCM output when the sink supports
float PCM input
PiperOrigin-RevId: 322856138
2020-07-24 10:48:34 +01:00
insun
cf2a58e6dc
Fix styled ui's documents
...
#exofixit
PiperOrigin-RevId: 322854029
2020-07-24 10:48:25 +01:00
christosts
9a51681332
Update internal reference
...
#exofixit
PiperOrigin-RevId: 322791471
2020-07-24 10:48:07 +01:00
andrewlewis
c271eb85fd
Fix some nullness annotation warnings
...
PiperOrigin-RevId: 322780990
2020-07-24 10:47:49 +01:00
andrewlewis
2c82cfe5b0
Fix TextRenderer input buffer updates
...
PiperOrigin-RevId: 322780573
2020-07-24 10:47:40 +01:00
tonihei
50ddfccdb9
Use consistent scoring style in DefaultTrackSelector.
...
We currently mix point-based systems with Comparable-based systems.
This switches all scoring to using Comparable and modernizes it by
using ComparisonChain.
Using Comparator chains is more maintainable than point systems because
the reader doesn't have to think about all combinatorial combinations
of points.
PiperOrigin-RevId: 322766278
2020-07-24 10:47:31 +01:00
bachinger
d25178844c
Enable nullness checking for CacheDataSource
...
PiperOrigin-RevId: 322763032
2020-07-24 10:47:22 +01:00
christosts
daa063a0f8
Migrate MediaPeriodQueueTest to LooperMode.PAUSED
...
PiperOrigin-RevId: 322760417
2020-07-24 10:47:04 +01:00
kimvde
2cf9d9b0c0
Add nullness annotations on MediaCodecRenderer processOutputBuffer
...
Issue: #7579
PiperOrigin-RevId: 322756102
2020-07-24 10:46:55 +01:00
bachinger
b041c59f1e
Use manifest assets instead of building manifests with code
...
PiperOrigin-RevId: 322739943
2020-07-24 10:46:46 +01:00
olly
6d92eebe51
Revert Format back to only containing audio encoding for PCM
...
PiperOrigin-RevId: 322683545
2020-07-24 10:46:37 +01:00
olly
92029ed0ad
Un-deprecate Format.pcmEncoding and switch tests back to it.
...
This change precedes one that will remove Format.encoding.
PiperOrigin-RevId: 322619495
2020-07-24 10:46:28 +01:00
olly
21fe2f1edf
Make the output mode more explicit in DefaultAudioSink
...
PiperOrigin-RevId: 322609230
2020-07-24 10:46:19 +01:00
ibaker
bdadd572e2
Enable nullness checks for more easy files
...
PiperOrigin-RevId: 322586013
2020-07-24 10:46:10 +01:00
bachinger
787cfb94c5
Enable nullness checking for CacheDataSink
...
PiperOrigin-RevId: 322575337
2020-07-24 10:46:01 +01:00
ibaker
d33ba74a1d
Rename tests to reference playback speed instead of parameters
...
Player#setPlaybackParameters (and all derived methods) is deprecated in
favour of Player#setPlaybackSpeed
#exofixit
PiperOrigin-RevId: 322568198
2020-07-24 10:45:52 +01:00
ibaker
3ad1b95460
Enable nullness checking for BaseRenderer
...
#exofixit
PiperOrigin-RevId: 322567104
2020-07-24 10:45:43 +01:00
ibaker
6e751c35c7
Enable nullness checking for DefaultMediaClock
...
PiperOrigin-RevId: 322542289
2020-07-24 10:45:34 +01:00
ibaker
0efec5f6c1
Enable nullness checks for the text package
...
PiperOrigin-RevId: 322539147
2020-07-24 10:45:24 +01:00
ibaker
1c6aaac958
Merge playback speed into PlaybackInfo and update EPI and EPII
...
PiperOrigin-RevId: 322539001
2020-07-24 10:45:15 +01:00
samrobinson
78260e2021
Replacing static arrays with switch statements in MediaCodecUtil.
...
PiperOrigin-RevId: 322537851
2020-07-24 10:45:06 +01:00
christosts
433734dce7
MediaCodecVideoRendererTest: remove LooperMode.LEGACY
...
PiperOrigin-RevId: 322536247
2020-07-24 10:44:57 +01:00
bachinger
f81a353bf8
Remove onMediaPeriodCreated/Released/ReadingStarted
...
These callbacks were only necessary to track the queue in AnalyticsCollector and there is no other known benefit of having them.
PiperOrigin-RevId: 322535274
2020-07-24 10:44:48 +01:00
samrobinson
193306f2f3
Ensure audio renderer exceptions report the correct format.
...
PiperOrigin-RevId: 322534950
2020-07-24 10:44:39 +01:00
christosts
6c837643b9
Fix dependency on common module
...
PiperOrigin-RevId: 322533712
2020-07-24 10:44:30 +01:00
andrewlewis
29db445c2c
Switch operating rate bug ref to more relevant bug
...
PiperOrigin-RevId: 322533467
2020-07-24 10:44:21 +01:00
christosts
3191afe82e
Common tests do not depend on testutils
...
This commit duplicates some code from the testutils module
in common test in order to break the dependency from testutils.
PiperOrigin-RevId: 322366013
2020-07-24 10:44:02 +01:00
christosts
6ace2c9460
DefaultDownloaderFactory: upgrade deprecated call
...
Replace the use of Downloader deprecrated constructor calls.
PiperOrigin-RevId: 322357118
2020-07-24 10:43:53 +01:00
olly
d77ce9eda0
Remove deprecated calls to external APIs
...
PiperOrigin-RevId: 322346067
2020-07-24 10:43:44 +01:00
ibaker
4fbd09693a
Fix nullness error in Mp4Extractor
...
This only manifests when turning ParsableByteArray#data into a getData()
method but I'm fixing it beforehand to avoid introducing changes into a
big refactoring change.
#exofixit
PiperOrigin-RevId: 322342497
2020-07-24 10:43:35 +01:00
ibaker
e0b7263ce4
Remove SpannedSubject dependency from UtilTest
...
PiperOrigin-RevId: 322341513
2020-07-24 10:43:25 +01:00
christosts
34a887e2d3
Common module tests depend on core
...
PiperOrigin-RevId: 322325657
2020-07-24 10:43:16 +01:00
olly
132c9d15e3
UI module string cleanup
...
PiperOrigin-RevId: 322323784
2020-07-24 10:43:07 +01:00
ibaker
7ed729b175
Fix warning about int overflowing before being assigned to long
...
#exofixit
PiperOrigin-RevId: 322322340
2020-07-24 10:42:57 +01:00
olly
899a78fca9
StyledPlayerControlView: Some cleanup
...
PiperOrigin-RevId: 322317638
2020-07-24 10:42:48 +01:00
insun
63ca2b00fb
Resolve styled controls crash on pre-API 21
...
When building a demo app without recent gradle (ex. blaze)
it crashes.
PiperOrigin-RevId: 322313886
2020-07-24 10:42:39 +01:00
olly
7b4d7d9aa4
Remove invalid documentation that causes javadoc to crash
...
PiperOrigin-RevId: 322311636
2020-07-24 10:42:30 +01:00
kimvde
34ed79e6d9
Remove nullness warnings in extractors
...
#exofixit
PiperOrigin-RevId: 322311309
2020-07-24 10:42:21 +01:00
kimvde
8dd564c9a8
Remove Mp4Extractor from nullness exclusion list
...
PiperOrigin-RevId: 322310474
2020-07-24 10:42:12 +01:00
tonihei
08f62efb88
Remove experimental time limit on renderer loop.
...
PiperOrigin-RevId: 322172767
2020-07-24 10:41:54 +01:00
christosts
aed5aca3dd
ActionFileUpgradeUtil: add more tests action files
...
Add test action files for DASH, HLS, SmoothStreaming and Progressive.
PiperOrigin-RevId: 322166875
2020-07-24 10:41:36 +01:00
andrewlewis
9594aa45ff
Move functionality from DemoApplication to DemoUtil
...
https://developer.android.com/reference/android/app/Application recommends
against subclassing application.
PiperOrigin-RevId: 322163812
2020-07-24 10:41:27 +01:00
tonihei
97cc355baf
Fix bug in downloader proguard config.
...
The nested class names need to use a $ sign.
PiperOrigin-RevId: 322156862
2020-07-24 10:41:18 +01:00
olly
6eb706002a
Migrate to Robolectric PAUSED looper mode: AudioFocusManagerTest
...
PiperOrigin-RevId: 322154193
2020-07-24 10:41:09 +01:00
olly
576ef82191
Remove explicit use of Robolectric PAUSED looper mode
...
It's now the default everywhere, so there's no need to specify it
explicitly.
PiperOrigin-RevId: 322153319
2020-07-24 10:41:00 +01:00
olly
302b5f2ba4
Remove unnecessary use of Robolectric LEGACY looper mode
...
CacheDataSourceTest2 works fine in PAUSED mode as well.
PiperOrigin-RevId: 322150471
2020-07-24 10:40:51 +01:00
bachinger
7c995a3cfa
Fix javaDoc of onMediaItemTransition
...
PiperOrigin-RevId: 322145517
2020-07-24 10:40:42 +01:00
olly
0cd15d9158
Proactively check listener arguments are non-null
...
PiperOrigin-RevId: 322143359
2020-07-24 10:40:24 +01:00
tonihei
953db7898e
Make dependency on AndroidX appcompat optional for dialog builder.
...
The dependency is only used to create a dialog in
TrackSelectionDialogBuilder that is compatible with newer styling
options.
This dependendy adds over 500Kb to the apk (even if unused) and we
shoudn't force this on an app. Instead make the dependency optional by
automatically falling back to the platform version if the AndroidX one
doesn't exist.
Issue: #7357
PiperOrigin-RevId: 322143005
2020-07-24 10:40:15 +01:00
kimvde
ee222f7027
Remove AtomParsers from extractors nullness exclusion list
...
PiperOrigin-RevId: 322131697
2020-07-24 10:40:06 +01:00
aquilescanta
ecc834d704
Make DrmSessionManager.getExoMediaCryptoType cover placeholder sessions
...
getExoMediaCryptoType will only return null for drmInitData == null and
track types for which placeholder sessions are not used. This change
will allow renderers to abstract themselves from format.drmInitData.
PiperOrigin-RevId: 322131219
2020-07-24 10:39:57 +01:00
christosts
b7b3f4ea45
Remove unused MEDIA_ITEM_TRANSITION_REASON_SKIP
...
PiperOrigin-RevId: 322120882
2020-07-24 10:39:39 +01:00
christosts
b249480060
Offline: store MIME type and keySetId
...
Replace `type` with (optional) `mimeType` and add `keySetId` in
DownloadRequest. The DownloadHelper infers the downloading method (DASH,
HLS, SmoothStreaming or Progressive) from the content's MIME type and
URI.
PiperOrigin-RevId: 322117384
2020-07-24 10:39:30 +01:00
christosts
63b965d3f0
Non-null MIME types infer to other content type
...
PiperOrigin-RevId: 322114754
2020-07-24 10:39:12 +01:00
olly
9185b5177a
Temporarily remove OPUS from sync samples optimization.
...
This is currently causing frames to be dropped when we seek.
PiperOrigin-RevId: 322009748
2020-07-24 10:38:44 +01:00
olly
21f5914e56
Re-add rawtypes suppression
...
PiperOrigin-RevId: 322008577
2020-07-24 10:38:35 +01:00
olly
12559bbc8d
DefaultAudioSink: Make PCM vs non-PCM code paths clearer
...
This change replaces a lot of individual isInputPcm branching with a single,
larger branch.
PiperOrigin-RevId: 321763040
2020-07-24 10:38:17 +01:00
insun
bcf218da60
Import translated strings
...
PiperOrigin-RevId: 321762840
2020-07-24 10:38:08 +01:00
olly
a6640ae377
Stop merging methods through AnalyticsCollector/AnalyticsListener
...
PiperOrigin-RevId: 321595514
2020-07-24 10:37:59 +01:00
tonihei
3b26c218e1
Deduplicate clear playlist code for stop(true) calls.
...
The logic to clear the playlist is currently duplicated in various
reset methods so that calls to player.stop(true) can clear the playlist.
This can be deduplicated by clearing the playlist as a seperate
operation that reuses the existing code.
PiperOrigin-RevId: 321578759
2020-07-24 10:37:50 +01:00
ibaker
161dea661f
Assorted deprecation fixes/migrations/suppressions
...
These were missed on the first pass
PiperOrigin-RevId: 321553847
2020-07-24 10:37:41 +01:00