Cameron Gutman
67bcc56c6d
Remove strict codec recovery timeout
...
Codec recovery depends on incoming frames, so it cannot be reliably time-constrained
2023-02-26 13:26:01 -06:00
Cameron Gutman
b961636f02
Plumb HDR metadata into MediaCodec
2023-02-20 21:42:45 -06:00
Cameron Gutman
a6c8db6c2c
Introduce full range color option
2022-11-29 19:10:19 -06:00
Cameron Gutman
56eddff8d6
Default to Rec 709 on modern devices
...
Fixes #1138
Closes #1143
2022-11-13 13:47:41 -06:00
Cameron Gutman
af784cf79b
Fix typo in boolean logic
2022-11-04 01:22:19 -05:00
Cameron Gutman
a2b2131beb
Add support for codec flush recovery
2022-11-04 01:20:00 -05:00
Cameron Gutman
0ddd8df272
Use HEVC by default if the decoder supports FEATURE_LowLatency or the media performance class is 12+
2022-10-31 01:05:01 -05:00
Cameron Gutman
d0432de981
Plumb colorspace and color range into MediaCodecDecoderRenderer
2022-10-13 00:51:15 -05:00
Cameron Gutman
1076b516d6
Enable HEVC RFI for decoders that support low latency options
2022-10-12 21:25:48 -05:00
Cameron Gutman
585dc45595
Enable RFI for HEVC on Qualcomm and Nvidia decoders
2022-10-03 21:33:05 -05:00
Cameron Gutman
9c792d3272
Adjust RendererException text to attempt to parse correctly in Google Play App Vitals
2022-10-03 21:28:37 -05:00
Cameron Gutman
539daf5789
Don't adjust maxBytesPerPicDenom and maxBitsPerMbDenom on newer devices
2022-09-23 21:27:27 -05:00
Cameron Gutman
2c498ce707
Throw a RendererException instead of a bare IllegalStateException upon codec recovery failure
2022-09-20 21:43:35 -05:00
Cameron Gutman
bc483edb29
Interrupt codec recovery when stopping the decoder
2022-09-18 18:53:37 -05:00
Cameron Gutman
9762f4c412
Only throw the codec exception on the last configuration attempt
2022-09-18 18:47:01 -05:00
Cameron Gutman
5bfce88fc5
Fix recovery timeout if no output frames are being received
2022-09-18 18:37:33 -05:00
Cameron Gutman
94ef66994d
Trigger the decoder crash dialog if all recovery attempts fail
2022-09-18 18:29:45 -05:00
Cameron Gutman
257c29daca
Improve handling of concurrent recoverable and non-recoverable errors and surface loss
2022-09-18 18:25:29 -05:00
Cameron Gutman
173483eb84
Only catch IllegalStateException or subclasses
2022-09-18 17:42:37 -05:00
Cameron Gutman
06099b2663
Only try to recover from CodecExceptions or IllegalStateExceptions
2022-09-18 00:20:41 -05:00
Cameron Gutman
33c1f0a71c
Fix decoding crash if encoder didn't send VUI parameters
2022-09-18 00:04:29 -05:00
Cameron Gutman
c72707aef9
Don't begin codec recovery if stopping
2022-09-17 13:52:22 -05:00
Cameron Gutman
2a2c84ef3a
Implement fallbacks for a failed codec restart or reset
2022-09-16 03:48:49 -05:00
Cameron Gutman
bc97db893a
Allow recovery of IllegalStateExceptions for older versions of Android
2022-09-16 03:28:57 -05:00
Cameron Gutman
f216834df7
Limit the number of codec recovery attempts
2022-09-16 03:27:22 -05:00
Cameron Gutman
be25a7d594
Fix a number of bugs in new codec recovery code
2022-09-16 03:19:36 -05:00
Cameron Gutman
10f43e8024
Try to adjust decoder exception to comply with Google Play crash message filtering
2022-09-16 00:32:34 -05:00
Cameron Gutman
bbb3e8d071
Only catch RuntimeExceptions for decoders to avoid eating important exceptions
2022-09-16 00:26:02 -05:00
Cameron Gutman
8656228014
Break out of wait on InterruptedException
2022-09-16 00:09:09 -05:00
Cameron Gutman
9cf27d8fb1
Don't throw exceptions during codec recovery
2022-09-15 02:16:24 -05:00
Cameron Gutman
1673236940
Abort if the decoder doesn't recover within 5 seconds
2022-09-15 01:37:10 -05:00
Cameron Gutman
06861a2d17
Add support for recovering from non-transient CodecExceptions
2022-09-15 01:15:15 -05:00
Cameron Gutman
ef7ac62f97
Improve handling of transient CodecExceptions
2022-09-15 00:08:06 -05:00
Cameron Gutman
245a9f2751
Try a new input buffer if getInputBuffer() returns null
2022-09-14 23:54:07 -05:00
Cameron Gutman
1d38f158b5
Fix crash after the next fetchNextInputBuffer() if getInputBuffer() failed previously
2022-09-14 23:49:49 -05:00
Cameron Gutman
49051a5095
Prefetch input buffers while waiting for the next frame to arrive
2022-09-06 00:59:45 -05:00
Cameron Gutman
7734de6465
Fix handling of 3 byte Annex B start sequences
2022-09-05 22:32:13 -05:00
Cameron Gutman
0fbb53c606
Remove MediaCodecHelper.getMonotonicMillis()
2022-08-02 18:08:12 -05:00
Cameron Gutman
b70a47f5e5
Negotiate the higher of the two decoder slices-per-frame preferences to provide best performance
2022-08-01 22:26:00 -05:00
Cameron Gutman
2e442cb1d1
Only use 4 slices per frame on old Qualcomm devices that benefit from it
...
Using it everywhere decreases encoding efficiency for no gain in performance
2022-07-22 18:43:59 -05:00
Cameron Gutman
c743949df5
Don't crash if no performance data was provided for the codec using the M API
2022-06-18 10:37:16 -05:00
Cameron Gutman
f207a3f6d1
Use areSizeAndRateSupported() as a last resort if no performance data is available
2022-06-18 10:35:12 -05:00
Cameron Gutman
d4490f0e17
Fix performance point check for Android M - P
2022-06-06 17:26:59 -05:00
Cameron Gutman
d04e7a3231
Enable HEVC on untested decoders if it's the only way to meet the performance target
2022-06-04 17:37:14 -05:00
Cameron Gutman
5b456aba27
Use a separate HandlerThread for Choreographer callbacks
2022-06-04 17:00:58 -05:00
Cameron Gutman
0c065dcc1f
Print vendor parameters on Android 12
2022-06-04 15:42:06 -05:00
Cameron Gutman
19d8ae0f78
Revamp low latency option handling
...
- Introduce a tiered solution where we try progressively fewer options until one works
- Use vdec-lowlatency for all devices, since we know at least the Fire TV 3 supports it with an Amlogic SoC
- Enable HEVC on Fire TV 3 since vdec-lowlatency avoids the HEVC decoder bug
2022-06-03 01:04:11 -05:00
Cameron Gutman
d7ffb5dddc
Refactor decoder creation code to allow retries
2022-06-02 21:17:20 -05:00
Cameron Gutman
18c93abcb3
Submit fused IDR frames on decoders that support adaptive playback even if they are blocked from using it
2022-05-29 22:21:15 -05:00
Cameron Gutman
bd64dfb661
Submit codec config data with a timestamp of 0 like MediaCodec does with csd-0
2022-05-29 22:10:49 -05:00