0

当我尝试播放存储在 SQlite db 中的视频时,它不播放,它对音频起作用,这是代码:

qry.exec("select * from myTable");

    QByteArray *outByteArray;

    while (qry.next())
        outByteArray = new QByteArray(qry.value("myCol").toByteArray());

    QBuffer *mediaStream = new QBuffer(outByteArray);
    mediaStream->open(QIODevice::ReadOnly);
    QMediaPlayer *player = new QMediaPlayer;
    QVideoWidget *videoWidget = new QVideoWidget(this);
    videoWidget->setGeometry(32, 136, 400, 300);
    player->setVideoOutput(videoWidget);
    player->setMedia(QMediaContent(),mediaStream);
    player->setVolume(50);
    player->play();
4

0 回答 0