QAudioDecoder::ServiceMissingError

I try to use the class QAudioDecoder but run in to problem the plugins for gstreamer

the plugin for that is seems not in by default

qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder

This seems to be needed in order to decode. If I add

Requires:   qt5-qtmultimedia-plugin-mediaservice-gstaudiodecoder

It installs the package and everything is fine.

In the spec files but when I run the validator that part fails and prints that the “Requires“ is not

allowed. What is the reason to not allow that package and is there some kind of workaround ?

I tried to copy the .so file (libgstaudiodecoder.so) and set the plugin path but still the same error.

have your tried BuildRequires: pkgconfig(Qt5xxx) ?

Sure you know the list of allowed apis:

I don’t know if you can add any QT feature. But I know you can add your private lib to your rpm. Search in the SDK help for “Installing and using private shared libraries”.

The build is ok it is the runtime that is the problem. If i install the package with pkcon from a console and then it works fine. I also tried to include the libgstaudiodecoder.so file as a private and call QCoreApplication::addLibraryPath but still no luck

In general if you want to publish your app in the Jolla store you have to pass the RPM validator as described e.g. here in the harbour faq:

One point of the harbour rules is that your can’t install anything in /bin, /usr/lib etc. There are good reasons for this policy. But of course you can pack needed libs in your app as private. This private libs must be installed in /usr/share/harbour-. I have done this with libs for C++, this will work.

When you required a QML packages the rpm installed this package elsewhere but not in /usr/share/harbour-. So in the Jolla store this is not possible. Maybe you have 3 options here: ask Jolla (e.g. Vige) to allow the needed QML packages. Or use C++ (or Python maybe). Or publish your app in Openrepos.

You can ask me if I can help you with C++.

(And have you checked the list of allowed apis in the link of my first post for your wanted QT package?)

Happy hacking!

3 Likes

I m using the QAudioDecoder from c++ I but i guess that the plugins is loaded in the same way if they where used from a QML

I managed to get the private plugin to load. I needed to put the .so file under a subfolder /mediaservice

and set the librarypath

 QString s = SailfishApp::pathTo("").toLocalFile();
  app->addLibraryPath(s);
1 Like

I also had to add a lot of other dependencies in the spec file but now it passes validation !

install -m 644 -p %{_libdir}/qt5/plugins/mediaservice/libgstaudiodecoder.so %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libgstbase-1.0.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libgstreamer-1.0.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libgstapp-1.0.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libqgsttools_p.so.1 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libgstvideo-1.0.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libasound.so.2 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libgstaudio-1.0.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/liborc-0.4.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
install -m 644 -p %{_libdir}/libgsttag-1.0.so.0 %{buildroot}/usr/share/%{name}/lib/mediaservice/
1 Like

I think that is the proper way to do it in general for libs not allowed in Harbour.

Fot the particular thing in question here, a subpackage of QtMultimedia which itself is allowed in harbour it still might be an oversight in the Harbour rules.
Perhaps asking Jolla about it would be a good thing.

“Perhaps asking Jolla about it would be a good thing.” What is the right forum for this ???

Not sure actually.

Community Meeting would be one thing, there used to be that “Developer Care” email address at one point I think, and then there’s the “Store QA” subforum.

I’ll move this topic into that subforum and try to summon @vige @vige @vige - can you shed light on any of this?

1 Like

Yes, those channels that you mentioned. One option to try could be also opening a PR against GitHub - sailfishos/sdk-harbour-rpmvalidator: Jolla Harbour intake RPM validator tool, with a good explanation why this should be allowed.

1 Like