8514 Commits

Author SHA1 Message Date
Dustin
b520b26f0f More AviExtractor tests 2022-01-29 10:59:55 -07:00
Dustin
a17d36de12 Minor cleanup 2022-01-28 17:42:04 -07:00
Dustin
1ff78292d1 Fix BitmapFactoryVideoRenderer sync issues 2022-01-28 17:17:32 -07:00
Dustin
1d85bf2456 Updated seek 2022-01-28 12:47:43 -07:00
Dustin
c41dc2360f Fix crash on streamId out of bounds 2022-01-25 15:19:10 -07:00
Dustin
f1d007e68c Fix issue where reading mime type wrong in video. More tests 2022-01-25 15:01:02 -07:00
Dustin
7ea2d75fcd Refactor Clock logic. Refactor peeking for MP4V and AVC. Moved AVI above MP3. 2022-01-24 16:02:37 -07:00
Dustin
09485cbed1 Passed along suggestedBufferSize to ExoPlayer 2022-01-23 14:52:53 -07:00
Dustin
43b8a9b336 Add support for StreamName fixed issues with position alignment 2022-01-23 13:45:22 -07:00
Dustin
167c2f3fc0 Fix alignment in track scanner 2022-01-23 12:10:48 -07:00
Dustin
ec26539aeb BitmapFactoryVideoRenderer improvements 2022-01-23 11:29:56 -07:00
Dustin
019aee277d Remapped MP4x to video/mp4x 2022-01-23 10:17:38 -07:00
Dustin
77a1873930 Fix bugs around seek 2022-01-23 09:22:22 -07:00
Dustin
98b487eb31 Removed unused StreamDataBox 2022-01-23 09:21:40 -07:00
Dustin
b90333af02 Clean up UnboundedIntArray 2022-01-23 09:21:11 -07:00
Dustin
3daa74dceb Tests for AudioFormat, VideoFormat and UnboundedIntArray 2022-01-22 22:10:12 -07:00
Dustin
c4cf876ddb Tests for Mp4vAviTrack and StreamHeaderBox 2022-01-22 20:41:39 -07:00
Dustin
3ce652ead2 Added support for DX50 2022-01-22 16:43:04 -07:00
Dustin
8d9b895f15 Fix ID10T timing error 2022-01-22 14:38:49 -07:00
Dustin
d2bb0c2cc1 Add MJPEG Support 2022-01-22 14:27:28 -07:00
Dustin
6f41585e72 AvcAviTrack cleanup 2022-01-22 09:44:10 -07:00
Dustin
5ebaafde6e Fix Avc Seek 2022-01-22 08:03:49 -07:00
Dustin
4c76bf1a9d Add file chooser to UI, Fixed timing issues on H264, Fixed PAR on XVID and H264 2022-01-21 22:25:32 -07:00
Dustin
d9afe5105b Refactor, remove dead code 2022-01-18 23:25:42 -07:00
Dustin
8d90498f79 Minor Tweaks 2022-01-18 23:04:14 -07:00
Dustin
58a2ca6083 Fix for movi with LIST('rec ') 2022-01-18 15:46:25 -07:00
Dustin
1a1dc44b84 More efficient header parsing 2022-01-18 15:28:10 -07:00
Dustin
a9c9418591 Working! 2022-01-17 22:48:13 -07:00
Dustin
33d22a1268 Tracks parsing, SeekMap (Index) started 2022-01-15 16:42:54 -07:00
huangdarwin
f216fa2042 Transformer GL: Clarify variables and comments.
Simplifying and clarifying variables, and adding comments.

Tested by confirming demo-gl and demo-transformer both
correctly display videos

PiperOrigin-RevId: 421792079
2022-01-14 15:34:09 +00:00
ibaker
a01ead0283 Fix deprecation suppression in RendererCapabilities
This string is case-sensitive.

PiperOrigin-RevId: 421781437
2022-01-14 15:26:18 +00:00
ibaker
66c272c9b0 Reword javadoc of TracksInfo.isTypeSupportedOrEmpty
The existing wording would be correct if prefixed with
"Returns false if [...]", but it seems confusing to a document a boolean
method in terms the condition it returns false - so I reworded it in
terms of when it returns true.

#minor-release

PiperOrigin-RevId: 421682584
2022-01-14 15:22:26 +00:00
ibaker
a36e0cf255 Promote MappedTrackInfo.RendererSupport IntDef to public
This is referred to from the public API surface, so it should also be
public: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/trackselection/MappingTrackSelector.MappedTrackInfo.html#getRendererSupport(int)

#minor-release

PiperOrigin-RevId: 421578232
2022-01-14 15:18:26 +00:00
hschlueter
80851807f2 Use specific error code for exceptions during encoding/decoding.
After this change exceptions throw by MediaCodec during
encoding/decoding will result in TransformationExceptions with
ERROR_CODE_ENCODING_FAILED/ERROR_CODE_DECODING_FAILED.
Before this change ERROR_CODE_FAILED_RUNTIME_CHECK was used.

PiperOrigin-RevId: 421560396
2022-01-14 15:09:52 +00:00
huangdarwin
05924eaa52 Transformer GL: Add pixel test instructions for physical devices
Expected images are taken on emulators, so a larger acceptable
difference from expected images must be accepted on physical devices.

