GNOME Bugzilla – Bug 709871
'level' element returns NULL values for rms, peak, and decay
Last modified: 2013-10-14 18:24:35 UTC
The 'level' element returns NULL values for rms, peak, and decay when called from gst-launch and/or Gst.parse_launch(). Built against glib-2.38.0, adversely affects audio waveform generation in PiTiVi. Works: GST_DEBUG=GST_BUS:5 gst-launch-0.10 audiotestsrc ! audioconvert ! level name=wavelevel interval=10000000 ! fakesink qos=false name=faked 2>&1 >/dev/null |grep peak |grep dispatch | sed 's/^.*rms/rms/g' --> rms=(double){ -4.9581484531276319 }, peak=(double){ -1.9382024715915944 }, decay=(double){ -1.9382024715915944 }; rms=(double){ -4.9132681242674376 }, peak=(double){ -1.9382024715915944 }, decay=(double){ -1.9382024715915944 }; ... ./gst-plugins-good_1.x-git/tests/examples/level/level-example --> endtime: 0:00:00.100000000, channels: 2 channel 0 RMS: -4.948984 dB, peak: -1.938333 dB, decay: -1.938333 dB normalized rms value: 0.565654 channel 1 RMS: -4.948985 dB, peak: -1.938333 dB, decay: -1.938333 dB normalized rms value: 0.565654 ... Doesn't work as expected: GST_DEBUG=GST_BUS:5 gst-launch-1.0 audiotestsrc ! audioconvert ! level ! fakesink 2>&1 >/dev/null | grep peak | grep dispatch | sed 's/^.*rms/rms/g' --> rms=(GValueArray)NULL, peak=(GValueArray)NULL, decay=(GValueArray)NULL; rms=(GValueArray)NULL, peak=(GValueArray)NULL, decay=(GValueArray)NULL; ...
After additional investigation Gst.parse_launch() within PiTiVi returns valid dB levels. The audio waveform generation issue is still unresolved, but caused by something else.
Please test with 1.0 or 1.2, 0.10 is no longer supported (and Pitivi 0.91+ requires GStreamer 1.2 anyway).
Hi, The report was against git master in the 1.x series. The 0.10 example was included to show the bug is a regression. -George
There is no serialization-to-string function for GValueArray, that's why NULL is printed there. The actual values will be there if you check them from code.