summaryrefslogtreecommitdiff
path: root/src/rmd_encode_image_buffer.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-07-14 18:01:32 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-07-14 18:01:32 -0700
commit2101b1f76e5e7eab4b4ea632db226fb76d99eeda (patch)
tree1cac403371ba8104c3b3608b7a1a7b0860a5b46a /src/rmd_encode_image_buffer.h
parentb75da7c41ea49c78ac9362f8837d4df9469613c6 (diff)
*: rework avd/frameno handling for cached mode
This brings the !--on-the-fly-encoding mode up to speed. The cached file header loses the total_frames counter, as the capture_frameno already represents this. Dropped frames are detected by simply looking at the difference between the previous capture_frameno and the current one. This simply gets passed to the encoder as a n_frames count so theora can duplicate the frames as needed. This was being done manually before by looking at the frameno and total frames in each header and maintaining separate counts for "extra frames" "missed frames" etc, and resubmitting entire frames multiply for encoding dropped frames. So a chunk of code has been thrown out from rmd_load_cache.c, and some general cleanups have occurred there as well. I also needed to add more locking around pdata->avd accesses.
Diffstat (limited to 'src/rmd_encode_image_buffer.h')
-rw-r--r--src/rmd_encode_image_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rmd_encode_image_buffer.h b/src/rmd_encode_image_buffer.h
index e5ca3db..d011e26 100644
--- a/src/rmd_encode_image_buffer.h
+++ b/src/rmd_encode_image_buffer.h
@@ -34,6 +34,7 @@
* feed a yuv buffer to the theora encoder and submit outcome to
* the ogg stream.
* \param pdata ProgData struct containing all program data
+* \param n_frames number of frames to encode from image buffer
*/
void *rmdEncodeImageBuffer(ProgData *pdata);
@@ -44,7 +45,7 @@ void *rmdEncodeImageBuffer(ProgData *pdata);
* \param pdata ProgData struct containing all program data
*
*/
-void rmdSyncEncodeImageBuffer(ProgData *pdata);
+void rmdSyncEncodeImageBuffer(ProgData *pdata, unsigned int n_frames);
#endif
© All Rights Reserved