Commit Graph

127 Commits

Author SHA1 Message Date
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
Cameron Gutman
82619063ee Plumb frame type information into the decoder 2022-05-29 21:58:28 -05:00
Cameron Gutman
5dbf18d66e Fix miscounting IDR frames in video stats 2022-05-29 21:10:41 -05:00
Cameron Gutman
fb09c9692c Fix handling of InterruptedExceptions 2022-05-22 15:31:06 -05:00
Cameron Gutman
0a2117241f Wrap Choreographer calls to releaseOutputBuffer() in try/catch 2022-05-22 14:32:03 -05:00
Cameron Gutman
226e580a30 Prevent microstutter in balanced mode when streaming at 60 FPS on a 120 Hz display 2022-05-14 20:08:41 -05:00
Cameron Gutman
dc85ddb3f9 Reintroduce option of using old frame pacing algorithm using capped FPS 2022-05-08 15:20:08 -05:00
Cameron Gutman
eb9e6443e2 Display frame pacing mode in crash logs 2022-02-18 17:00:21 -06:00
Cameron Gutman
362c466a16 Reintroduce never drop frames option 2022-02-18 16:04:49 -06:00
Cameron Gutman
c25faf6426 Replace frame pacing hack with Choreographer-based rendering
This mimics the frame pacing logic now present in the iOS client.
2022-02-17 23:48:02 -06:00
Cameron Gutman
7552181e24 Plumb setHdrMode callback into MediaCodecDecoderRenderer 2022-02-12 14:31:25 -06:00
Cameron Gutman
834ace4566 Add SoC details and performance class to exception data 2021-07-16 20:00:03 -05:00
Cameron Gutman
8ac5768f4f Change H.265 to HEVC to match other clients 2021-06-12 11:00:30 -05:00
Cameron Gutman
b74e0ce48f Remove receive time from performance overlay
It is superseded by network latency
2021-05-22 14:08:46 -05:00
Cameron Gutman
3f1cd8a118 Use HEVC at 4K on Qualcomm since RFI is temporarily disabled 2021-05-16 20:39:58 -05:00
Cameron Gutman
ea98d64184 Consolidate performance overlay lines to reduce wasted space 2021-05-16 20:20:36 -05:00
Cameron Gutman
9166998442 Fix casts of RTT info 2021-05-15 17:07:08 -05:00
Cameron Gutman
e79c12a038 Add network latency to performance overlay 2021-05-15 16:56:19 -05:00
Cameron Gutman
2ca5182a28 Convert the big perf text block into strings for each line 2021-05-15 16:45:38 -05:00
Cameron Gutman
bac7b68bb1 One more attempt to fix exception parsing 2021-04-26 19:07:54 -05:00
Cameron Gutman
544eac0c8a Attempt to prevent possible error parsing exception string 2021-04-23 19:12:41 -05:00
Cameron Gutman
0c79d756a4 Add more specific problem text to the decoder exceptions 2021-04-19 22:44:17 -05:00
Cameron Gutman
699cc361a2 Add additional vendor-specific low latency options for Qualcomm and HiSilicon SoCs 2021-04-18 12:49:25 -05:00
Cameron Gutman
b1f453f7ba Charge time spent in the decode unit queue to the decoder rather than receive time 2020-12-31 16:35:49 -06:00
Cameron Gutman
b392d7f8e3 Add option to stream at device native resolution
Fixes #155
2020-12-23 16:17:06 -06:00
Cameron Gutman
e53a1f90b0 Correct some callers of time functions that expect monotonic clocks 2020-10-18 20:05:09 -05:00
Cameron Gutman
43c67b4939 Avoid using max operating rate on Android Q and non-Qualcomm devices 2020-07-01 11:26:40 -05:00
Cameron Gutman
6de370b82f Update for Android 11 2020-06-10 20:31:32 -07:00
Cameron Gutman
4dfb0d7220 Fix crash during crash report generation 2020-03-22 13:48:17 -07:00
Cameron Gutman
1c8ad64da0 Only set KEY_FRAME_RATE on M+ to reduce compatibility risk 2020-02-25 20:24:18 -08:00
Cameron Gutman
81b6a8a311 Set the vendor.qti-ext-dec-low-latency.enable Qualcomm vendor extension 2020-02-22 17:06:32 -08:00