This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GStreamer+Speex performances and issues - SDK 5.5 and SDK 5.6

Expert 2280 points

I'm running some comparison tests about GStreamer+Speex on AM335x EVM using SDK 5.5.0.0 and SDK 5.6.0.0.

1 - First of all I've noticed that CPU load is extremely decreased with most recent SDK. Running a simple loop-test using an USB headset, with encoding and decoding in the pipe at 16 KHz, takes approx 26% with SDK 5.6. While with SDK 5.5 it takes almost 100% discarding samples now and then. This is the pipe:

gst-launch-0.10 alsasrc ! "audio/x-raw-int,rate=16000" ! speexenc ! speexdec ! alsasink sync=no

Top output with SDK 5.5: 2467  2412 root     S    50500  20%  97% gst-launch-0.10 alsasrc.....

Top output with SDK 5.6: 1568  1518 root     S    51436  10%  26% gst-launch-0.10 alsasrc.....

That's the log I have on samples discarding with SDK 5.5:

WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
Additional debug info:
gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 3069 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.

Can anyone help to understand reasons of improved performances? Does it depends on different GStreamer version? Libspeex seems the same, but maybe is built with different optimization (NEON?). Something else (ALSA, kernel, ...)?

2 - Using GStreamer+Speex in VBR mode is broken with SDK 5.6, while it works with SDK 5.5. These are the ouputs I've got when running the following pipe. Note the "Unknown nb_ctl request", but I do not know it's meaning nor what is logging it on console. If I capture RTP flow, it is always a CBR with SDK 5.6, not VBR as expected.

gst-launch-0.10 alsasrc ! "audio/x-raw-int,rate=8000" ! speexenc vbr=1 ! rtpspeexpay ! udpsink host=10.10.20.140

Output with SDK 5.5:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock

Output with SDK 5.6:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
warning: Unknown nb_ctl request:  14
warning: Unknown nb_ctl request:  12
Redistribute latency...

Any help or hint on where could be the problem?

Thanks. Regards,
Max