19 return sendMediaFrame([&]() { emit m_platfromVideoFrameInput->newVideoFrame(frame); });
24 m_platfromVideoFrameInput = std::make_unique<QPlatformVideoFrameInput>(std::move(format));
25 addUpdateSignal(m_platfromVideoFrameInput.get(), &QPlatformVideoFrameInput::encoderUpdated);
30 m_platfromVideoFrameInput.reset();
38 return m_platfromVideoFrameInput.get();
43 QMediaCaptureSession *newSession)
override
46 removeUpdateSignal(prevSession, &QMediaCaptureSession::videoOutputChanged);
49 addUpdateSignal(newSession, &QMediaCaptureSession::videoOutputChanged);
54 if (
auto encoderInterface = m_platfromVideoFrameInput->encoderInterface())
55 return encoderInterface->canPushFrame();
63 QVideoFrameInput *q =
nullptr;
64 std::unique_ptr<QPlatformVideoFrameInput> m_platfromVideoFrameInput;
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
98
99
100QVideoFrameInput::QVideoFrameInput(QObject *parent) : QVideoFrameInput({}, parent) { }
103
104
105
106
107
108
109
110
111
112
113
114
115QVideoFrameInput::QVideoFrameInput(
const QVideoFrameFormat &format, QObject *parent)
116 : QObject(*
new QVideoFrameInputPrivate(
this), parent)
118 Q_D(QVideoFrameInput);
119 d->initialize(format);
123
124
125QVideoFrameInput::~QVideoFrameInput()
127 Q_D(QVideoFrameInput);
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148bool QVideoFrameInput::sendVideoFrame(
const QVideoFrame &frame)
150 Q_D(QVideoFrameInput);
151 return d->sendVideoFrame(frame);
155
156
157
158QVideoFrameFormat QVideoFrameInput::format()
const
160 Q_D(
const QVideoFrameInput);
161 return d->platfromVideoFrameInput()->frameFormat();
165
166
167
168
169
170
171QMediaCaptureSession *QVideoFrameInput::captureSession()
const
173 Q_D(
const QVideoFrameInput);
174 return d->captureSession();
177void QVideoFrameInput::setCaptureSession(QMediaCaptureSession *captureSession)
179 Q_D(QVideoFrameInput);
180 d->setCaptureSession(captureSession);
183QPlatformVideoFrameInput *QVideoFrameInput::platformVideoFrameInput()
const
185 Q_D(
const QVideoFrameInput);
186 return d->platfromVideoFrameInput();
190
191
192
193
194
195
196
197