messenger-gtk

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

commit 18426ed4cd6c98148390d268fa36e8918c9ac94e
parent 9ecb70e392578f2f4bbb569dd0c16a0304350af2
Author: Jacki <jacki@thejackimonster.de>
Date:   Thu,  8 Aug 2024 20:08:37 +0200

Optimize pipelines for video streaming

Diffstat:
Msrc/discourse.c | 7+++++--
1 file changed, 5 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 max-bytes=4000000 ! rtph264depay ! avdec_h264 ! videoconvert ! gtksink name=sink", + "appsrc name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! gtksink name=sink", NULL ); @@ -400,6 +400,9 @@ discourse_subscription_stream_message(MESSENGER_DiscourseSubscriptionInfo *info, g_signal_emit_by_name(appsrc, "push-buffer", buffer, &ret); + if ((appsrc) && (!(info->position))) + gst_element_set_state(appsrc, GST_STATE_PLAYING); + info->position += duration; skip_buffer: @@ -535,7 +538,7 @@ _setup_video_gst_pipelines(MESSENGER_DiscourseInfo *info) g_assert(info); info->video_record_pipeline = gst_parse_launch( - "videotestsrc ! videoconvert ! video/x-raw,format=I420,rate=30,width=1280,height=720 ! x264enc tune=zerolatency ! rtph264pay ! capsfilter name=filter ! fdsink name=sink", + "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", NULL );