2596 Commits

Author SHA1 Message Date
andrewlewis
a5e14b4dae Fix byte order for HDR10+ static metadata
The implementation of writing HDR10+ static metadata assumed that the
application would use default (big endian) byte order for this metadata but
MediaCodec expects the order to match the specification CTA-861.3.

PiperOrigin-RevId: 281050806
2019-11-18 17:54:56 +00:00
olly
1629a5afd3 Make some listener methods default
PiperOrigin-RevId: 281050034
2019-11-18 17:54:48 +00:00
olly
3e17080c02 Remove SimpleCache hacks that are no longer used
PiperOrigin-RevId: 281049383
2019-11-18 17:54:40 +00:00
olly
7f2827077c Don't check rotated resolution for HEVC on LG Q7
Issue: #6612
PiperOrigin-RevId: 281048324
2019-11-18 17:54:32 +00:00
aquilescanta
82b218607f Add Util.linearSearch
PiperOrigin-RevId: 281037183
2019-11-18 17:54:15 +00:00
ibaker
79b7af656b Rollback of <unknown commit>
*** Original commit ***

Disable test coverage again

https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

***

PiperOrigin-RevId: 280666758
2019-11-17 00:33:26 +00:00
olly
c0d3930816 Parse channel count and sample rate from ALAC initialization data
Also remove the "do we really need to do this" comment for AAC.
Parsing from codec specific data is likely to be more robust, so
I think we should continue to do it for formats where we've seen
this problem.

Issue: #6648
PiperOrigin-RevId: 280575466
2019-11-15 05:16:39 +00:00
Oliver Woodman
c613e502aa Merge pull request #6650 from stanionascu:dev-v2-dv
PiperOrigin-RevId: 280573887
2019-11-15 05:16:29 +00:00
krocard
5579cc89c6 Propagate end of stream received from OnFrameRenderedListener
Previously the renderer EOS (aka last frame rendered), was reported as soon
as the last encoded frame was queued in the codec renderer.
This leaded to EOS reported too early.

PiperOrigin-RevId: 280456277
2019-11-15 05:16:19 +00:00
tonihei
c8e7ecd367 Merge consecutive segments for downloading.
This speeds up downloads where segments have the same URL with different
byte ranges. We limit the merged segments to 20 seconds to ensure the download
progress of demuxed streams is roughly in line with the playable media duration.

Issue:#5978
PiperOrigin-RevId: 280410761
2019-11-15 05:16:11 +00:00
aquilescanta
51711a0c97 Fix MediaDrm leaks in OfflineLicenseHelper
PiperOrigin-RevId: 280176216
2019-11-15 05:16:03 +00:00
ibaker
65b49a49f7 Fix parameter name mismatch in Playlist
PiperOrigin-RevId: 280167223
2019-11-15 05:15:56 +00:00
olly
0ff79c0e02 Support switching between Surface and VideoDecoderOutputBufferRenderer
Clear state for one mode when entering the other in both SimpleExoPlayer
and SimpleDecoderVideoRenderer. The latter is redundant for the case of
renderers that are used inside SimpleExoPlayer, but seems nice to have.

- Entering Surface mode means receiving a non-null Surface, SurfaceHolder
  or TextureView in SimpleExoPlayer, or a non-null Surface in
  SimpleDecoderVideoRenderer.
- Entering VideoDecoderOutputBufferRenderer means receiving a non-null
  VideoDecoderOutputBufferRenderer in SimpleExoPlayer and
  SimpleDecoderVideoRenderer.

PiperOrigin-RevId: 280155151
2019-11-15 05:15:48 +00:00
olly
bee6294813 Add clear methods for VideoDecoderOutputBufferRenderer
Also add some missing Nullable annotations.

