QT + Android - Error - MediaPlayerNative: Unable to create media player

0

I'm doing a simple test to play a video using QML with Android.

The app works like this:

  1. Click in the choose button.
  2. Select a video in the dialog. obs: A video file already in phone's storage, no download required
  3. Play the video.

This works perfectly for Desktop.

When I do the same for Android I can go until the 2nd step. When I select the video I can read this error in Application Output:

E MediaPlayerNative: Unable to create media player
D Qt MediaPlayer: setDataSource failed.: status=0x80000000
V MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
V MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
W libEGL  : EGLNativeWindowType 0x700fb22010 disconnect failed

Its clear that the code can't create a MediaPlayer.

Here a link to my test code in my github: https://github.com/Oshio09/QML-Video-Test

What should I change to make the media player reproduce the video at Android?

Test Enviorment:

  • Qt 5.13.0
  • Qt Creator 4.11.0
  • OS: Ubuntu 18.04.3 LTS [linux version 5.1.0-050100-generic]
  • JDK: java-8-openjdk-amd64
  • NDK: android-ndk-r20b

Phone:

  • Redmi Note 8 from Xiaomi.
  • Android 9
  • USB debugging - enable
  • Install via USB - enable
  • Allow granting permissions - enable
android
qt
asked on Stack Overflow Dec 25, 2019 by Oshio

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0