alsasrc: different behaviour and clocking between 1.2 and 1.1.4
Adrian Pardini
listas at tangopardo.com.ar
Fri Oct 11 15:52:54 CEST 2013
Hello all,
I'm working on a python (with gi) application where most of the time
my pipeline is something like:
audio bin: [ alsasrc ! queue2 ! caps ! volume ! tee ] ! queue2 !
(adder/liveadder , volume and sink)
video bin: [ v4l2src ! queue2 ! caps ! tee ] ! queue2 ! (videomixer and sink)
At some point I create a bin to hold a muxer (avimux or matroskamux)
linked to a filesink, then I link the mux to the tees with a queue2
between and after that call sync_state_with_parent() on the bin.
With 1.1.4 it works flawlesly, however with 1.2.0 the pipeline freezes
for a while and sometimes resumes playing but with a lot of video
stuttering and no audio.
Thinking about https://bugzilla.gnome.org/show_bug.cgi?id=692953 I
replaced the alsasink I had by a fakesink with sync=true and I got on
the console:
audiobasesrc gstaudiobasesrc.c:852:gst_audio_base_src_create:<alsasrc0>
create DISCONT of 6400 samples at sample 676800
audiobasesrc gstaudiobasesrc.c:857:gst_audio_base_src_create:<alsasrc0>
warning: Can't record audio fast enough
audiobasesrc gstaudiobasesrc.c:857:gst_audio_base_src_create:<alsasrc0>
warning: Dropped 6400 samples. This is most likely because downstream
can't keep up and is consuming samples too slowly.
With the alsasink back also appears:
audiobasesink gstaudiobasesink.c:1274:gst_audio_base_sink_skew_slaving:<audio
sink> correct clock skew 3170231239 > 20000000
audiobasesink gstaudiobasesink.c:1580:gst_audio_base_sink_get_alignment:<audio
sink> Unexpected discontinuity in audio timestamps of
+0:00:00.040000000, resyncing
audiobasesink gstaudiobasesink.c:1274:gst_audio_base_sink_skew_slaving:<audio
sink> correct clock skew 3503665481 > 20000000
but still fails. Using slave-method=0 (resample) on the alsasrc kind
of improves things but not by much.
Setting the whole pipeline to READY or NULL before linking the muxing
bin works but it is not acceptable for my use case.
I tried using gst-plugins-base from 1.1.4 with the rest of the system
at 1.2.0, same results. I compiled a few versions of gst* in between
but as far as my testing goes 1.1.4 is the first that works.
I'm kind of lost as to where to look now, any thoughts?
More information about the gstreamer-devel
mailing list