7347 Commits

Author SHA1 Message Date
olly
bcb51ec155 Move matroska lacing into 2.11
PiperOrigin-RevId: 284576903
2019-12-10 12:36:54 +00:00
olly
539a1ac2e2 Partial nullness annotations for AtomParsers
PiperOrigin-RevId: 284558886
2019-12-10 12:36:45 +00:00
samrobinson
4b281cec3b Clean WakeLockManager.updateWakeLock logic.
PiperOrigin-RevId: 284552723
2019-12-09 16:31:58 +00:00
olly
c90c10c981 Add NonNull annotations to upstream.cache and upstream.crypto
PiperOrigin-RevId: 284548019
2019-12-09 16:31:51 +00:00
olly
0b7f93a5d4 MatroskaExtractor: Support lacing in full blocks
Caveats:

- Block additional data is ignored if the block is laced
  and contains multiple samples. Note that this is not
  a loss of functionality (SimpleBlock cannot have block
  additional data, and lacing was previously completely
  unsupported for Block)

- Subrip and ASS samples are dropped if they're in laced
  blocks with multiple samples (I don't think this is
  valid anyway)

Issue: #3026
PiperOrigin-RevId: 284545197
2019-12-09 16:31:43 +00:00
olly
002acc680b MatroskaExtractor: Constrain use of sample state member variables
This change constrains the use of sample state member variables to
writeSampleData, finishWriteSampleData and resetWriteSampleData.
Using them elsewhere gets increasingly confusing when considering
features like lacing in full blocks. For example sampleBytesWritten
cannot be used when calling commitSampleToOutput in this case
because we need to write the sample data for multiple samples
before we commit any of them.

Issue: #3026
PiperOrigin-RevId: 284541942
2019-12-09 16:31:35 +00:00
olly
a9b327d932 Rollback of 2462aeb443
*** Original commit ***

Add peek() method to ExtractorInput

***

PiperOrigin-RevId: 284539719
2019-12-09 16:31:27 +00:00
christosts
3156fbfc6e Move MediaCodecAdapter out of MediaCodecRenderer
Move MediaCodeAdapter and implementations to separate
files and add unit tests for AsynchronousMediaCodecAdapter.

PiperOrigin-RevId: 284537185
2019-12-09 16:31:20 +00:00
kimvde
2462aeb443 Add peek() method to ExtractorInput
PiperOrigin-RevId: 284537150
2019-12-09 16:31:12 +00:00
kimvde
87ca7961c2 Remove TODO for supporting streams in Java FLAC extractor
Flac streams exist but are not commonly used. Also, they are not
supported by the FLAC extension extractor.

PiperOrigin-RevId: 284514327
2019-12-09 16:31:04 +00:00
bachinger
74faa3aa9f rename setMediaItem to setMediaSource
PiperOrigin-RevId: 284514142
2019-12-09 16:30:56 +00:00
olly
8b3c3ffb91 Fix Javadoc issues
PiperOrigin-RevId: 284509437
2019-12-09 16:30:48 +00:00
olly
96ba4ecd79 Finalize 2.11.0 release notes
PiperOrigin-RevId: 284500197
2019-12-09 16:30:40 +00:00
aquilescanta
d1d43d62e6 Add demo app support for attaching DrmSessions to clear content
Issue:#4867
PiperOrigin-RevId: 284262626
2019-12-09 16:30:32 +00:00
olly
45013ece1e Add unit test for MatroskaExtractor full Block
The existing sample uses SimpleBlock

PiperOrigin-RevId: 284195590
2019-12-06 19:21:39 +00:00
olly
d73af0247b Suppress warnings emitted by Checker Framework version 3.0.1
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP train for global presubmit queue
    http://test/OCL:284110051:BASE:284105515:1575631294184:2673a9f9
PiperOrigin-RevId: 284186732
2019-12-06 19:21:31 +00:00
bachinger
a705480b5d remove flakiness of testSeekTo_windowIndexIsReset
PiperOrigin-RevId: 284180332
2019-12-06 19:21:24 +00:00
kimvde
d0508b2bde Make metadata field nullable in FlacStreamMetadata
This makes the format metadata null (instead of an empty Metadata
object) when it is not provided, and is therefore consistent with the
other extractors behavior.

