summaryrefslogtreecommitdiffstats
path: root/src/modules/rtp
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-05 02:26:02 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-05 02:26:02 +0200
commitd035f4a3f3e73fd67d69a03c03adc9a08f30ef21 (patch)
tree52316988c7bcbd495ba4a53a337f7c9b3c813286 /src/modules/rtp
parent1c26d7e174ba54c062c0ae50d33bf4e819bb15ba (diff)
Modify smoothing code to make cubic interpolation optional and allow 'quick fixups' on resuming
The primary reason for this change is to allow time graphs that do not go through the origin and hence smoothing starting from the origin is not desired. This change will allow passing time data into the smoother while paused and then abruptly use that data without smoothing using the 'quick fixup' flag when resuming. Primary use case is allowing recording time graphs where the data recorded originates from a time before the stream was created. The resulting graft will be shifted and should not be smoothened to go through the origin.
Diffstat (limited to 'src/modules/rtp')
-rw-r--r--src/modules/rtp/module-rtp-recv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 209770f9..445941cc 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -430,8 +430,14 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
s->sdp_info = *sdp_info;
s->rtpoll_item = NULL;
s->intended_latency = LATENCY_USEC;
- s->smoother = pa_smoother_new(PA_USEC_PER_SEC*5, PA_USEC_PER_SEC*2, TRUE, 10);
- pa_smoother_set_time_offset(s->smoother, pa_timeval_load(&now));
+ s->smoother = pa_smoother_new(
+ PA_USEC_PER_SEC*5,
+ PA_USEC_PER_SEC*2,
+ TRUE,
+ TRUE,
+ 10,
+ pa_timeval_load(&now),
+ FALSE);
s->last_rate_update = pa_timeval_load(&now);
pa_atomic_store(&s->timestamp, (int) now.tv_sec);