Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem while deploying video on Android by QGraphicsVideoItem and QMediaPlayer (QT 5.2.1)
Forum Updated to NodeBB v4.3 + New Features

Problem while deploying video on Android by QGraphicsVideoItem and QMediaPlayer (QT 5.2.1)

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 554 Views 1 Watching
  • 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.
  • H Offline
    H Offline
    hanhkim
    wrote on last edited by
    #1

    Hi everybody, I really need help here! :(

    I am working on QT by deploying a small project to Android 4.0.3 (API 15). I use this code below to run the project. my project is running a video on Android and I use QGraphicsVideoItem and QMediaPlayer. I built it successfully and run by Desktop 5.2.1 MinGW 32bit, everything is fine! but when I deploy it to the emulator. the audio is fine but the video doesn't show on! I don't know what the problem is.
    I hope you can give me some advices. Thanks in advance.

    QMediaPlayer *player = new QMediaPlayer;

    QGraphicsVideoItem *item = new QGraphicsVideoItem;
    
    
    QGraphicsScene *scene = new QGraphicsScene;
    QGraphicsView *graphicsView = new QGraphicsView(scene);
    
    player->setVideoOutput(item);
    graphicsView->scene()->addItem(item);
    graphicsView->show();
    
    player->setMedia(QUrl("D:/video2.mp4"));
    player->play();
    
    1 Reply Last reply
    0

    • Login

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