简体   繁体   中英

QMediaPlayer on Android

I know that the QMultimediaWidgets are not supported for C++. I am developing a native application for Android as well. Since I don't use QML I need a way of playing my videos in the application. I want to use the QMediaPlayer since I rely on the signals and slots. Is there any manually developed backend which works on Android or a solution how I can render the video myself still using QMediaPlayer?

Is there a way I can developed such a backend myself using ffmpeg or any available program on Android? Will there be any update for this in Qt soon?

QtMultimediaWidgets is not supported on Android so you need to use the QML elements. What you can theoretically try is to embed a QML scene using the MediaPlayer and VideoOutput elements in your QWidget-based app using QWidget::createWindowContainer . Once you see this can be done, you can get your QMediaPlayer object from QML using the mediaObject property of the MediaPlayer QML element. I never tried to do something like this actually.

You may also try to use another plugin like QtAV , but you may lose acceleration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM