We have moved to a new Sailfish OS Forum. Please start new discussions there.

QAudioDecoder support missing

asked 2014-08-16 23:51:32 +0200

kimmoli gravatar image

While doing test-code preparation for FM transmitter (yes, another TOH project), i would like to use something Qt based to decode audio-files to raw data in memory (to be sampled to DAC over I2C). ofc i could test with some pre-raw data, but...

And QAudioDecoder seems to be good option for that

The QAudioDecoder class allows decoding audio.

The QAudioDecoder class is a high level class for decoding local audio media files. It is similar to the QMediaPlayer class except that audio is provided back through this API rather than routed directly to audio hardware, and playlists and network and streaming based media is not supported.

I started with example "Decoding Compressed Audio to Memory" foiund here http://qt-project.org/doc/qt-5/audiooverview.html

But when trying to use it, i get following in console:

[W] QPluginServiceProvider::requestService:383 - defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.audiodecode"

http://qt-project.org/wiki/Qt_Multimedia_Backends says decoding supported in GStreamer platforms (?)

Is there plans to support this audio decode support, or is there other way to do this with GStreamer or other?

edit retag flag offensive close delete



i found following only:

[nemo@Jolla ~]$ zypper se decoder
Загрузка данных о репозиториях...
Чтение установленных пакетов...

С | Имя                                                            | Заключение                                                                         | Тип  
i | qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder           | Qt Multimedia - GStreamer audio decoder media service                              | пакет
  | qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder-debuginfo | Debug information for package qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder | пакет
[nemo@Jolla ~]$ rpm -ql qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder
coderus ( 2014-08-17 01:23:31 +0200 )edit

ok, installed that, it was not installed

pkcon install qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder

Now, i get different warning

QGstreamerAudioDecoderSession::start:385 - GStreamer; Unable to start decoding process
kimmoli ( 2014-08-17 01:34:21 +0200 )edit

It's a pity that the FM transmitter in the hardware is disabled/not connected, then there would be no need for a ToH for that.

dthierbach ( 2014-09-15 11:55:28 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-08-17 15:38:45 +0200

kimmoli gravatar image

Ok, Answering my own.

After installing audiodecoder plugin by adding this to my .spec file

Requires:   qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder

i got step further. And I might have done something wrong with my QAudioDecoder, but by following the example code qtmultimedia example/audiodecoder i got this issue solved.

Now i get the audio decoded.

edit flag offensive delete publish link more


Now need to add I2C stuff and build some HW

[nemo@Jolla ~]$ audiodecoder oggtest.ogg 8000
Samplerate is 8000
decoder created
streamer created
Decoding progress: 0%
buffer 1 queued
this buffer 69536 bytes, length 2173ms. buffers left in queue 0
Decoding progress: 65%
buffer 1 queued
Decoding progress: 99%
buffer 2 queued
Decoding finished
Decoding stopped
this buffer 36268 bytes, length 1133ms. buffers left in queue 1
this buffer 128 bytes, length 4ms. buffers left in queue 0
playing done
kimmoli ( 2014-08-17 22:33:49 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2014-08-16 23:51:32 +0200

Seen: 1,141 times

Last updated: Aug 17 '14