Skip to content

Instantly share code, notes, and snippets.

@roxlu roxlu/gist:72d5b40950610fac1bbd Secret
Created Jan 14, 2013

Embed
What would you like to do?
I was hoping someone in here could give me some advise on a threaded related
subject. I'm writing a video encoder which has two related functions:
addVideoFrame(void* data, size_t size) and addAudioFrame(void* data, size_t
size);, in these function I copy the data to a std::vector (wrapped around a
"Packet" object). In my threaded function I'm checking if there are new
audio/video packets that I can process.. now I'm wondering what a good approach
is so the reading/writing from this queue of packets is not stalling my main
thread ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.