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. videotestsrc gst-pipeline on i.mx8 arm processor shows just white screen

videotestsrc gst-pipeline on i.mx8 arm processor shows just white screen

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 205 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.
  • A Offline
    A Offline
    arrow54
    wrote on last edited by
    #1

    This code seems to run fine but just produces a window with white rather than the normal videotestsrc test pattern. I'm new to this so I have no clue even how to debug this.

    Maybe there is something simple with the pipeline I'm missing?

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QAbstractVideoSurface>
    
    class Surface : public QAbstractVideoSurface
    {
    public:
        Surface(QObject *p) : QAbstractVideoSurface(p) { }
        QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType) const override
        {
            // Make sure that the driver supports this pixel format.
            return QList<QVideoFrame::PixelFormat>() << QVideoFrame::Format_YUYV;
        }
    
        // Video frames are handled here.
        bool present(const QVideoFrame &) override { return true; }
    };
    
    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
        , ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    
        player = new QMediaPlayer;
        player->setVideoOutput(new Surface(player));
        player->setMedia(QUrl("gst-pipeline: videotestsrc ! qtvideosink"));
        player->play();
    }
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    
    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