747 Commits

Author SHA1 Message Date
ibaker
786a1ee82f Add ruby support to TtmlDecoder
I had to expand the info that gets passed around a bit, so I could join up the container, base & text ruby nodes.

Spec: https://www.w3.org/TR/2018/REC-ttml2-20181108/#style-attribute-ruby
PiperOrigin-RevId: 295931653
2020-02-25 21:21:04 +00:00
ibaker
4107375c9d Catch-and-log all subtitle decode errors
issue:#6885
PiperOrigin-RevId: 295931197
2020-02-25 21:20:55 +00:00
krocard
f0c0f6eb8f Merge handleBuffer and handleEncodedBuffer
This was unnecessary complexity to avoid very few users
to be broken.

PiperOrigin-RevId: 295603082
2020-02-18 11:00:10 +00:00
olly
e77ff2a3b0 Fix SmoothStreaming
Issue: #6981
PiperOrigin-RevId: 295579872
2020-02-17 17:40:30 +00:00
olly
d1e4a63ae0 Zero out trailing bytes in CryptoInfo.iv
CryptoInfo.iv length is always 16. When the actual initialization vector
is shorter, zero out the trailing bytes.

Issue: #6982
PiperOrigin-RevId: 295575845
2020-02-17 17:40:30 +00:00
aquilescanta
5c3c803460 Remove DRM management from Renderers
PiperOrigin-RevId: 295569075
2020-02-17 17:40:30 +00:00
Ian Baker
4e4a87f352 Merge pull request #4178 from danybony:subtitle_color_in_cue_class
PiperOrigin-RevId: 295548715
2020-02-17 17:14:28 +00:00
christosts
0a612ce34a Video processing offset in AnalyticsListener
PiperOrigin-RevId: 295146481
2020-02-17 17:13:09 +00:00
olly
c1e0d77389 Finalize 2.11.2 release notes
PiperOrigin-RevId: 294943298
2020-02-17 17:12:29 +00:00
krocard
ebce903aaf Allow writing multiple frame in a buffer
Currently only one access unit can be written per
buffer write. This has been found to be power
inefficient in an offload situation.

#exo-offload

PiperOrigin-RevId: 294886188
2020-02-13 15:45:56 +00:00
christosts
9c58e57127 Video frame processing offset in DecoderCounters
Add fields in DecoderCounters for computing the average video frame
processing offset.

The MediaCodecVideoRenderer reports the video frame processing offset
and the demo app presents it on the debug information.

PiperOrigin-RevId: 294677878
2020-02-13 15:45:22 +00:00
tonihei
40101094ba Add option to send messages at end of stream.
This simplifies sending messages to the end of a stream. This was
already possible, but users needed to wait until the duration is known
before sending the message. This duration resolution can happen as part of the message position resolution.

PiperOrigin-RevId: 294626984
2020-02-13 15:44:56 +00:00
olly
1cbe3f72e6 DataSpec: Deprecate most constructors
Keeping (Uri) and (Uri, position, length) to avoid needing
Builder for the trivial case.

PiperOrigin-RevId: 294530226
2020-02-13 15:43:54 +00:00
olly
c7b6a2e045 DataSpec: Add customData field.
PiperOrigin-RevId: 294520836
2020-02-13 15:43:45 +00:00
olly
14d3ed09d5 Add DataSpec.Builder
PiperOrigin-RevId: 294518763
2020-02-13 15:43:35 +00:00
bachinger
0eb0267131 deprecate and rename onLoadingChanged
PiperOrigin-RevId: 294222083
2020-02-11 17:11:58 +00:00
aquilescanta
ac8a2e80e1 Prepare and release DrmSessionManager in Renderers
Issue: #6951
PiperOrigin-RevId: 294187695
2020-02-11 17:11:35 +00:00
bachinger
c02933ac0a rename getPlaybackError
PiperOrigin-RevId: 294074348
2020-02-11 17:10:41 +00:00
andrewlewis
0dd8e6a7c1 Add GL demo app
Demonstrates rendering to a GLSurfaceView while applying a GL shader.

Issue: #6920
PiperOrigin-RevId: 293551724
2020-02-11 17:08:53 +00:00
bachinger
e1c48515eb add next, previous, fastForward and rewind to ControlDispatcher
Issue: #6926, #6934
PiperOrigin-RevId: 293315532
2020-02-11 17:07:52 +00:00
bachinger
4bb6036cf6 add playback state changed listener
This change deprecates Player.onPlayerStateChanged(boolean pwr, int state). It removes deprecation for trivial cases. I'll remove other deprecated usages (mostly in ui module) in follow-up CLs to not bloat this CL.

PiperOrigin-RevId: 292917872
2020-02-11 17:07:03 +00:00
olly
bb8aa4f5b7 Update release notes for 2.11.2
PiperOrigin-RevId: 292881432
2020-02-03 11:21:38 +00:00
olly
ff822ff9fd HLS: Fix key rotation
Passing EXT-X-KEY DrmInitData through the FragmentedMp4Extractor
doesn't work for streams with key rotation, because an extractor
instance is used for multiple segments, but is only passed the
EXT-X-KEY DrmInitData corresponding to the first segment.

This change removes passing DrmInitData through the extractor,
and instead passes it via FormatAdjustingSampleQueue. This is
in-line with how manifest DrmInitData is handled during DASH
playbacks.

