aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacki <jacki@thejackimonster.de>2024-01-19 05:17:13 +0100
committerJacki <jacki@thejackimonster.de>2024-01-19 05:17:13 +0100
commit26cdd5581daeed962c4a481749b42dd87c310a45 (patch)
treead3f098cdfb05f48ff7dbba71511c03545b836eb
parenteb9043d874685dfafae5712f97fb2386041ef263 (diff)
downloadmessenger-gtk-26cdd5581daeed962c4a481749b42dd87c310a45.tar.gz
messenger-gtk-26cdd5581daeed962c4a481749b42dd87c310a45.zip
Fix reset camera list and camera during selection
Signed-off-by: Jacki <jacki@thejackimonster.de>
-rw-r--r--src/ui/new_contact.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/new_contact.c b/src/ui/new_contact.c
index ffa081a..1b79cdc 100644
--- a/src/ui/new_contact.c
+++ b/src/ui/new_contact.c
@@ -106,7 +106,7 @@ handle_camera_combo_box_change(GtkComboBox *widget,
106 if (!handle->pipeline) 106 if (!handle->pipeline)
107 return; 107 return;
108 108
109 gst_element_set_state(handle->pipeline, GST_STATE_PAUSED); 109 gst_element_set_state(handle->pipeline, GST_STATE_NULL);
110 gst_element_set_state(handle->pipeline, GST_STATE_PLAYING); 110 gst_element_set_state(handle->pipeline, GST_STATE_PLAYING);
111} 111}
112 112
@@ -349,6 +349,9 @@ _init_camera_pipeline(MESSENGER_Application *app,
349{ 349{
350 if ((app->portal) && ((access) || xdp_portal_is_camera_present(app->portal))) 350 if ((app->portal) && ((access) || xdp_portal_is_camera_present(app->portal)))
351 { 351 {
352 app->pw.pending = pw_core_sync(app->pw.core, 0, 0);
353
354 pw_main_loop_run(app->pw.main_loop);
352 pw_map_for_each(&(app->pw.globals), iterate_global, handle); 355 pw_map_for_each(&(app->pw.globals), iterate_global, handle);
353 356
354 GtkTreeIter iter; 357 GtkTreeIter iter;