|
@@ -21,6 +21,7 @@ MPCamera *mpcamera = NULL;
|
|
|
|
|
|
static MPPipeline *pipeline;
|
|
|
static GSource *capture_source;
|
|
|
+static bool pipeline_changed = true;
|
|
|
|
|
|
static void
|
|
|
setup(MPPipeline *pipeline, const void *data)
|
|
@@ -52,6 +53,10 @@ mp_io_pipeline_stop()
|
|
|
static void
|
|
|
update_process_pipeline()
|
|
|
{
|
|
|
+ if (!pipeline_changed) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ pipeline_changed = false;
|
|
|
// Grab the latest control values
|
|
|
if (!state_io.gain.manual && state_io.gain.control) {
|
|
|
state_io.gain.value = mp_camera_control_get_int32(
|
|
@@ -268,6 +273,8 @@ on_frame(MPBuffer buffer, void *_data)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ pipeline_changed = true;
|
|
|
+
|
|
|
// Only update controls right after a frame was captured
|
|
|
do_aaa();
|
|
|
update_controls();
|