8426 Commits

Author SHA1 Message Date
tonihei
72f4b964a5 Add parameter to Renderer.enable to allow rendering of first sample.
PiperOrigin-RevId: 295985916
2020-02-25 21:21:46 +00:00
olly
c95ed7d18c Change libgav1's frame buffer callback API.
1. Have frame buffer callbacks return Libgav1StatusCode instead of int.
The 0 (success), -1 (failure) return value convention is less obvious.
Note: The callers of frame buffer callbacks,
BufferPool::OnFrameBufferSizeChanged() and YuvBuffer::Realloc(),
currently return bool, so more work is needed to propagate the frame
buffer callbacks' Libgav1StatusCode return value to the Decoder API.

2. Allow the FrameBufferSizeChangedCallback to be omitted if the frame
buffer size information is not useful to the application.

3. Remove the old (version 1) frame buffer callback API. Remove the
frame buffer callback adaptor.

frame_buffer2.h is renamed frame_buffer.h.
Libgav1FrameBuffer2 is renamed Libgav1FrameBuffer.
GetFrameBufferCallback2 and ReleaseFrameBufferCallback2 are renamed
GetFrameBufferCallback and ReleaseFrameBufferCallback.

PiperOrigin-RevId: 295971183
2020-02-25 21:21:37 +00:00
olly
54283746be Fix lint errors
PiperOrigin-RevId: 295953956
2020-02-25 21:21:29 +00:00
christosts
1f905434d2 Add 60fps test assets in demo app
PiperOrigin-RevId: 295946028
2020-02-25 21:21:21 +00:00
tonihei
a6fb22c67f Add missing package-info.java
All packages that are not in a test directory (or a demo app) should have
the non-null-by-default annotation. Add the remaining ones.

PiperOrigin-RevId: 295938504
2020-02-25 21:21:13 +00:00
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
andrewlewis
0b7f5260ca Update stale comment in TrimmingAudioProcessor
The part about leaving the pending trim start byte count unmodified
if the processor was just configured is not correct.

PiperOrigin-RevId: 295745371
2020-02-25 21:20:47 +00:00
olly
47ee1f2841 FLAC extractor documentation tweak
PiperOrigin-RevId: 295724578
2020-02-25 21:20:39 +00:00
christosts
3fb8ab2545 Async queueing: avoid extra memory allocations
When copying CryptoInfo for asynchronous input buffer queueing,
re-use the destination CryptoInfo's arrays to avoid re-allocating
memory.

PiperOrigin-RevId: 295706771
2020-02-25 21:20:30 +00:00
Daniel Brain
39f097c79c DownloadHelper.createMediaSource() nullable DrmSessionManager 2020-02-25 15:53:03 +11:00
Daniel Brain
aa9b85c66e DownloadService.onStartCommand() nullable Intent 2020-02-25 15:51:58 +11:00
xufulong
6d14c168e2 use swresample instead of avresample, since avresample module has been deprecated. 2020-02-19 22:09:01 +08:00
Pierre-Hugues Husson
cfb2e9dd11 Include an AitDecoderTest
Those test data are defined using tsduck xml format.
feedInputBuffer is identical to SpliceInfoDecoderTest's, could be worth
mutualizing
2020-02-18 16:10:07 +01:00
Pierre-Hugues Husson
8e84fe55a1 Include a new TS sample, with ait, dsm-cc, eit 2020-02-18 16:09:41 +01:00
Pierre-Hugues Husson
46e342bf3e Rename variables to match standard, Add more comments refering to standard 2020-02-18 15:23:48 +01:00
Pierre-Hugues Husson
90601267e6 Use ParsableBitArray's readString 2020-02-18 15:04:10 +01:00
Pierre-Hugues Husson
274743cddc [ParsableBitArray] Add readString 2020-02-18 15:03:57 +01:00
Pierre-Hugues Husson
98de7c460b [AitDecoder] Move to ParsableBitArray 2020-02-18 15:00:26 +01:00
Pierre-Hugues Husson
28c5043dc1 Comment SectionPassthrough 2020-02-18 13:45:14 +01:00
Pierre-Hugues Husson
79bc160373 output is created at 'init', annotate it as lazyily initialized 2020-02-18 13:45:03 +01:00
Pierre-Hugues Husson
7bf63e732d Remove dead-code readDvbString 2020-02-18 13:44:09 +01:00
olly
ab21f885d4 Bump version to 2.11.3
PiperOrigin-RevId: 295695297
2020-02-18 11:00:59 +00:00
olly
80ae40f6f4 Add missing IntDef to switch
PiperOrigin-RevId: 295692163
2020-02-18 11:00:51 +00:00
olly
3d20fd59c2 Add ACCESS_NETWORK_STATE permission to core module
When common was split from core, this permission was moved
to common. However both modules need it.

PiperOrigin-RevId: 295690886
2020-02-18 11:00:43 +00:00
olly
43d4ee9a71 Apply playback speed selection
- Add Settings UI
 - Remove unnecessary values related to Full Mode
 - Remove unnecessary hierarchy in list item layout
 - Enable to select Playback Speed in Settings

Also changes:
   Keep Fullscreen UI when window focus changed in demo app

