Decouple capture frame counter from the burst length
This commit is contained in:
@@ -822,10 +822,9 @@ process_image(MPPipeline *pipeline, const MPBuffer *buffer)
|
|||||||
GdkTexture *thumb = process_image_for_preview(image);
|
GdkTexture *thumb = process_image_for_preview(image);
|
||||||
|
|
||||||
if (state_proc.captures_remaining > 0) {
|
if (state_proc.captures_remaining > 0) {
|
||||||
int count = state_proc.burst_length - state_proc.captures_remaining;
|
|
||||||
--state_proc.captures_remaining;
|
--state_proc.captures_remaining;
|
||||||
|
|
||||||
process_image_for_capture(image, count);
|
process_image_for_capture(image, state_proc.counter++);
|
||||||
|
|
||||||
if (state_proc.captures_remaining == 0) {
|
if (state_proc.captures_remaining == 0) {
|
||||||
assert(thumb);
|
assert(thumb);
|
||||||
@@ -885,6 +884,7 @@ capture()
|
|||||||
strcpy(burst_dir, tempdir);
|
strcpy(burst_dir, tempdir);
|
||||||
|
|
||||||
state_proc.captures_remaining = state_proc.burst_length;
|
state_proc.captures_remaining = state_proc.burst_length;
|
||||||
|
state_proc.counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -76,6 +76,7 @@ typedef struct state_proc {
|
|||||||
|
|
||||||
int burst_length;
|
int burst_length;
|
||||||
int captures_remaining;
|
int captures_remaining;
|
||||||
|
int counter;
|
||||||
int preview_width;
|
int preview_width;
|
||||||
int preview_height;
|
int preview_height;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user