messenger-gtk

Gtk+3 graphical user interfaces for GNUnet Messenger
Log | Files | Refs | Submodules | README | LICENSE

commit 6dd7462bd3e611449a64162ae9e8a4e58bce28a3
parent f136f66efbdd65dc17fc3f3c985d54147a3cd33d
Author: Jacki <jacki@thejackimonster.de>
Date:   Fri,  9 Aug 2024 01:58:04 +0200

Fix lag in video stream when activating it dynamically

Signed-off-by: Jacki <jacki@thejackimonster.de>

Diffstat:
Msrc/discourse.c | 4++--
Msrc/ui/discourse.c | 5+++++
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/discourse.c b/src/discourse.c @@ -146,7 +146,7 @@ _setup_video_gst_pipelines_of_subscription(MESSENGER_DiscourseSubscriptionInfo * g_assert(info); info->video_stream_pipeline = gst_parse_launch( - "appsrc name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! gtksink name=sink", + "appsrc name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! gtksink name=sink sync=false", NULL ); @@ -538,7 +538,7 @@ _setup_video_gst_pipelines(MESSENGER_DiscourseInfo *info) g_assert(info); info->video_record_pipeline = gst_parse_launch( - "v4l2src ! videoscale ! video/x-raw,width=1280,height=720 ! videoconvert ! video/x-raw,format=I420,rate=30,width=1280,height=720 ! x264enc bitrate=1500 key-int-max=30 tune=zerolatency byte-stream=true ! video/x-h264,width=1280,height=720,profile=baseline ! rtph264pay aggregate-mode=zero-latency mtu=45000 ! capsfilter name=filter ! fdsink name=sink", + "autovideosrc ! video/x-raw,framerate={ [ 0/1, 30/1 ] } ! videoscale ! video/x-raw,width=1280,height=720 ! videoconvert ! video/x-raw,format=I420 ! x264enc bitrate=1000 speed-preset=fast bframes=0 key-int-max=30 tune=zerolatency byte-stream=true ! video/x-h264,profile=baseline ! rtph264pay aggregate-mode=zero-latency mtu=45000 ! capsfilter name=filter ! fdsink name=sink", NULL ); diff --git a/src/ui/discourse.c b/src/ui/discourse.c @@ -105,6 +105,9 @@ handle_microphone_button_click(UNUSED GtkButton *button, } static void +_discourse_update_members(UI_DISCOURSE_Handle *handle); + +static void handle_camera_button_click(UNUSED GtkButton *button, gpointer user_data) { @@ -115,6 +118,8 @@ handle_camera_button_click(UNUSED GtkButton *button, handle->stream_camera = !(handle->stream_camera); if (handle->video_discourse) discourse_set_mute(handle->video_discourse, !(handle->stream_camera)); + + _discourse_update_members(handle); } static void