summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorStian Selnes <stian@pexip.com>2016-08-02 13:45:54 +0200
committerTim-Philipp Müller <tim@centricular.com>2017-11-25 11:10:27 +0000
commit531b1e326f06a75ac526d6f33dc20d7222472827 (patch)
tree5ceeaed49c9a3b06f4db62f7277b995ecc082981 /gst
parent9416d364631de23ff88dd679c8cdcb95f40d9c8a (diff)
netsim: Change max-delay to be inclusive
It is more intuitive for the user that in order to acheive a constant delay min-delay and max-delay are equal.
Diffstat (limited to 'gst')
-rw-r--r--gst/netsim/gstnetsim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/netsim/gstnetsim.c b/gst/netsim/gstnetsim.c
index 44aa1d20a..d615ba0a6 100644
--- a/gst/netsim/gstnetsim.c
+++ b/gst/netsim/gstnetsim.c
@@ -223,7 +223,7 @@ push_buffer_ctx_push (PushBufferCtx * ctx)
static gint
get_random_value_uniform (GRand * rand_seed, gint32 min_value, gint32 max_value)
{
- return g_rand_int_range (rand_seed, min_value, max_value);
+ return g_rand_int_range (rand_seed, min_value, max_value + 1);
}
/* Generate a value from a normal distributation with 95% confidense interval
@@ -587,7 +587,7 @@ gst_net_sim_class_init (GstNetSimClass * klass)
g_object_class_install_property (gobject_class, PROP_MAX_DELAY,
g_param_spec_int ("max-delay", "Maximum delay (ms)",
- "The maximum delay in ms to apply to buffers",
+ "The maximum delay (inclusive) in ms to apply to buffers",
G_MININT, G_MAXINT, DEFAULT_MAX_DELAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));