Issue: #6903
PiperOrigin-RevId: 292323429
2020-01-30 19:30:58 +00:00
Oliver Woodman
cf06589029 Merge pull request #6724 from nnoury:fix/subtitles-outline-color
PiperOrigin-RevId: 292316767
2020-01-30 19:30:48 +00:00
bachinger
21fe13d3d7 add playWhenReady changed callback with reasons
PiperOrigin-RevId: 292194805
2020-01-30 19:30:29 +00:00
ibaker
6424403907 Add tate-chu-yoko support to TtmlDecoder
PiperOrigin-RevId: 292161845
2020-01-30 19:30:21 +00:00
kimvde
5d74ebe552 MP3 IndexSeeker: handle seek to non-yet-read frames
Issue: #6787
PiperOrigin-RevId: 291953855
2020-01-30 19:29:47 +00:00
olly
d312b6d4c2 Upgrade OkHttp dependency to 3.12.8
OkHttp 3.12.7 introduced a regression, which was fixed in 3.12.8.

PiperOrigin-RevId: 291695577
2020-01-27 18:21:57 +00:00
andrewlewis
91517dc957 Split out extractor and common modules
PiperOrigin-RevId: 291378636
2020-01-24 18:15:19 +00:00
andrewlewis
c8f0814bd0 Remove references to core player classes from C
Move player messages and scaling modes to Renderer.

Remove @links to ExoPlayer AudioAttributes and renderers.

PiperOrigin-RevId: 290932785
2020-01-24 11:10:39 +00:00
andrewlewis
0aa47c231c Remove duplicate release note
PiperOrigin-RevId: 290600248
2020-01-24 11:07:49 +00:00
tonihei
5e2b4117bd Add ID3 genres added in Wimamp 5.6 (2010).
All these genres are currently causing a warning and are not added to the Metadata.Entry.

PiperOrigin-RevId: 290594810
2020-01-24 11:07:32 +00:00
olly
9a9ef43976 Release notes: Move download segment merging out of 2.11.2
PiperOrigin-RevId: 290276507
2020-01-17 16:57:59 +00:00
olly
118d690666 2.11.2 release notes and version bump
PiperOrigin-RevId: 290269098
2020-01-17 16:12:27 +00:00
olly
2859a34027 HLS: Fix slow seeking into long MP3 segments
Issue: #6155
PiperOrigin-RevId: 290117324
2020-01-16 20:35:39 +00:00
olly
51f2723b90 Fix DownloadService resumption
- DownloadManagerHelper now passes all downloads to the
  DownloadService when the service is attached (and once
  the downloads are known). The service then starts the
  foreground notification updater if necessary. This fixes
  the ref'd issue.
- Don't call getScheduler() if the service is background
  only. This was already documented to be the case on the
  DownloadService constructor.
- If the service is started in the foreground on SDK level
  26 and higher, satisfy the condition to move the service
  to the foreground in onStartCommand rather than in stop().
  It's much more obviously correct, and should produce the
  same end result.

Issue: #6798
PiperOrigin-RevId: 290050024
2020-01-16 13:52:47 +00:00
Oliver Woodman
17d1343375 Merge pull request #6678 from phhusson:feature/enable-multi-metadata-tracks
PiperOrigin-RevId: 290032841
2020-01-16 13:52:08 +00:00
olly
4a5d788fa6 DASH: Output Format before InitializationChunk load completes
This optimization allows a ChunkSampleStream to output track
formats as soon as they're parsed during an InitializationChunk
load, rather than waiting until after the InitializationChunk
load is completed.

In DASH VOD, a single InitializationChunk typically loads the
moov and sidx atoms in that order. Hence for long form content
where the sidx is a non-trivial size, this may result in the
track formats being output a non-negligible period of time
sooner than was previously the case. This allows downstream
renderers to start codec initialization sooner, potentially
decreasing startup latency.

For a single test stream on a fast & stable network, this
pretty consistently reduced elapsed time until both audio and
video codecs have been initialized from ~0.5s to ~0.3 seconds
on a Galaxy S8. For 5 test runs without and with these patches,
the eventTime logged by EventLogger for the second decoder
init were:

Without (secs): 0.47 0.47 0.45 0.48 0.46
With (secs)   : 0.32 0.33 0.34 0.31 0.40

PiperOrigin-RevId: 289845089
2020-01-16 13:51:42 +00:00
olly
7d0f0b69a3 Optimize chunks to init their outputs before opening the DataSource
The current order of operations means that the Format is only passed
to the chunk's output after the DataSource has been opened. This
means that establishing the network connection and the downstream
renderers initializing their codecs are effectively serialized to
occur one after the other.

In the new order, the Format is passed to the chunk's output before
the DataSource has been opened. This allows the downstream renderers
to initialize their codecs in parallel with the network connection
being established, and hence latency at the start of playback is
reduced.

PiperOrigin-RevId: 289841854
2020-01-16 13:51:34 +00:00
olly
cea37c60f8 Use customCacheKey in DownloadHelper.createMediaSource
Issue: #6870
PiperOrigin-RevId: 289658261
2020-01-16 13:51:01 +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
olly
a58ea16f7d Add favicon to javadocs. b/145393567
PiperOrigin-RevId: 289054937
2020-01-10 15:57:02 +00:00
andrewlewis
9cdbc822bb Fix class name
PiperOrigin-RevId: 288886739
2020-01-10 15:56:46 +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
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
andrewlewis
762bc18a28 Fix TrueHD chunking in Matroska
Issue: #6845
PiperOrigin-RevId: 288688716
2020-01-08 15:58:28 +00:00
olly
70fe6b4590 Upgrade OkHttp library to fix HTTP2 issue
Issue: #4078
PiperOrigin-RevId: 288651166
2020-01-08 15:58:04 +00:00
ibaker
a98fc7ca48 Add tate-chu-yoko support to WebVTT decoding
PiperOrigin-RevId: 288285953
2020-01-06 14:56:20 +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
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