PiperOrigin-RevId: 284171148
2019-12-06 19:21:16 +00:00
andrewlewis
4ad6d9d85c Don't overwrite MP4 container fps using capture fps
The capture frame rate is currently available both via Format.metadata
and decoded in Format.frameRate. As the container Format.frameRate may
be useful to apps, only store the capture frame rate in metadata (apps
will need to decode it but can now access the container frame rate too).

PiperOrigin-RevId: 284165711
2019-12-06 19:21:08 +00:00
olly
781e15ae3e Enable physical display size hacks for API level 29
For AOSP TV devices that might not pass manual verification.

PiperOrigin-RevId: 284154763
2019-12-06 19:21:00 +00:00
olly
59c17163d6 MatroskaExtractor naming cleanup II
- Remove "lacing" from member variables. They're used even if
  there is no lacing (and the fact that lacing is the way of
  getting multiple samples into a block isn't important).

Issue: #3026
PiperOrigin-RevId: 284152447
2019-12-06 19:20:52 +00:00
olly
dd60bac07d MatroskaExtractor naming cleanup
- Change sampleHasReferenceBlock to a block reading variable, which is
  what it is (the distinction didn't matter previously, but will do so
  when we add lacing support in full blocks because there wont be a 1:1
  relationship any more.
- Move sampleRead to be a reading state variable.
- Stop abbreviating "additional"

Issue: #3026
PiperOrigin-RevId: 284000937
2019-12-06 19:20:44 +00:00
andrewlewis
bf495de529 Fix mdta handling on I/O error
An I/O error could occur while handling the start of an mdta box, in
which case retrying would cause another ContainerAtom to be added. Fix
this by skipping the mdta header before updating container atoms.

PiperOrigin-RevId: 284000715
2019-12-06 19:20:36 +00:00
ibaker
32f02107b4 Stop disabling InvalidPackage now we're on JUnit 4.13
PiperOrigin-RevId: 283995105
2019-12-06 19:20:29 +00:00
ibaker
cad2fe3955 Upgrade to JUnit 4.13-rc-2
PiperOrigin-RevId: 283994812
2019-12-06 19:20:21 +00:00
bachinger
f25bcedf72 Playlist API: submit ahead some files of the playlist API CL
PiperOrigin-RevId: 283988536
2019-12-06 19:20:13 +00:00
olly
aa2e9ffc10 Fix casting to not need warning suppression
Also remove getRendererCapabilities arg that's now always null.

PiperOrigin-RevId: 283966795
2019-12-06 19:20:06 +00:00
tonihei
64703e4aa6 Add format and renderer support to renderer exceptions.
This makes the exception easier to interpret and helps with debugging of
externally reported issues.

PiperOrigin-RevId: 283965317
2019-12-06 19:19:58 +00:00
andrewlewis
cbdf45aa5f Verify metadata in extractor tests
PiperOrigin-RevId: 283960017
2019-12-06 19:19:50 +00:00
samrobinson
f3ba74324e Fix MCR comment line break.
PiperOrigin-RevId: 283958680
2019-12-06 19:19:42 +00:00
aquilescanta
96ea436759 Add a test for SampleQueue capacity increases
Also remove redundant line

PiperOrigin-RevId: 283956203
2019-12-06 19:19:34 +00:00
olly
9376479553 Add NonNull annotations to text packages
PiperOrigin-RevId: 283951181
2019-12-06 19:19:26 +00:00
olly
cb873dd1ee Use play and pause convenience methods
PiperOrigin-RevId: 283949259
2019-12-06 19:19:18 +00:00
olly
b35d5d894e Two minor nullability fixes
PiperOrigin-RevId: 283810554
2019-12-05 10:20:50 +00:00
aquilescanta
140ddc9f3e Invert the ownership scheme between SampleQueue and SampleMetadataQueue
Saves around 200 lines of code. High level overview:
- Rename SampleQueue to SampleDataQueue.
- Rename SampleMetadataQueue to SampleQueue.

This CL should not introduce behavior changes. The only significant
changes in synchronization should be:
+ Add synchronized keyword to isReady.
  - Seems to be necessary.
+ Add synchronized keyword to SampleQueue.sampleMetadata.
  - Before this change, SampleQueue.sampleMetadata could acquire the
    SampleMetadataQueue lock three times in a single method call.

Other miscellaneous improvements:
+ Put all private methods at the bottom.
+ Move release() to the right category.

PiperOrigin-RevId: 283795844
2019-12-05 10:20:41 +00:00
aquilescanta
61c43c30ac Make DownloadHelper pass DrmSessionManager to MediaSources
PiperOrigin-RevId: 283795201
2019-12-05 10:20:32 +00:00
olly
5ce8560291 Fix incorrect DvbParser assignment
PiperOrigin-RevId: 283791815
2019-12-05 10:20:23 +00:00
tonihei
72d5b425d3 Add IntDefs for renderer capabilities.
This simplifies documentation and adds compiler checks that the correct values
are used.

PiperOrigin-RevId: 283754163
2019-12-05 10:20:15 +00:00
olly
3930a539e0 Add NonNull annotations to metadata packages
Also remove MetadataRenderer and SpliceInfoDecoder from the
nullness blacklist

PiperOrigin-RevId: 283744417
2019-12-05 10:20:06 +00:00
olly
b7666df2b3 Add Player play and pause convenience methods
PiperOrigin-RevId: 283744017
2019-12-05 10:19:57 +00:00
ibaker
e54b493bbf Upgrade Truth from 0.44 to 1.0
I'd like to add a custom CueSubject, and if we upgrade first
we won't have to migrate from Subject<S, T> to Subject later:
https://truth.dev/subject_named_actual_type_parameters.html

PiperOrigin-RevId: 283737561
2019-12-05 10:19:48 +00:00
ibaker
b045b62205 Refactor ExtractorInput javadoc about allowEndOfInput
This parameter is a little confusing, especially as the behaviour
can be surprising if the intended use-case isn't clear. This change
moves the description of the parameter into the class javadoc,
adds context/justification and slims down each method's
javadoc to refer to the class-level.

Related to investigating/fixing issue:#6700

PiperOrigin-RevId: 283724826
2019-12-05 10:19:39 +00:00
Ian Baker
8494c3aeea Merge pull request #6595 from szaboa:dev-v2-ssa-position
PiperOrigin-RevId: 283722376
2019-12-05 10:19:27 +00:00
bachinger
bab8975438 reduce number of notification updates
Issue: #6657
PiperOrigin-RevId: 283563218
2019-12-04 10:00:30 +00:00
ibaker
9adb94e95c Clarify Cue.DIMEN_UNSET is also used for size
PiperOrigin-RevId: 283559073
2019-12-04 10:00:24 +00:00
olly
14cfb8039f Use peak rather than average bitrate for HLS
This is a minor change ahead of merging a full variant of
https://github.com/google/ExoPlayer/pull/6706, to make
re-buffers less likely.

Also remove variable substitution when parsing
AVERAGE-BANDWIDTH (it's not required for integer attributes)

PiperOrigin-RevId: 283554106
2019-12-04 10:00:17 +00:00
andrewlewis
21dd59badb Don't try to track buffersInCodec with tunneling
PiperOrigin-RevId: 283551324
2019-12-04 10:00:10 +00:00
bachinger
6c10c94f94 MediaSessionConnector: Support ACTION_SET_CAPTIONING_ENABLED
PiperOrigin-RevId: 283546707
2019-12-04 10:00:04 +00:00
kimvde
23b54a95d2 Allow no output frame holder BinarySearchSeeker
PiperOrigin-RevId: 283544187
2019-12-04 09:59:57 +00:00
andrewlewis
f28a17f9eb Fix comment typo
PiperOrigin-RevId: 283543456
2019-12-04 09:59:50 +00:00