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. Painting NV12-Formatted Images to QLabel
Qt 6.11 is out! See what's new in the release blog

Painting NV12-Formatted Images to QLabel

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 2 Posters 5.0k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    AFAIR yes. They have several sinks between widget, OpenGL and QtQuick.

    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
    • T Offline
      T Offline
      twall
      wrote on last edited by
      #5

      Okay, but what if I don't have those sinks that are mentioned in the QtGstreamer API? ("qtvideosink", "qtglvideosink" and "qwidgetvideosink" (or "qt5videosink", "qt5glvideosink" and "qwidget5videosink" in Qt5))

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #6

        Ho did you build Qt and the support for OpenSSL ?

        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
        • T Offline
          T Offline
          twall
          wrote on last edited by
          #7

          ???

          I think this is the wrong post, my application has no need for SSL.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #8

            Indeed, that answer was supposed to be for another thread. I wonder how it ended up here.

            Can you elaborate on the reasons you don't have these backends with QtGStreamer ?

            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
            • T Offline
              T Offline
              twall
              wrote on last edited by
              #9

              Honestly QtGstreamer is not what I'm looking for. I'm looking to see if there's any Qt5 support for taking an NV12 frame, and painting it on the screen similar to a QImage. I know that there's QVideoFrame, but the images are coming in live, not from a file.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #10

                Out of curiosity, what's the problem with QtGStreamer ?

                What kind of camera are you using?

                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
                • T Offline
                  T Offline
                  twall
                  wrote on last edited by
                  #11

                  The problem with QtGstreamer is simply that we already have a working standard Gstreamer plugin/program for our custom camera. The other problem is that it's a nonstandard processor that offloads all of its image decoding onto a co-processor, but that coprocessor sends back NV12-formatted decoded frames.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    Can you describe how your application is currently working ? And what is your problem with loading the NV12 data in QVideoFrame ?

                    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
                    • T Offline
                      T Offline
                      twall
                      wrote on last edited by
                      #13

                      I have a camera that I receive data from over a special co-processor, through a manufacturer specific gstreamer plugin. The decoded frame appears in a uchar array in NV12 format, and I would like to be able to paint that on a screen using QVideoFrame. Going through the documentation it appears that the best way to get a uchar* like this into QVideoFrame is through QAbstractVideoBuffer, but since this video is not in the framebuffer to begin with, QAbstractVideoBuffer doesn't want to latch onto it.

                      I was wondering if there's a way to get this uchar array onto the screen.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #14

                        How are you using that gstreamer plugin ?

                        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
                        • T Offline
                          T Offline
                          twall
                          wrote on last edited by
                          #15

                          Just using good ol' gst_parse_launch. The key here is that the plugin does not support anything other than NV12, and colorspace changes on the processor using the gstreamer convert plugin to get to RGB are too processor intensive to be worth it. But the gstreamer plugin isn't negotiable. It's manufacturer and hardware specific.

                          So that's why I'm wondering if I can get NV12-formatted frames to be painted on the screen.

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            I'm not trying to avoid that plugin, just to understand how your setup is working.

                            If using OpenGL is an option, QtMultimedia through Qt Quick should be able to show these frames. The backend is using gstreamer so depending on the gstreamer line you have to use you may have to tweak Qt's backend to do the same thing.

                            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

                            • Login

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