rtpjitterbuffer : changing 'latency' property on the fly doesn't work

Thomas DEBESSE thomas.debesse at rcf.fr
Wed Jan 23 08:58:07 PST 2013


Hi, I use Gstreamer 1.0 to receive and decode Opus stream from RTP/UDP.

To do this I use a 'rtpjitterbuffer' plugin between 'udpsrc' and
'rtpopusdepay'. My pipeline looks like this :

udpsrc uri='udp://hostname:port' caps='-some-long-caps-' !
rtpjitterbuffer name=jbuf latency=70 drop-on-latency=True !
rtpopusdepay ! opusdec ! …

If I do (using python3) :
jbuf.get_property('latency')
I get 70, and audio stream is ~70ms late

If I do :
jbuf.set_property('latency', 700)
jbuf.get_property('latency')
I get 700, value seems set correctly… But in fact nothing happens :
audio stream is always ~70ms late, and if I create disturbance on the
network, rtpjitterbuffer seems to drop when packet are 70ms late, not
700ms late !

For comparison, when I change another property on another plugins
('freq' fort 'audiotestsrc', 'bitrate' for 'opusenc'…), change occurs
immediately.

Also, I have tried to restart the plugin doing something like this :
pipeline.set_state(Gst.State.NULL)
pipeline.set_state(Gst.State.PLAYING)

The pipeline does'nt restart correctly and I get this (GST_DEBUG=3) :
0:43:56.642353180  7732  0x9ef70a0 WARN                     bin
gstbin.c:2488:gst_bin_do_latency_func:<pipeline2> failed to query
latency
<enum GST_STATE_CHANGE_ASYNC of type StateChangeReturn>
>>> 0:43:56.666258378  7732  0x9ded460 WARN      gstrtpjitterbuffer gstrtpjitterbuffer.c:2114:gst_rtp_jitter_buffer_sink_query:<jbuf:sink> unhandled serialized query

** (python3:7732): CRITICAL **: gst_audio_decoder_finish_frame:
assertion `buf == NULL || GST_AUDIO_INFO_IS_VALID (&ctx->info)' failed
0:43:57.468472281  7732  0x9ded460 WARN                 basesrc
gstbasesrc.c:2791:gst_base_src_loop:<src> error: Erreur interne de
flux de données.
0:43:57.468568945  7732  0x9ded460 WARN                 basesrc
gstbasesrc.c:2791:gst_base_src_loop:<src> error: streaming task
paused, reason error (-5)

So, rtpjitterbuffer seems to uses latency property only at startup,
and does not support the changes on the fly.

I use Debian (squeeze/sid), and "gst-inspect-1.0 rtpjitterbuffer" said me :
 Version:              1.0.4
  Source release date:  2012-12-18

Is this normal? Is this a bug? How can I change rtpjitterbuffer on the fly ?
Thank you in advance for your answers

-- 
Thomas DEBESSE
RCF Méditerrannée


More information about the gstreamer-devel mailing list