From: David Woodhouse Date: Fri, 22 Nov 2019 21:02:55 +0000 (+0000) Subject: Fix outbound screenshare dropouts X-Git-Tag: v1.4~43 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=01995c81bf9f0e5bbe45d6b2de525ca919d45512;p=pidgin-chime.git Fix outbound screenshare dropouts I think I've found the reason, along with the reason I could never reproduce it on demand. The videorate element insists on producing precisely one output frame for every third of the second... since the epoch (when GStreamer started up). Not from the start of the call. So if you've only been running Pidgin for a few seconds and you make a test call, and it's the first GStreamer pipeline, it all works fine. Hang up, wait an hour and then share another screen, and it'll send 10800 duplicate copies of the first frame before it ever sends anything else. --- diff --git a/prpl/chat.c b/prpl/chat.c index 54cfe5a..e20cc95 100644 --- a/prpl/chat.c +++ b/prpl/chat.c @@ -576,7 +576,7 @@ static void share_screen(gpointer _chat, PurpleMediaElementInfo *info) } gchar *sinkname = g_strdup_printf("chime_screen_sink_%p", chat->call); - gchar *sinkpipe = g_strdup_printf("videorate ! video/x-raw,framerate=3/1 ! videoconvert ! vp8enc min-quantizer=15 max-quantizer=25 target-bitrate=256000 deadline=1 ! appsink name=%s async=false", sinkname); + gchar *sinkpipe = g_strdup_printf("videorate drop-only=1 max-rate=3 ! videoconvert ! vp8enc min-quantizer=15 max-quantizer=25 target-bitrate=256000 deadline=1 ! appsink name=%s async=false", sinkname); PurpleMediaCandidate *cand = purple_media_candidate_new(NULL, 1, PURPLE_MEDIA_CANDIDATE_TYPE_HOST,