From fc3281cfa8fa33b307a17d1cc6b2d0446a86e58a Mon Sep 17 00:00:00 2001 From: "David R. Robison" Date: Wed, 5 Jul 2017 14:15:55 -0400 Subject: [PATCH 1/2] prevent buffer increase when CPU loaded --- src/gst-plugins/kmsplayerendpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst-plugins/kmsplayerendpoint.c b/src/gst-plugins/kmsplayerendpoint.c index 4facd412b..3a7a84a0b 100644 --- a/src/gst-plugins/kmsplayerendpoint.c +++ b/src/gst-plugins/kmsplayerendpoint.c @@ -1279,7 +1279,7 @@ element_added (GstBin * bin, GstElement * element, gpointer data) if (g_strcmp0 (gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (gst_element_get_factory (element))), RTSPSRC) == 0) { g_object_set (G_OBJECT (element), "latency", self->priv->network_cache, - NULL); + "drop-on-latency", TRUE, NULL); } } From 5f0e8ff2bc91d9d4899a2bfcec9832bc34d2657f Mon Sep 17 00:00:00 2001 From: "David R. Robison" Date: Mon, 12 Feb 2018 13:12:21 -0500 Subject: [PATCH 2/2] Keep samples from piling up --- src/gst-plugins/recorderendpoint/kmsavmuxer.c | 8 ++++++-- src/gst-plugins/recorderendpoint/kmsrecorderendpoint.c | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gst-plugins/recorderendpoint/kmsavmuxer.c b/src/gst-plugins/recorderendpoint/kmsavmuxer.c index 26ee370ea..4fc6db21c 100644 --- a/src/gst-plugins/recorderendpoint/kmsavmuxer.c +++ b/src/gst-plugins/recorderendpoint/kmsavmuxer.c @@ -206,9 +206,13 @@ kms_av_muxer_prepare_pipeline (KmsAVMuxer * self) (self), KMS_BASE_MEDIA_MUXER_GET_URI (self)); g_object_set (self->priv->videosrc, "block", TRUE, "format", GST_FORMAT_TIME, - "max-bytes", 0, NULL); + "is-live", TRUE, "do-timestamp", TRUE, "min-latency", + G_GUINT64_CONSTANT (0), "max-latency", G_GUINT64_CONSTANT (0), + "emit-signals", FALSE, "max-bytes", 1000000, NULL); g_object_set (self->priv->audiosrc, "block", TRUE, "format", GST_FORMAT_TIME, - "max-bytes", 0, NULL); + "is-live", TRUE, "do-timestamp", TRUE, "min-latency", + G_GUINT64_CONSTANT (0), "max-latency", G_GUINT64_CONSTANT (0), + "emit-signals", FALSE, "max-bytes", 100000, NULL); self->priv->mux = kms_av_muxer_create_muxer (self); diff --git a/src/gst-plugins/recorderendpoint/kmsrecorderendpoint.c b/src/gst-plugins/recorderendpoint/kmsrecorderendpoint.c index f5c0b42bf..15f1b21f2 100644 --- a/src/gst-plugins/recorderendpoint/kmsrecorderendpoint.c +++ b/src/gst-plugins/recorderendpoint/kmsrecorderendpoint.c @@ -18,7 +18,7 @@ #include "config.h" #endif -#define _GNU_SOURCE // Enable GNU Extensions: 'ALLPERMS' is not POSIX +#define _GNU_SOURCE // Enable GNU Extensions: 'ALLPERMS' is not POSIX #include #include @@ -1179,7 +1179,7 @@ kms_recorder_endpoint_add_appsink (KmsRecorderEndpoint * self, appsink = gst_element_factory_make ("appsink", NULL); g_object_set (appsink, "emit-signals", FALSE, "async", FALSE, - "sync", FALSE, "qos", FALSE, NULL); + "sync", FALSE, "qos", FALSE, "max-buffers", 2, NULL); gst_bin_add (GST_BIN (self), appsink);