obs-virtual-cam icon indicating copy to clipboard operation
obs-virtual-cam copied to clipboard

what if shared_queue_push_video much faster then shared_queue_get_video ?

Open shithappens2016 opened this issue 8 years ago • 1 comments

shared_queue_push_video just keep writing the ring buffer.

what if shared_queue_get_video is much slower then shared_queue_push_video ?

e.g.

shared_queue_get_video has just finished first buffer and about to do the second buffer.

mean while, shared_queue_push_video has alreadly completed the first lap, and overwritten the second

buffer.

shithappens2016 avatar Aug 30 '17 09:08 shithappens2016

Your concern is absolutely right, It just hardly happen when the circular queue long enough. If it really happen, the directshow interface will get wrong bitmap and perform like a drop frame video. I think timecode can be used to detect this situation to reset the index. But if the computer is always slow (more than 300 ms delay), this project definitely can't run on that PC. Maybe make a Warning and stop output will be better?

CatxFish avatar Aug 30 '17 09:08 CatxFish