bitwhip
bitwhip copied to clipboard
Fix: Better Encode Loop for Stream command
This PR is dependant on https://github.com/bitwhip/bitwhip/pull/11, see the second commit for the specific changes
- I've created an iterator interface over an encoder + source to help structure the code in main.
- the existing logic for the encode loop needed some more thought because it seems to busy loop, constantly polling the source until it receives a frame instead of EAGAIN. ie the ffmpeg api DOESN'T BLOCK waiting for the frame
- I don't have a windows box to test the existing dxduplicator source ( filter graph based ), but I assume it would do the same?