moonlight-stream / moonlight-common-c

Core implementation of Nvidia's GameStream protocol
GNU General Public License v3.0
448 stars 166 forks source link

Forward Error Correction #24

Closed irtimmer closed 7 years ago

irtimmer commented 7 years ago

This patch set contains code changes needed to support FEC. The code to do the actual error correction is still missing as I currently only get it to work with a single FEC packet per frame.

A new queue is added which buffers the whole frame as error correction is done on whole frames. Reordening of packets therefore only works for packets in the same frame and instead of keeping a max size and max time the receiving of the next frame is used to flush the packets from the current frame to the video depacketizer.

irtimmer commented 7 years ago

Initial implementation for doing error-correction with single FEC packet has been added

irtimmer commented 7 years ago

The problems with multiple FEC packets have been solved. So most of the code is ready, although their are probably still some places on where the FEC implementation could use some improvements

irtimmer commented 7 years ago

Thank you for reviewing the code. The reedsolomon code has been copied from https://github.com/jannson/reedsolomon-c including the fprintf and indention issues ;). Minimal changes has been made to make it work with GameStream. Soon I hope to cleanup the code a little bit more.