4#ifndef QFFMPEGSURFACECAPTUREGRABBER_P_H
5#define QFFMPEGSURFACECAPTUREGRABBER_P_H
19#include <QtMultimedia/private/qplatformsurfacecapture_p.h>
53 template<
typename Object,
typename Method>
56 connect(
this, &QFFmpegSurfaceCaptureGrabber::frameGrabbed,
57 &object, method, Qt::DirectConnection);
62 void errorUpdated(QPlatformSurfaceCapture::Error error,
const QString &description);
65 void updateError(QPlatformSurfaceCapture::Error error,
const QString &description = {});
85 std::unique_ptr<GrabbingContext> m_context;
87 std::optional<QPlatformSurfaceCapture::Error> m_prevError;
88 std::unique_ptr<QThread> m_thread;
Grabber(QEglfsScreenCapture &screenCapture, QScreen *screen)
QVideoFrameFormat m_format
QVideoFrameFormat format()
QVideoFrame grabFrame() override
QVideoFrame grabFrame() override
QuickGrabber(QEglfsScreenCapture &screenCapture, QScreen *screen, QQuickWindow *quickWindow)
void setFrameRate(qreal rate)
void updateTimerInterval()
bool isGrabbingContextInitialized() const
virtual void initializeGrabbingContext()
void errorUpdated(QPlatformSurfaceCapture::Error error, const QString &description)
virtual void finalizeGrabbingContext()
virtual QVideoFrame grabFrame()=0
void addFrameCallback(Object &object, Method method)
~QFFmpegSurfaceCaptureGrabber() override
QFFmpegSurfaceCaptureGrabber(ThreadPolicy threadPolicy=CreateGrabbingThread)
void updateError(QPlatformSurfaceCapture::Error error, const QString &description={})
static constexpr qreal MinScreenCaptureFrameRate
static constexpr qreal MaxScreenCaptureFrameRate
static constexpr qreal DefaultScreenCaptureFrameRate