PiperOrigin-RevId: 280150512
2019-11-15 05:15:40 +00:00
olly
7ca77c6002 Make DrmSession acquire/release consistent with ExoMediaDrm
This aligns the method naming and Javadoc. The only remaining
inconsistency I can see is that the initial reference count for
DrmSession is 0 rather than 1. Unfortunately I think it's not
trivial to get these aligned, because DefaultDrmSessionManager
relies on being able to do something between instantiation and
the DrmSession starting to open the session. In practice this
doesn't really matter, since DrmSessions will be obtained via the
manager, which does increment thee reference count to 1 to be
consistent with how ExoMediaDrm acquisition works.

PiperOrigin-RevId: 280136574
2019-11-15 05:15:32 +00:00
olly
9b4a3701d4 Clean up ExoMediaDrm reference counting documentation
PiperOrigin-RevId: 280106092
2019-11-15 05:15:24 +00:00
bachinger
69e51505e4 use getPeriodByUid when searching for subsequent period of seek timeline
Issue: #6641
PiperOrigin-RevId: 279963739
2019-11-15 05:15:08 +00:00
aquilescanta
abe0330f39 Add a track type argument to DrmSessionManager.acquirePlaceholderSession
Issue:#4867
PiperOrigin-RevId: 279928345
2019-11-15 05:15:00 +00:00
aquilescanta
b84a9bed2c Add a parameter object for LoadErrorHandlingPolicy methods
PiperOrigin-RevId: 279928178
2019-11-15 05:14:51 +00:00
ibaker
ddb70d96ad Require an end timecode in SSA and Subrip subtitles
SSA spec allows the lines in any order, so they must all have an end time:
http://moodub.free.fr/video/ass-specs.doc

The Matroska write-up of SubRip assumes the end time is present:
https://matroska.org/technical/specs/subtitles/srt.html

This will massively simplify merging issue:#6595

PiperOrigin-RevId: 279926730
2019-11-15 05:14:43 +00:00
ibaker
b43db3bceb Clarify SSA and SubRip docs in MatroskaExtractor
The handling of times wasn't really clear to me, hopefully this more
exhaustive documentation helps a bit.

Also assert the end timecode is the 'correct' length for the format.

PiperOrigin-RevId: 279922369
2019-11-15 05:14:35 +00:00
kimvde
2faef48302 Add CRC-8 method in Util
PiperOrigin-RevId: 279911378
2019-11-15 05:14:27 +00:00
andrewlewis
b477d8b68a Don't check channels for E-AC3 JOC passthrough
PiperOrigin-RevId: 279841132
2019-11-15 05:14:04 +00:00
olly
e49f1f8a61 Rollback of 844c023b65
*** Original commit ***

Add CRC-8 method in Util

***

PiperOrigin-RevId: 279733541
2019-11-15 05:13:56 +00:00
kimvde
844c023b65 Add CRC-8 method in Util
PiperOrigin-RevId: 279727618
2019-11-15 05:13:48 +00:00
kimvde
13cf2360c8 Compute format maxInputSize in FlacReader
Use the maximum frame size as the maximum sample size if provided.

PiperOrigin-RevId: 279722820
2019-11-15 05:13:39 +00:00
andrewlewis
be03c08410 Add test for becoming noisy handling
To trigger receiving the broadcast it's necessary to idle() the shadow
main looper, which has to be done from the test thread. Therefore this
change removes the send broadcast action and instead sends the broadcast
from the test thread.

PiperOrigin-RevId: 279660935
2019-11-15 05:13:23 +00:00
olly
266c13913a Fix spurious regex simpliciation
Android Studio claims this escaping isn't required, but now it's removed this code crashes due to a malformed regex.

