summaryrefslogtreecommitdiff
path: root/rMD-exp/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-07-15 02:00:47 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-07-15 02:00:47 -0700
commitdd4c2fc328a1332642660de376baf0b8b6024874 (patch)
tree282cd88956cce69f297844b7e51fe9d5642202ca /rMD-exp/src
parent19a7c45b7b4adcd13b5481697f5cb82ba378918b (diff)
get_frame: refresh capture_frameno post acquire
Acquiring the new frame can take a potentially significant amount of time, rather than letting any frames dropped during the acquire get all taken by the next frame, update this one to include them. It's both more accurate (the dropped frames occurred literally while this was going on) and makes it more likely get_frame() will have to wait on the upcoming cond_wait(time_cond) for the next tick. If the upcoming cond_wait(time_cond) doesn't wait because a new frame is already pending, it makes it more likely get_frame() will snatch yuv_mutex before the encode/cache thread can wake up and grab it. When that occurs it's effectively dropping frames because the encode/cache thread gets blocked on yuv_mutex while the contents get replaced, so the frames the previous contents were going to be applied to will instead get the updated contents that belong to the future sample's frames.
Diffstat (limited to 'rMD-exp/src')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved