summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-04-07 15:27:14 +0100
committerFrediano Ziglio <freddy77@gmail.com>2021-06-14 11:56:23 +0100
commit6b90661822bc496bfdaeb5dfb26695712f30a813 (patch)
treed5613aa6e83592a65ac957fadf2e68b68c50e232
parent1d6315db96fba42d5b08dd6710f48fdb55ff535f (diff)
DEBUG use environment for testing...
-rw-r--r--server/gstreamer-encoder.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index 455c48f3..6e424add 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -994,6 +994,14 @@ static const gchar* get_gst_codec_name(const SpiceGstEncoder *encoder)
}
}
+static const char *opts = "max-bframes=0 min-qp=5 ! video/x-h264,profile=high";
+SPICE_CONSTRUCTOR_FUNC(opts_init)
+{
+ const char *s = g_getenv("SPICE_GST_OPTS");
+ if (s)
+ opts = s;
+}
+
static gboolean create_pipeline(SpiceGstEncoder *encoder)
{
#ifdef HAVE_GSTREAMER_0_10
@@ -1076,7 +1084,7 @@ static gboolean create_pipeline(SpiceGstEncoder *encoder)
* - low-power Low power mode
* - view-ids. Set of View Ids used for MVC encoding.
*/
- gstenc_opts = g_strdup("max-bframes=0 min-qp=5 ! video/x-h264,profile=high"); // rate-control=cbr bitrate=1200");
+ gstenc_opts = g_strdup(opts); // rate-control=cbr bitrate=1200");
#endif
break;
default: