Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qandroidcameraframe_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#ifndef QANDROIDCAMERAFRAME_H
5
#define QANDROIDCAMERAFRAME_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#include <QVideoFrameFormat>
19
#include <QJniObject>
20
21
class
QAndroidCameraFrame
22
{
23
public
:
24
struct
Plane
25
{
26
int
pixelStride
= 0;
27
int
rowStride
= 0;
28
int
size
= 0;
29
uint8_t *
data
;
30
};
31
32
QAndroidCameraFrame
(
QJniObject
frame
);
33
~QAndroidCameraFrame
();
34
35
QVideoFrameFormat::PixelFormat
format
()
const
{
return
m_pixelFormat; }
36
int
numberPlanes
()
const
{
return
m_numberPlanes; }
37
Plane
plane
(
int
index
)
const
38
{
39
if
(index < 0 || index >
numberPlanes
())
40
return
{};
41
42
return
m_planes[
index
];
43
}
44
QSize
size
()
const
{
return
m_size; }
45
long
timestamp
()
const
{
return
m_timestamp; }
46
47
bool
isParsed
()
const
{
return
m_parsed; }
48
49
private
:
50
bool
parse(
const
QJniObject
&
frame
);
51
QVideoFrameFormat::PixelFormat
m_pixelFormat;
52
53
QSize
m_size = {};
54
long
m_timestamp = 0;
55
int
m_numberPlanes = 0;
56
Plane
m_planes[3];
// 3 max number planes
57
jobject m_frame =
nullptr
;
58
bool
m_parsed =
false
;
59
QImage
m_image;
60
61
enum
AndroidImageFormat {
62
RAW_SENSOR = 32,
63
YUV_420_888 = 35,
64
RAW_PRIVATE = 36,
65
YUV_422_888 = 39,
66
YUV_444_888 = 40,
67
FLEX_RGB_888 = 41,
68
FLEX_RGBA_8888 = 42,
69
YCBCR_P010 = 54,
70
JPEG = 256,
71
HEIC = 1212500294
72
};
73
};
74
75
#endif
// QANDROIDCAMERAFRAME_H
QAndroidCameraFrame
Definition
qandroidcameraframe_p.h:22
QAndroidCameraFrame::format
QVideoFrameFormat::PixelFormat format() const
Definition
qandroidcameraframe_p.h:35
QAndroidCameraFrame::~QAndroidCameraFrame
~QAndroidCameraFrame()
Definition
qandroidcameraframe.cpp:184
QAndroidCameraFrame::numberPlanes
int numberPlanes() const
Definition
qandroidcameraframe_p.h:36
QAndroidCameraFrame::plane
Plane plane(int index) const
Definition
qandroidcameraframe_p.h:37
QAndroidCameraFrame::QAndroidCameraFrame
QAndroidCameraFrame(QJniObject frame)
Definition
qandroidcameraframe.cpp:171
QAndroidCameraFrame::isParsed
bool isParsed() const
Definition
qandroidcameraframe_p.h:47
QAndroidCameraFrame::size
QSize size() const
Definition
qandroidcameraframe_p.h:44
QAndroidCameraFrame::timestamp
long timestamp() const
Definition
qandroidcameraframe_p.h:45
QImage
\inmodule QtGui
Definition
qimage.h:37
QJniObject
\inmodule QtCore
QSize
\inmodule QtCore
Definition
qsize.h:25
QVideoFrameFormat::PixelFormat
PixelFormat
Enumerates video data types.
Definition
qvideoframeformat.h:31
size
GLenum GLuint GLintptr GLsizeiptr size
[1]
Definition
qopengles2ext.h:660
index
GLuint index
[2]
Definition
qopengles2ext.h:331
frame
QFrame frame
[0]
Definition
src_gui_painting_qdrawutil.cpp:6
Plane
Definition
linuxdmabuf.h:52
QAndroidCameraFrame::Plane
Definition
qandroidcameraframe_p.h:25
QAndroidCameraFrame::Plane::rowStride
int rowStride
Definition
qandroidcameraframe_p.h:27
QAndroidCameraFrame::Plane::data
uint8_t * data
Definition
qandroidcameraframe_p.h:29
QAndroidCameraFrame::Plane::pixelStride
int pixelStride
Definition
qandroidcameraframe_p.h:26
qtmultimedia
src
plugins
multimedia
ffmpeg
qandroidcameraframe_p.h
Generated by
1.10.0