PiperOrigin-RevId: 279501823
2019-11-15 05:13:14 +00:00
tonihei
71f7ab1c57 Workaround for pre-M platform bug when instantiating CaptioningManager.
PiperOrigin-RevId: 279286802
2019-11-15 05:13:06 +00:00
olly
a9ef9c46c8 Bump version to 2.11.0
Note: Release notes are not final.
PiperOrigin-RevId: 279125474
2019-11-15 05:12:58 +00:00
kimvde
d1da3d925b Fix FLAC bit rate computation
PiperOrigin-RevId: 279088193
2019-11-15 05:12:34 +00:00
olly
6f9baffa0c Suppress warnings emitted by Checker Framework version 2.11.1
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    tap_presubmit: http://test/OCL:278683723:BASE:278762656:1573036487314:924e1b0b
    Some tests failed; test failures are believed to be unrelated to this CL
PiperOrigin-RevId: 279034739
2019-11-15 05:12:01 +00:00
bachinger
5c2806ecca Playlist API: add Playlist and PlaylistTest
PiperOrigin-RevId: 278875587
2019-11-15 05:11:53 +00:00
bachinger
cd2c1f2f24 Playlist API: Add setMediaItem() and prepare()
PiperOrigin-RevId: 278867153
2019-11-15 05:11:45 +00:00
olly
4570cd37c5 Testutils: Add missing Javadoc + Misc cleanup
PiperOrigin-RevId: 278835106
2019-11-15 05:11:36 +00:00
olly
0a27d7b482 Don't use DRM prior to API level 18
PiperOrigin-RevId: 278660557
2019-11-15 05:11:26 +00:00
Stanislav Ionascu
6d9c707255 Detect Dolby Vision profile 7
In official documentation dvProfile 7 uses dvhe as the codec type.
2019-11-14 08:30:30 +01:00
olly
87003b30fc Bump version to 2.10.7
PiperOrigin-RevId: 278658259
2019-11-05 18:36:21 +00:00
aquilescanta
efc7f55616 Make DefaultDrmSession package private
PiperOrigin-RevId: 278639779
2019-11-05 18:36:04 +00:00
christosts
7cc3943b4f Experimental API to skip MediaCodec.stop()
Add experimental API on MediaCodecRenderer to skip calling
MediaCodec.stop() before the call to MediaCodec.release().

PiperOrigin-RevId: 278621032
2019-11-05 16:18:46 +00:00
kimvde
c8170e18d0 Update AndroidX Test versions to latest
Split the version of the sublibraries because their latest version
number is different. See
https://developer.android.com/jetpack/androidx/releases/test#1.2.0.

PiperOrigin-RevId: 278585090
2019-11-05 16:18:38 +00:00
olly
9842ea7f22 Move classes that don't belong in testutils out of testutils
PiperOrigin-RevId: 278401000
2019-11-05 16:18:24 +00:00
olly
d587def451 Fix Javadoc broken due to lack of import
PiperOrigin-RevId: 278399475
2019-11-05 16:18:16 +00:00
olly
5968c8345b Remove auto-value dependency
PiperOrigin-RevId: 278398045
2019-11-05 16:18:09 +00:00
kimvde
165ff55502 Fix inverted arguments in FlacReader format creation
PiperOrigin-RevId: 278332587
2019-11-05 16:18:01 +00:00
kimvde
bd61b63ebc Remove unnecessary exceptions in method signature
PiperOrigin-RevId: 278327151
2019-11-05 16:17:46 +00:00
olly
880b879e8c Suppress warnings emitted by Checker Framework version 2.11.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:278152710:BASE:278144052:1572760370662:22459c12
PiperOrigin-RevId: 278241536
2019-11-05 16:17:39 +00:00
olly
7e070683a3 Expose getMetrics() in ExoV1 and ExoV2 FrameworkMediaDrm classes.
PiperOrigin-RevId: 278054214
2019-11-05 16:17:31 +00:00
ibaker
922991da88 Add @NonNullApi to text packages with no blacklisted files
PiperOrigin-RevId: 277969385
2019-11-05 16:17:24 +00:00
kimvde
5d46d4f74f Add parameter names to Format creation
PiperOrigin-RevId: 277963928
2019-11-05 16:17:16 +00:00