88 Commits

Author SHA1 Message Date
Cameron Gutman
e0d83f61c2 Fix missing debug message when an I-frame is sent as an RFI recovery frame for AV1 2023-08-14 21:32:38 -05:00
Cameron Gutman
8bca948b61 Fix unused function warning on release builds 2023-08-12 15:08:22 -05:00
Cameron Gutman
a0b29fe3dc Avoid asserting on filler NALUs in reference frames on debug builds 2023-08-12 05:32:11 -05:00
Cameron Gutman
49fef03830 Change frameHeaderSize to uint32_t to avoid warning from promotion to signed int 2023-07-08 01:40:44 -05:00
Cameron Gutman
9205a87002 Improve validation of lastPacketPayloadLength field 2023-07-08 01:31:41 -05:00
Cameron Gutman
ed7d72c07d Fix single packet frame case for AV1 2023-07-06 01:41:15 -05:00
Cameron Gutman
190b08ecf4 Encode the final packet length in the frame header for AV1
Some decoders (Android) are very strict about trailing padding bytes.
2023-07-06 01:29:24 -05:00
Cameron Gutman
953971c9a3 Fix handling of AV1 keyframes 2023-07-05 18:45:29 -05:00
Cameron Gutman
e36bde4acc Implement AV1 codec support
This has a breaking change to StreamConfiguration that requires client updates.
2023-07-02 22:16:20 -05:00
ns6089
284840bde7 Add support for sunshine host latency 2023-05-03 20:38:42 -05:00
Cameron Gutman
c9426a6a71 Add HDR and colorspace fields to DECODE_UNIT 2023-03-11 11:36:21 -06:00
Cameron Gutman
8186687093 Fix video header parsing assert with GFE 3.27 2023-02-13 21:26:47 -06:00
Cameron Gutman
ef9ad529a4 Skip PPS NALUs prepended to P-frames 2023-01-02 23:48:16 -06:00
Cameron Gutman
9da6329496 Fix integer truncation warning on MSVC 2022-12-06 17:33:43 -06:00
Cameron Gutman
5c7a5ce129 Remove overzealous assert 2022-12-06 17:23:11 -06:00
Cameron Gutman
bc00d957d3 Synthesize a PTS for hosts that don't send one 2022-12-06 17:22:02 -06:00
Cameron Gutman
4840e431f4 Call notifyKeyFrameReceived() before the decoder processes the frame
We don't care if the decoder processes it successfully.
2022-11-21 02:22:26 -06:00
Cameron Gutman
1e582e3e58 Improve decode unit validation 2022-11-21 02:17:47 -06:00
Cameron Gutman
549058d9d1 Assert that P-frames are not processed before IDR frames 2022-11-12 19:42:51 -06:00
Cameron Gutman
56d6b7ff5a Ensure RFI is not used when an IDR frame is needed 2022-11-12 19:22:13 -06:00
Cameron Gutman
5f92ecafe7 Avoid triggering RFI wait code for decode unit queue overflow 2022-10-06 21:25:48 -05:00
Cameron Gutman
44668bd256 Distinguish speculative RFIs from normal FEC-initiated RFIs 2022-10-06 21:21:00 -05:00
Cameron Gutman
947d1b5aef Predictive RFI -> Speculative RFI 2022-10-06 21:20:44 -05:00
Cameron Gutman
7d1a081fd0 Fix signature of notifyFrameLost() and add additional assert 2022-10-06 20:38:55 -05:00
Cameron Gutman
f2dd7888f7 Immediately request an IDR frame on corrupt frame 2022-10-06 20:36:53 -05:00
Cameron Gutman
5e1be51b84 Implement predictive RFI to recover more quickly from frame loss
With predictive RFI, we can recover from a lost frame as soon as the next frame
by predicting whether we will have enough FEC data to be be able to recover a
frame based on the sequence numbers of the received packets.
2022-10-05 22:04:22 -05:00
Cameron Gutman
9240090983 Add LiRequestIdrFrame() API for requesting an IDR frame on demand 2022-10-05 00:46:56 -05:00
Cameron Gutman
dbfbc91971 Explicitly request an IDR frame in the IDR frame wait path 2022-10-03 18:27:57 -05:00
Cameron Gutman
a4870f619b Frame type fields are present all the way back to GFE 3.2 (and probably further) 2022-10-03 18:26:24 -05:00
Cameron Gutman
4c62b5d23a Fix fallback handling of RFI on older servers 2022-10-03 18:25:08 -05:00
Cameron Gutman
3593dea585 Rework RFI to work reliably with HEVC 2022-10-02 22:19:48 -05:00
Cameron Gutman
795e3f644a Ensure the next frame after a DU drop is always an IDR frame
On RFI-capable decoders, this would sometimes be a P-frame
2022-10-02 21:12:01 -05:00
Cameron Gutman
3ae777f973 Try to recover if the frame header parsing fails 2022-09-24 13:43:32 -05:00
Cameron Gutman
54825845e7 Fix large frame header size for GFE 3.26 2022-09-22 21:51:11 -05:00
Cameron Gutman
50603ac16e Fix mishandling of IDR frames with a VUI or AUD NAL 2022-09-11 23:34:38 -05:00
Cameron Gutman
e453a4d548 Add 3 byte Annex B start sequence test mode for debugging clients 2022-09-05 17:41:37 -05:00
Cameron Gutman
5a2911ffe4 Rework NALU parsing to be more robust handling 3 byte prefixes 2022-09-05 16:45:14 -05:00
Cameron Gutman
921b59c467 Add API to wake a waiting thread in LiWaitForNextVideoFrame() 2022-01-17 14:12:11 -06:00
Cameron Gutman
fa892c5334 Remove SEI prefix NAL units before returning data to clients 2021-07-09 17:37:30 -05:00
Cameron Gutman
68c784445c Introduce optional pull-based API for video data 2021-06-13 15:14:38 -05:00
Cameron Gutman
9361c325bb Rename RtpFecQueue to RtpVideoQueue to match RtpAudioQueue 2021-06-01 22:57:26 -05:00
Cameron Gutman
8f371343cd Consolidate includes 2021-04-29 17:22:15 -05:00
Cameron Gutman
83b1b17f87 Add specific logging for frames dropped completely 2021-04-27 17:39:00 -05:00
Cameron Gutman
7174caf5f1 Implement support for multi-FEC frames 2021-04-26 20:36:07 -05:00
Cameron Gutman
8dab1ee300 Use stdint.h types for Video.h 2021-04-26 17:08:44 -05:00
Cameron Gutman
a51cc972d3 Add APP_VERSION_AT_LEAST() macro for cleaner GFE version checks 2021-04-09 07:26:24 -05:00
Cameron Gutman
b528867466 Change NAL type parsing to match the spec and add AUD removal for H.264 2021-03-29 19:27:19 -05:00
Cameron Gutman
8b1fbc770e Discard AUD NALs prepended to incoming frames 2021-03-28 10:34:01 -05:00
Cameron Gutman
fd950b6452 Allow applications to reliably calculate decode unit queue delay 2020-12-31 16:08:00 -06:00
Cameron Gutman
97ca7b099f Report frames to the control stream code before FEC reconstruction 2020-12-24 11:08:31 -06:00