Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. VideoOutput with custom source
Forum Updated to NodeBB v4.3 + New Features

VideoOutput with custom source

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 447 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.
  • M Offline
    M Offline
    Maksim Kuk
    wrote on 5 May 2020, 12:41 last edited by Maksim Kuk 5 May 2020, 12:44
    #1

    Hellow!
    Try to create custom video provider to stream v4l2 video to qml. I hve Implemented VideoProvider class derived from QObject like in doc (https://doc.qt.io/qt-5/videooverview.html#working-with-low-level-video-frames) but VideoOutput is always black.

    With MediaPlayer it works well.

    Add QAbstractFilter to check frames on videoOutput - it receives proper data but creen is black.

    Frames for present() created with

    int bytesPerLine = m_capture->width() * 2; // 2 bytes per pixel
    int bufferSize = m_capture->height() * bytesPerLine;
    QSize frameSize(m_capture->width(), m_capture->height());
    QVideoFrame::PixelFormat format = QVideoFrame::Format_UYVY;
    QVideoFrame *frame = new QVideoFrame(bufferSize, frameSize, bytesPerLine, format);
    

    Surface started on setVideoSurface()

    m_format = QVideoSurfaceFormat(frameSize, format);
    m_surface->start(m_format);
    

    What am I missed? How can I debug it?

    qt 5.7 on imx6

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 May 2020, 18:31 last edited by
      #2

      Hi and welcome to devnet,

      I am not sure that UYVY support was 100% supported for displaying like that by that old version of Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      5 May 2020, 12:41

      • Login

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