PiperOrigin-RevId: 421543441
2022-01-14 15:06:10 +00:00
aquilescanta
8d81bd58d8 Remove Allocator.release(Allocation[]) and references
PiperOrigin-RevId: 421530365
2022-01-14 15:02:22 +00:00
hschlueter
755df46a6b Remove Transformer-specific things from MediaCodecAdapter.
PiperOrigin-RevId: 421514944
2022-01-14 14:58:40 +00:00
tonihei
b09b8dc2ab Disable live speed adjustment where it has no benefit
Live speed adjustment is used for all live playback at the moment,
but has no user visible effect if the media is not played with low
latency. To avoid unnecessary adjustment during playback without
benefit, this change restricts the live speed adjustment to cases
where either the user requested a speed value in the MediaItem or the
media specifically defined a low-latency stream.

Issue: google/ExoPlayer#9329
PiperOrigin-RevId: 421514283
2022-01-14 14:54:49 +00:00
tonihei
b77204eb4d Update test relying on network type detection to run on all API levels.
This ensures we test the API level specific logic, in particular
around 5G-NSA detection.

Robolectric has a remaining bug that it doesn't support listening
to service state changes. Hence, we need to ignore some tests on
these API levels still until this is fixed.

PiperOrigin-RevId: 421505951
2022-01-14 14:50:58 +00:00
samrobinson
4647a747ca Uncomment line.
Accidentally commented out the Ignore annotation.

PiperOrigin-RevId: 421304369
2022-01-14 14:47:04 +00:00
samrobinson
d18c572d24 Add a Builder for TransformationResult.
PiperOrigin-RevId: 421278099
2022-01-14 14:43:10 +00:00
hschlueter
f8d84eec59 Allow multiple Transformer listeners to be registered.
Multiple listeners can be added to Transformer and its builder.
All or specific listeners can also be removed.

PiperOrigin-RevId: 421047650
2022-01-14 14:39:20 +00:00
hschlueter
bf32ae50d7 Remove MediaCodecAdapter dependency from Transformer.
Codec and its factories can use MediaCodec directly as for API >= 21,
the SynchronousMediaCodecAdapter methods used in Codec just correspond
to a single MediaCodec call each so there is no reason to have another
wrapping layer.

PiperOrigin-RevId: 421041177
2022-01-14 14:35:37 +00:00
hschlueter
a93e8cc620 Update Muxer exception javadoc to match MuxerWrapper.
PiperOrigin-RevId: 421039869
2022-01-14 14:31:41 +00:00
hschlueter
6888a791f0 Add error code and exception type for muxing failures.
Exceptions thrown by MediaMuxer are converted MuxerExceptions
and later to TransformationExceptions with ERROR_CODE_MUXING_FAILED.

PiperOrigin-RevId: 421033721
2022-01-14 14:27:51 +00:00
tonihei
607ef989fb Fix decoder fallback logic for Dolby Atmos and Dolby Vision.
The media codec renderers have fallback logic in getDecoderInfos
to assume that E-AC3 decoders can handle the 2D version of E-AC3-JOC and
that H264/H265 decoders can handle some base layer of Dolby Vision
content. Both fallbacks are useful if there is no decoder for the
enhanced Dolby formats.

Both fallbacks are not applied during track selection at the moment
because the separate MediaCodecInfo.isCodecSupported method verifies
that the mime type corresponding to format.codecs is the same as the
decoder mime type (which isn't true for the fallback case).

To fix the fallback logic, we can just completely remove this additional
check because it's not needed in the context of this method that is only
called after we already established that the decoder can handle the
format.sampleMimeType.

In addition, we need to map the Dolby Vision profiles to the equivalent
H264/H265 profile to make the codec profile comparison sensible again.

PiperOrigin-RevId: 420959104
2022-01-14 14:20:08 +00:00
aquilescanta
c3b470f308 Remove most allocations in SampleQueue.release
SampleQueues may be released in the context of a finally block
after an out of memory error. Allocating in that scenario can
throw yet a new OutOfMemoryError. By safely releasing SampleQueue
memory, we increase the possibility of handling the error
gracefully.

PiperOrigin-RevId: 420859022
2022-01-14 14:16:26 +00:00
olly
8c89c9c688 Require playback to be stuck for a minimum period before failing
PiperOrigin-RevId: 420738165
2022-01-14 14:12:26 +00:00
ibaker
15dc86382f Remove setTag from (Ss|Hls|Dash)MediaSource.Factory
This method has been deprecated since 2.12.0 ([commit](d1bbd3507a)).

Also remove
DashMediaSource.Factory#setLivePresentationDelayMs(long, boolean), this
method has been deprecated since 2.13.0 ([commit](41b58d503a)).

PiperOrigin-RevId: 420719877
2022-01-10 13:00:58 +00:00
ibaker
915f091ebd Remove 'styled' from styledPlayerControlView field name
This class is already called StyledPlayerControlViewLayoutManager, it
seems unecessary to repeate the 'styled' word again in this context.

PiperOrigin-RevId: 420711161
2022-01-10 12:57:27 +00:00