默认ServiceProvider::requestService(): 找不到服务 – “org.qt-project.qt.mediaplayer”

huangapple go评论157阅读模式
英文:

defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

问题

我正在将我的Qt应用程序构建为Ubuntu-22.04上的AppImage。它构建没有错误,并且应用程序可以正常工作。但问题是它应该显示一个视频,但实际上没有显示。初始版本的应用程序可以成功显示视频,但新版本却不能。然而,当我在Qt Creator中以调试模式运行应用程序时,视频可以正常工作。

错误信息是:"defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"。

我知道论坛上有很多关于这个错误的主题,但我尝试了所有的方法。
我安装了所有推荐的库:

  1. sudo apt-get update
  2. sudo apt-get -y install \
  3. libclang-dev \
  4. libdbus-1-dev \
  5. libfontconfig1-dev \
  6. libfreetype6-dev \
  7. libgl1-mesa-dev \
  8. libharfbuzz-dev \
  9. libx11-dev \
  10. libx11-xcb-dev \
  11. libxcb-glx0-dev \
  12. libxcb-icccm4-dev \
  13. libxcb-image0-dev \
  14. libxcb-keysyms1-dev \
  15. libxcb-randr0-dev \
  16. libxcb-render-util0-dev \
  17. libxcb-shape0-dev \
  18. libxcb-shm0-dev \
  19. libxcb-sync0-dev \
  20. libxcb-xfixes0-dev \
  21. libxcb-xinerama0-dev \
  22. libxcb1-dev \
  23. libxext-dev \
  24. libxfixes-dev \
  25. libxi-dev \
  26. libxkbcommon-dev \
  27. libxkbcommon-x11-dev \
  28. libxrender-dev \
  29. libpulse-dev \
  30. libunwind-dev \
  31. libgstreamer1.0-dev \
  32. libgstreamer-plugins-base1.0-dev \
  33. libgstreamer-plugins-bad1.0-dev \
  34. gstreamer1.0-plugins-base \
  35. gstreamer1.0-plugins-good \
  36. gstreamer1.0-plugins-bad \
  37. gstreamer1.0-plugins-ugly \
  38. gstreamer1.0-gl \
  39. gstreamer1.0-libav \
  40. gstreamer1.0-qt5 \
  41. gstreamer1.0-tools \
  42. libqt5multimedia5-plugins \
  43. libqt5core5a \
  44. libfuse2 \
  45. ffmpeg \
  46. ffmpegthumbnailer \
  47. autoconf \
  48. automake \
  49. build-essential \
  50. cmake \
  51. git-core \
  52. libass-dev \
  53. libgnutls28-dev \
  54. libmp3lame-dev \
  55. libsdl2-dev \
  56. libtool \
  57. libva-dev \
  58. libvdpau-dev \
  59. libvorbis-dev \
  60. meson \
  61. ninja-build \
  62. pkg-config \
  63. texinfo \
  64. yasm \
  65. zlib1g-dev \
  66. ffmpegthumbs \
  67. ffmpeg-doc \
  68. qtbase5-dev \
  69. qtdeclarative5-dev \
  70. libavcodec-dev \
  71. qml-module-qtmultimedia \
  72. qml-module-qt-labs-settings \
  73. qml-module-qtquick-controls2 \
  74. qml-module-qtquick-layouts \
  75. qml-module-qtquick-window2 \
  76. qml-module-qtquick-dialogs \
  77. qml-module-qtquick-controls \
  78. binutils \
  79. fuse \
  80. libglib2.0-0

我甚至使用aqt安装了带有qtmultimedia的Qt:

aqt install-qt --outputdir ./Qt linux desktop 5.15.2 --archives qtmultimedia

如果有人能够提供解决此问题的说明,我将非常感激。

英文:

I'm building my Qt app into an AppImage on Ubuntu-22.04. It builds without errors and the app works. But the problem is that it's supposed to display a video, and it doesn't. The initial version of the app successfully displays the video, but the new version does not. However, the video works correctly when I run the app from Qt Creator in Debug mode.
The error message is:"defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"".

I know there are multiple topics about this error across the forums, but i tried everything.
I installed all the libs that were recommended:

  1. sudo apt-get update
  2. sudo apt-get -y install \
  3. libclang-dev \
  4. libdbus-1-dev \
  5. libfontconfig1-dev \
  6. libfreetype6-dev \
  7. libgl1-mesa-dev \
  8. libharfbuzz-dev \
  9. libx11-dev \
  10. libx11-xcb-dev \
  11. libxcb-glx0-dev \
  12. libxcb-icccm4-dev \
  13. libxcb-image0-dev \
  14. libxcb-keysyms1-dev \
  15. libxcb-randr0-dev \
  16. libxcb-render-util0-dev \
  17. libxcb-shape0-dev \
  18. libxcb-shm0-dev \
  19. libxcb-sync0-dev \
  20. libxcb-xfixes0-dev \
  21. libxcb-xinerama0-dev \
  22. libxcb1-dev \
  23. libxext-dev \
  24. libxfixes-dev \
  25. libxi-dev \
  26. libxkbcommon-dev \
  27. libxkbcommon-x11-dev \
  28. libxrender-dev \
  29. libpulse-dev \
  30. libunwind-dev \
  31. libgstreamer1.0-dev \
  32. libgstreamer-plugins-base1.0-dev \
  33. libgstreamer-plugins-bad1.0-dev \
  34. gstreamer1.0-plugins-base \
  35. gstreamer1.0-plugins-good \
  36. gstreamer1.0-plugins-bad \
  37. gstreamer1.0-plugins-ugly \
  38. gstreamer1.0-gl \
  39. gstreamer1.0-libav \
  40. gstreamer1.0-qt5 \
  41. gstreamer1.0-tools \
  42. libqt5multimedia5-plugins \
  43. libqt5core5a \
  44. libfuse2 \
  45. ffmpeg \
  46. ffmpegthumbnailer \
  47. autoconf \
  48. automake \
  49. build-essential \
  50. cmake \
  51. git-core \
  52. libass-dev \
  53. libgnutls28-dev \
  54. libmp3lame-dev \
  55. libsdl2-dev \
  56. libtool \
  57. libva-dev \
  58. libvdpau-dev \
  59. libvorbis-dev \
  60. meson \
  61. ninja-build \
  62. pkg-config \
  63. texinfo \
  64. yasm \
  65. zlib1g-dev \
  66. ffmpegthumbs \
  67. ffmpeg-doc \
  68. qtbase5-dev \
  69. qtdeclarative5-dev \
  70. libavcodec-dev \
  71. qml-module-qtmultimedia \
  72. qml-module-qt-labs-settings \
  73. qml-module-qtquick-controls2 \
  74. qml-module-qtquick-layouts \
  75. qml-module-qtquick-window2 \
  76. qml-module-qtquick-dialogs \
  77. qml-module-qtquick-controls \
  78. binutils \
  79. fuse \
  80. libglib2.0-0

I even installed Qt with qtmultimedia with aqt:

aqt install-qt --outputdir ./Qt linux desktop 5.15.2 --archives qtmultimedia

If someone could provide me with instructions for resolving this issue, I would greatly appreciate it.

答案1

得分: 0

我刚刚不得不将Qt mediaservice文件夹及其插件添加到我的构建插件目录中,然后它就可以工作了。

英文:

UPDATE:
I just had to add the Qt mediaservice folder with its plugins into my build's plugins directory and it worked.

huangapple
  • 本文由 发表于 2023年8月8日 19:56:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76859329.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定