8207 Commits

Author SHA1 Message Date
tonihei
01e661f21a Add NTP client to get time offset for live streams without UTCTiming.
Dash live streams require that the client has an accurate wall clock
time and in absence of a UTCTiming element, this is assumed to be the
NTP time.

This change adds NTP time offset resolution for DASH live streams
without such timing elements.

PiperOrigin-RevId: 289098796
2020-01-13 19:57:10 +00:00
Oliver Woodman
3e08e42168 Merge pull request #6797 from DolbyLaboratories:dev-v2-ac4-drm
PiperOrigin-RevId: 289092332
2020-01-10 15:57:40 +00:00
ibaker
b562e8687b Add {Relative,Absolute}SizeSpan support to SpannedSubject
I'll use this in TtmlDecoderTest

PiperOrigin-RevId: 289091526
2020-01-10 15:57:31 +00:00
olly
d24188f663 Add tests to validate FLAC decoder output
PiperOrigin-RevId: 289091494
2020-01-10 15:57:23 +00:00
ibaker
48f8a78f57 Simplify SpannedSubjectTest using helper methods
Suggested during the review of <unknown commit>

PiperOrigin-RevId: 289088296
2020-01-10 15:57:15 +00:00
olly
a58ea16f7d Add favicon to javadocs. b/145393567
PiperOrigin-RevId: 289054937
2020-01-10 15:57:02 +00:00
olly
7e5d6debcc Avoid OMX.qti.audio.decoder.flac
Unfortunately devices such as the MI 8 do not provide an alternative
working decoder. Some Vivo devices do provide one though.

PiperOrigin-RevId: 288911897
2020-01-10 15:56:54 +00:00
andrewlewis
9cdbc822bb Fix class name
PiperOrigin-RevId: 288886739
2020-01-10 15:56:46 +00:00
krocard
95f1dbec1b More @nullable in SimpleDecoderAudioRenderer
Some members are nullable but were not marked as
such.

PiperOrigin-RevId: 288873481
2020-01-10 15:56:38 +00:00
christosts
f47d06e7b3 Set ExoPlayer's MediaCodecOperationMode
PiperOrigin-RevId: 288868298
2020-01-10 15:56:30 +00:00
krocard
91d2b8581e Make MediaCodecRenderer.codec nullable
Also fix annotation style of the surrounding functions.

PiperOrigin-RevId: 288865420
2020-01-10 15:56:22 +00:00
ibaker
2c02f787bd Remove unused styles from TTML test data
PiperOrigin-RevId: 288862795
2020-01-10 15:56:13 +00:00
ibaker
bae4d786e2 Add {Strikethrough,Alignment}Span support to SpannedSubject
I'm going to use these in TtmlDecoderTest

PiperOrigin-RevId: 288862274
2020-01-10 15:56:06 +00:00
ibaker
f22ac32c2c Relax the check in SpannedSubject.hasBoldItalicSpanBetween
Ultimately we only care if the style is both bold & italic, if some of
those are specified multiple times there's no problem.

PiperOrigin-RevId: 288862235
2020-01-10 15:55:57 +00:00
olly
1a9b301f52 Fix extension FLAC decoder to correctly handle non-16-bit depths
PiperOrigin-RevId: 288860159
2020-01-10 15:55:49 +00:00
andrewlewis
017a7cf38c Resolve TrueHD spec TODO
PiperOrigin-RevId: 288855515
2020-01-10 15:55:40 +00:00
ybai001
74e01f4e97 Add protected AC-4 fmp4 test case 2020-01-10 14:19:30 +08:00
ybai001
4ce72d9d6d Update AC-4 DRM code based on comments
Update cleardatasize[0] in extractor rather than sampleDataQueue.
2020-01-09 15:23:05 +08:00
ybai001
0ea49df901 Merge branch 'google-dev-v2' into dev-v2-ac4-drm 2020-01-09 09:40:28 +08:00
ybai001
65e6d50e73 Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into google-dev-v2 2020-01-09 09:08:07 +08:00
Oliver Woodman
4f15cfaa78 Merge pull request #6836 from DolbyLaboratories:dev-v2-refineAC4
PiperOrigin-RevId: 288772277
2020-01-08 22:15:53 +00:00
kimvde
79edf7cce2 FlacExtractor: add condition for zero-length reads
This improves readability by making clearer that reading no bytes from
the input in readFrames() is an expected case if the buffer is full.

PiperOrigin-RevId: 288711841
2020-01-08 22:15:43 +00:00
tonihei
216518eb0e Disable chronometer for playback speeds != 1.0
This doesn't work because the Chronometer text layout can only count in realtime.

Issue:#6816
PiperOrigin-RevId: 288711702
2020-01-08 22:15:35 +00:00
ibaker
e5eaacec20 Fix typo in SpannedSubject.hasBoldItalicSpanBetween
PiperOrigin-RevId: 288710939
2020-01-08 22:15:27 +00:00
tonihei
fa9bf9c828 Ensure seeks to new windows are reported as seeking.
Currently, seeks are only tracked if both the start and the end of the seek
is within the same window. This means no seeking state is reported if the
playback switches to a new window during the seek.

This problem is fixed by tracking seek start and end events in all cases,
but only report seeking state once the window becomes the foreground window.

PiperOrigin-RevId: 288706674
2020-01-08 22:15:18 +00:00
ibaker
14e401f53a Update TtmlDecoder to keep only one Span of each type
The current code relies on Android's evaluation order of spans, which
doesn't seem to be defined anywhere.

