I am looking at the simple_encode_d3d.cpp example and trying to write something similiar that will instead take an individual frame at a time instead of reading from a file and then will write a h264 bytestream out to a socket and had a few questions.
First of all, what is the difference between Stage 1 Encoding loop and Stage 2 which says it retrieves buffered encoded frames? From a code perspective, it appears that they do the exact same thing and I'm not sure why you need to do it twice. How different would this process be if I'm doing it one frame at a time?
Also, regarding the bitstream, do you know how I could split that up into individual packets (or I-frames & B-frames) that could be recieved by a h264 player on the other end after it reads this from a socket?