PiperOrigin-RevId: 295655858
2020-02-18 11:00:27 +00:00
olly
28575a1f31 Fix some TargetApi/RequiresApi annotations
PiperOrigin-RevId: 295607866
2020-02-18 11:00:19 +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
1dbf2997c4 Remove DefaultSsChunkSource from nullness blacklist
Issue: #6981
PiperOrigin-RevId: 295584705
2020-02-17 17:40:31 +00:00
aquilescanta
3591562364 Remove FormatHolder.includesDrmSession
With the Renderer migration, this is officially unnecessary, and
should always be true for supported encrypted content.

PiperOrigin-RevId: 295584542
2020-02-17 17:40:30 +00:00
ibaker
bd02812430 Add package-info.java to text.span package
PiperOrigin-RevId: 295582502
2020-02-17 17:40:30 +00:00
olly
5b3ed8286c Add non-null by default to source package (last one!)
Note on UnknownNull: Where there exists a generically typed
base class and both null and non-null types are permitted,
we need to clear the default non-null that's otherwise
propagated everywhere. This then lets the nullness of the
type work properly.

PiperOrigin-RevId: 295582444
2020-02-17 17:40:30 +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
krocard
27bd1294ec AudioSink: Correct access unit count logic
Previously, the input buffer accessUnit count
was passed as the output of the audio processors
which did not make sense as the processors can
split buffers.

This patch passes the access unit count through a
member variable.

PiperOrigin-RevId: 295572577
2020-02-17 17:40:30 +00:00
ibaker
e6ebd8d70a Move SpanUtil into text.span package
Seems like it belongs here.

PiperOrigin-RevId: 295571820
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
tonihei
d3f806fdf4 Let FakeRenderer subclasses decide whether to render a sample.
This is closer to how our actual renderers look like and allows tests
to use a similar logic to show/suppress the first frame in follow-up changes.

PiperOrigin-RevId: 295557548
2020-02-17 17:40:30 +00:00
tonihei
56ec705275 Copy getting-stuck-prevention into DefaultLoadControl.
We will eventually remove the workaround from ExoPlayerImplInternal
added in
b84bde0252
and replace it by an error that gets thrown if the LoadControl behaves
badly.

PiperOrigin-RevId: 295556131
2020-02-17 17:39:37 +00:00
olly
faff66e9df Use &id_ as buffer_private_data for libgav1.
This avoids the issue of whether it is defined behaviour to cast an
arbitrary int (or even intptr_t) value to a void* pointer. This is the
original approach used before commit 0915998add5918214fa0282a69b50a159168a6d5.

PiperOrigin-RevId: 295552115
2020-02-17 17:14:40 +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
olly
2eb6e814eb Use libgav1 frame buffer callback helper functions
Libgav1 recently added the ComputeFrameBufferInfo() and SetFrameBuffer()
helper functions for writing frame buffer callbacks. Using them
simplifies the Libgav1GetFrameBuffer() function.

Also resurrect the AlignTo16() function.

PiperOrigin-RevId: 295548330
2020-02-17 17:14:17 +00:00
kimvde
b1b6c8dfea Add test for seek map duration correction in MP3 index seeker
PiperOrigin-RevId: 295543916
2020-02-17 17:14:07 +00:00
kimvde
74443f47f0 Fix DefaultExtractorsFactory Javadoc
PiperOrigin-RevId: 295540885
2020-02-17 17:13:57 +00:00
ibaker
0444e0b338 Add Util.toHexString
PiperOrigin-RevId: 295539969
2020-02-17 17:13:48 +00:00
olly
ed210bca4e Source package: Add some missing nullness annotations
Plus a bit of misc warning cleanup whilst I was there

PiperOrigin-RevId: 295415657
2020-02-17 17:13:38 +00:00
olly
0257e895d0 DefaultTrackSelectorTest: Add @Test to enable test, and fix it
PiperOrigin-RevId: 295414974
2020-02-17 17:13:29 +00:00
olly
2a012f8687 gav1_jni: fix pointer->int conversion warnings
fixes:
gav1_jni.cc:446:25: error: cast from pointer to smaller type 'int' loses information
  const int buffer_id = reinterpret_cast<int>(buffer_private_data);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gav1_jni.cc:730:9: error: cast from pointer to smaller type 'int' loses information
        reinterpret_cast<int>(decoder_buffer->buffer_private_data);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

after 0915998add

PiperOrigin-RevId: 295211245
2020-02-17 17:13:19 +00:00
christosts
0a612ce34a Video processing offset in AnalyticsListener
PiperOrigin-RevId: 295146481
2020-02-17 17:13:09 +00:00
krocard
5104548204 Make explicit that Passthrough ∩ PCM = ∅
Previously that was implicit, it was the passthrough dance:
 - MimeTypes.getEncoding(inputFormat) did not
   implement RAW MIME, so it was returning INVALID_ENCODING for PCM
 - and allowPassthrough was returning
         MimeTypes.getEncoding() != INVALID_ENCODING
 - which was setting codecInfo.passthrough, and passthroughEnabled.

Thus Util.isEncodingPcm(encoding) is the opposite of
(MimeTypes.getEncoding(inputFormat) != C.ENCODING_INVALID)

This was rather implicit and brittle as anyone
could add support for audio/RAW in
MimeTypes.getEncoding and break PCM playback.

As a result make it explicit that allowPassthrough
must always return false in PCM.

PiperOrigin-RevId: 295144013
2020-02-17 17:12:58 +00:00