Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. MediaPlayer on Android, black screen
Qt 6.11 is out! See what's new in the release blog

MediaPlayer on Android, black screen

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Elnur_Ismailzada
    wrote on last edited by
    #1

    I want to run the video from the USB flash drive. I use xiaomi mi laser projector with android 5. Audio is fine, but the screen remains black. The same code on mibox 3 is working. I do not know what the error is. Google do not help.

    This is my code:

    import QtQuick 2.9
    import QtQuick.Controls 2.2
    import QtMultimedia 5.9
    
    Rectangle {
        property int index: 0
        property int count: 0
        property var playlist
    
        function init() {
            advPlayerSheduleModel.init()
        }
    
        AdvPlayerSheduleModel {
            id: advPlayerSheduleModel
    
            onUpdate: {
                playlist = newPlaylist;
                mediaplayer.stop()
                mediaplayer.play()
            }
        }
    
        MediaPlayer {
            id: mediaplayer
            autoPlay: true
            playlist: Playlist {
                playbackMode: Playlist.Loop
            }
    
            onStopped:
                goToNextMedia();
        }
    
        VideoOutput{
            id: videoItem
            anchors.fill: rect
            source: mediaplayer
        }
    
        function goToNextMedia(){
            count++;
            index++;
            index = index >= playlist.length ? 0 : index
    
            mediaplayer.source = playlist[index]
            mediaplayer.play()
        }
    }
    

    Log:

    06-10 20:14:30.061 13110 13141 D KLDBar  : qrc:/AdvPlayerShedule.qml:34 (onUpdate): qml: changePlaylist file:///storage/1A43-C170/Android/data/org.qtproject.example/files/Documents/11_286280112.mp4,file:///storage/1A43-C170/Android/data/org.qtproject.example/files/Documents/12_74381360.mp4,file:///storage/1A43-C170/Android/data/org.qtproject.example/files/Documents/14_212859275.mp4
    06-10 20:14:30.101 13110 13124 W MediaPlayer: info/warning (701, 0)
    06-10 20:14:30.411 13110 13110 E MediaPlayer: Unknown message type 10000
    06-10 20:14:30.412 13110 13110 D MediaPlayer: setSubtitleAnchor in MediaPlayer
    06-10 20:14:30.453 13110 13354 W MediaPlayer: info/warning (3, 0)
    06-10 20:14:30.456 13110 13354 W MediaPlayer: info/warning (702, 100)
    06-10 20:14:31.412 13110 13354 W MediaPlayer: info/warning (901, 0)
    06-10 20:14:33.224 13110 13131 D mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
    06-10 20:14:36.723 13110 13131 D mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
    06-10 20:14:38.962 13110 13110 D AudioManager: preDispatchKeyEvent 4
    06-10 20:14:39.081 13110 13110 D AudioManager: preDispatchKeyEvent 4
    06-10 20:14:39.099 13110 13354 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: slot 1 is not owned by the producer (state = 0)
    06-10 20:14:39.101 13110 13123 E BufferQueueProducer: [SurfaceTexture-0-13110-0] requestBuffer: BufferQueue has been abandoned
    06-10 20:14:39.102 13110 13354 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: BufferQueue has been abandoned
    06-10 20:14:39.102 13110 13123 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: BufferQueue has been abandoned
    06-10 20:14:39.103 13110 13354 E BufferQueueProducer: [SurfaceTexture-0-13110-0] dequeueBuffer: BufferQueue has been abandoned
    06-10 20:14:39.103 13110 13123 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: BufferQueue has been abandoned
    06-10 20:14:39.103 13110 13354 E BufferQueueProducer: [SurfaceTexture-0-13110-0] dequeueBuffer: BufferQueue has been abandoned
    06-10 20:14:39.160 13110 13404 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: BufferQueue has been abandoned
    06-10 20:14:39.160 13110 13404 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: BufferQueue has been abandoned
    06-10 20:14:39.160 13110 13404 E BufferQueueProducer: [SurfaceTexture-0-13110-0] cancelBuffer: BufferQueue has been abandoned
    
    
    1 Reply Last reply
    0
    • E Offline
      E Offline
      Elnur_Ismailzada
      wrote on last edited by
      #2

      The problem was in the codecs.
      I replaced QtMultimedia with QtAV. Its work for me.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved