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. Android camera frames are only accessible through OpenGL textures, but how?
Forum Updated to NodeBB v4.3 + New Features

Android camera frames are only accessible through OpenGL textures, but how?

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 1.2k 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.
  • M Offline
    M Offline
    MartynW
    wrote on last edited by
    #1

    Camera frames are potentially available by subclassing QAbstractVideoSurface and passing that to the camera's setViewfinder() method. When you start the camera, QVideoFrames are passed to the surface's present() method. Well, as long as that method references the frames handle, which seems to be needed to trigger the next frame.

    On Android (Nexus 7) the returned frame type is UserHandle + 1, and the handle is a QVariant that is a list of two QVariants, a UInt and a Matrix4x4. I suspect (see QTBUG-34888) the UInt is an OpenGL texture ID and from QTBUG-35416 I learn "Currently, camera frames are only accessible through OpenGL textures."

    As I am not familiar with OpenGL, can anyone please enlighten me as to

    Is it possible for me to get the frame data from the texture ID using QOpenGLFFunctions or somesuch or is it only available to the QT runtime support?

    If possible, can you outline how I might get the raw frame data please?

    Thanks.

    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