mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
camerabin2: Don't store preview location if preview isn't requested
Do not store preview location is post-previews is false, this would mess up preview naming in case application switches between enabling and disabling previews
This commit is contained in:
parent
5ca3c9477e
commit
9ab6406f23
1 changed files with 11 additions and 10 deletions
|
@ -377,11 +377,6 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin)
|
|||
|
||||
GST_CAMERA_BIN2_PROCESSING_INC (camerabin);
|
||||
|
||||
if (camerabin->post_previews) {
|
||||
/* Count processing of preview images too */
|
||||
GST_CAMERA_BIN2_PROCESSING_INC (camerabin);
|
||||
}
|
||||
|
||||
if (camerabin->location)
|
||||
location = g_strdup_printf (camerabin->location, capture_index);
|
||||
|
||||
|
@ -410,11 +405,17 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin)
|
|||
g_slist_append (camerabin->image_location_list, g_strdup (location));
|
||||
}
|
||||
|
||||
/* store the next preview filename */
|
||||
g_mutex_lock (camerabin->preview_list_mutex);
|
||||
camerabin->preview_location_list =
|
||||
g_slist_append (camerabin->preview_location_list, location);
|
||||
g_mutex_unlock (camerabin->preview_list_mutex);
|
||||
if (camerabin->post_previews) {
|
||||
/* Count processing of preview images too */
|
||||
GST_CAMERA_BIN2_PROCESSING_INC (camerabin);
|
||||
/* store the next preview filename */
|
||||
g_mutex_lock (camerabin->preview_list_mutex);
|
||||
camerabin->preview_location_list =
|
||||
g_slist_append (camerabin->preview_location_list, location);
|
||||
g_mutex_unlock (camerabin->preview_list_mutex);
|
||||
} else {
|
||||
g_free (location);
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (camerabin->src, "start-capture", NULL);
|
||||
if (camerabin->mode == MODE_VIDEO && camerabin->audio_src)
|
||||
|
|
Loading…
Reference in a new issue