PiperOrigin-RevId: 288700011
2020-01-08 22:15:10 +00:00
ibaker
8e26505ee8 Fix what I think is a typo in WebVTT test data
Without the CSS tweak the additional test assertion fails.

PiperOrigin-RevId: 288698323
2020-01-08 22:15:02 +00:00
andrewlewis
762bc18a28 Fix TrueHD chunking in Matroska
Issue: #6845
PiperOrigin-RevId: 288688716
2020-01-08 15:58:28 +00:00
ibaker
448db89446 Add TypefaceSpan and hasNoFooSpanBetween() support to SpannedSubject
Use these to migrate the last WebvttDecoderTest method to SpannedSubject

PiperOrigin-RevId: 288688620
2020-01-08 15:58:20 +00:00
kimvde
ee091e6a45 Use FlacLibrary.isAvailable in FlacExtractor selection
PiperOrigin-RevId: 288667790
2020-01-08 15:58:12 +00:00
olly
70fe6b4590 Upgrade OkHttp library to fix HTTP2 issue
Issue: #4078
PiperOrigin-RevId: 288651166
2020-01-08 15:58:04 +00:00
olly
63f90adef0 Add package level NonNull to extractor.ts
Also remove most classes from the nullness blacklist

PiperOrigin-RevId: 288494712
2020-01-08 15:57:56 +00:00
christosts
fb42f818ec Add start() method in MediaCodecAdapter
PiperOrigin-RevId: 288476415
2020-01-08 15:57:48 +00:00
ibaker
c5535e825e Fix null-checker suppression introduced by 3.0.1 upgrade
Suppression added in 6f9baffa0c

PiperOrigin-RevId: 288475120
2020-01-08 15:57:39 +00:00
ibaker
181606137d Remove assertCues() helper methods from WebvttDecoderTest
These make the interesting bits of each assertion harder to follow imo.

Also remove all the assertWithMessage() calls at the same time, Olly
convinced me these are rarely useful since you can click from the stack
trace to the failing line in the IDE.

PiperOrigin-RevId: 288470704
2020-01-08 15:57:31 +00:00
olly
692c8ee0ac Fix playback for Vivo codecs that output non-16-bit audio
PiperOrigin-RevId: 288468497
2020-01-08 15:57:22 +00:00
kimvde
35fbb7f7ca Add comment explaining FlacBinarySearchSeeker output
PiperOrigin-RevId: 288464154
2020-01-08 15:57:14 +00:00
ibaker
09ca5c0783 Remove assertWithMessage() calls from SsaDecoderTest
As discussed with Olly, these don't add much info and are liable
to go stale.

PiperOrigin-RevId: 288463027
2020-01-08 15:57:06 +00:00
olly
9618e5e00f FlacExtractor: Fix possible skipping of frame boundaries
PiperOrigin-RevId: 288304477
2020-01-08 15:56:57 +00:00
olly
24743c77ce Remove WavExtractor from the nullness blacklist
PiperOrigin-RevId: 288292488
2020-01-06 14:56:28 +00:00
ibaker
a98fc7ca48 Add tate-chu-yoko support to WebVTT decoding
PiperOrigin-RevId: 288285953
2020-01-06 14:56:20 +00:00
kimvde
06fcf29edd Simulate IO exceptions in all FlacExtractor tests
- Simulate IO exceptions in the test using FlacBinarySearchSeeker for
  seeking in FlacExtractorTests. This makes the test slower but covers
  more test cases.

PiperOrigin-RevId: 288285057
2020-01-06 14:56:11 +00:00
tonihei
3a31bc1724 Support 5G in network type detection
PiperOrigin-RevId: 288280500
2020-01-06 14:56:02 +00:00
ibaker
6f312c054e Add <ruby> tag support to WebvttCueParser
There's currently no rendering support for ruby text in SubtitleView
or SubtitlePainter, but this does have a visible impact with the
current implementation by stripping the ruby text from Cue.text
meaning it doesn't show up at all under the 'naive' rendering.
This is an improvement over the current behaviour of including
the ruby text in-line with the base text (no rubies is better than
wrongly rendered rubies).

PiperOrigin-RevId: 288280416
2020-01-06 14:55:54 +00:00
ibaker
2b1a066339 Add RubySpan support to SpannedSubject
PiperOrigin-RevId: 288280332
2020-01-06 14:55:45 +00:00
ibaker
e55af3e3c8 Add RubySpan
This will be used when parsing Ruby info from WebVTT and TTML/IMSC
subtitles.

PiperOrigin-RevId: 288280181
2020-01-06 14:55:37 +00:00
ibaker
1e7db22ee2 Convert StyleSpan assertions in SpannedSubject to fluent style
PiperOrigin-RevId: 288274998
2020-01-06 14:55:28 +00:00
ibaker
29df73e268 Fix MatroskaExtractor to use blockDurationUs not durationUs
This typo was introduced in ddb70d96ad
when migrating a static method with parameter `durationUs` to an
instance method where the correct field to use was `blockDurationUs`
(but `durationUs` also exists).

The test that catches this was only added in 45013ece1e (and
therefore configured with the wrong expected output data).

issue:#6833
PiperOrigin-RevId: 288274197
2020-01-06 14:55:19 +00:00
christosts
1c1c0ed88a Remove getDequeueOutputBufferTimeoutUs
Remove unused method
MediaCodecRenderer#getDequeueOutputBufferTimeoutUs().

PiperOrigin-RevId: 288005572
2020-01-06 14:55:10 +00:00
olly
f1f0ff3a65 Use MIME types rather than PCM encodings for ALAW and MLAW
PiperOrigin-RevId: 287999703
2020-01-06 14:55:01 +00:00