what would cause an appsink to double its new-sample callback rate?

Andres Gonzalez andres.agoralabs at gmail.com
Tue Aug 15 17:26:43 UTC 2017


Hi,

I have an audiomixer feeding an appsink which has the new-sample callback
registered so my application gets the mixed audio samples. The audiomixer
has its output-buffer-duration set for 1/30 and all of the mixer inputs are
also feeding the audiomixer at 1/30 with 48kHz 16 bit, 2 channel audio. This
gives a 6400 byte sample chunk every 33 msecs from the appsink new-sample
callback.  

the pipeline is:

    audiomixer -> queue -> audioconvert -> audioresample -> appsink

This is working great for several mixer inputs and the appsink new-sample
callback gets called every 33 msecs as expected. However, under certain
inputs, the appsink new-sample callback gets called every 16 msecs instead
of 33 msecs with the same amount of data. That is, it appears to generate
twice the data since it is calling the callback twice as fast (all of the
GstSample have 6400 bytes of data). This is not related to the number of
mixer inputs since it appears to work correctly with several inputs
configured.

The audiomixer does not change its output-buffer-duration even when the
appsink is running twice as fast. I can read it and verify that it is as
originally configured for 1/30.  I am assuming here that the audiomixer will
only feed the downstream appsink at the rate configured by
output-buffer-duration.  (All of the mixer inputs have an appsrc before the
pad so all of the inputs are generic to the audiomixer.)

Question: is there anything that would cause appsink to double its
new-sample callback rate?
Question: is there anything that would cause audiomixer to output data
different from its configured output-buffer-duration?

Thanks,
-Andres



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/what-would-cause-an-appsink-to-double-its-new-sample-callback-rate-tp4684215.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list