|
@@ -81,6 +81,7 @@ update_process_pipeline()
|
|
.preview_width = state_io.preview_width,
|
|
.preview_width = state_io.preview_width,
|
|
.preview_height = state_io.preview_height,
|
|
.preview_height = state_io.preview_height,
|
|
.device_rotation = state_io.device_rotation,
|
|
.device_rotation = state_io.device_rotation,
|
|
|
|
+ .colorspace = state_io.colorspace,
|
|
|
|
|
|
.gain.control = state_io.gain.control,
|
|
.gain.control = state_io.gain.control,
|
|
.gain.auto_control = state_io.gain.auto_control,
|
|
.gain.auto_control = state_io.gain.auto_control,
|
|
@@ -144,6 +145,7 @@ capture(MPPipeline *pipeline, const void *data)
|
|
mp_camera_stop_capture(mpcamera);
|
|
mp_camera_stop_capture(mpcamera);
|
|
struct v4l2_format format = { 0 };
|
|
struct v4l2_format format = { 0 };
|
|
libmegapixels_select_mode(state_io.camera, state_io.mode_capture, &format);
|
|
libmegapixels_select_mode(state_io.camera, state_io.mode_capture, &format);
|
|
|
|
+ state_io.colorspace = format.fmt.pix.colorspace;
|
|
state_io.flush_pipeline = true;
|
|
state_io.flush_pipeline = true;
|
|
|
|
|
|
mp_camera_start_capture(mpcamera);
|
|
mp_camera_start_capture(mpcamera);
|
|
@@ -326,6 +328,7 @@ on_frame(MPBuffer buffer, void *_data)
|
|
struct v4l2_format format = { 0 };
|
|
struct v4l2_format format = { 0 };
|
|
libmegapixels_select_mode(
|
|
libmegapixels_select_mode(
|
|
state_io.camera, state_io.mode_preview, &format);
|
|
state_io.camera, state_io.mode_preview, &format);
|
|
|
|
+ state_io.colorspace = format.fmt.pix.colorspace;
|
|
state_io.flush_pipeline = true;
|
|
state_io.flush_pipeline = true;
|
|
|
|
|
|
mp_camera_start_capture(mpcamera);
|
|
mp_camera_start_capture(mpcamera);
|
|
@@ -498,6 +501,7 @@ update_state(MPPipeline *pipeline, const mp_state_io *new_state)
|
|
libmegapixels_select_mode(state_io.camera,
|
|
libmegapixels_select_mode(state_io.camera,
|
|
state_io.mode_preview,
|
|
state_io.mode_preview,
|
|
&format);
|
|
&format);
|
|
|
|
+ state_io.colorspace = format.fmt.pix.colorspace;
|
|
}
|
|
}
|
|
|
|
|
|
mp_camera_start_capture(mpcamera);
|
|
mp_camera_start_capture(mpcamera);
|