implement xflip in the UI

This commit is contained in:
Arisotura
2022-09-26 21:13:58 +02:00
parent 7c9e37b156
commit 308ea6289a
5 changed files with 54 additions and 22 deletions

View File

@ -40,7 +40,7 @@ public:
QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType type = QAbstractVideoBuffer::NoHandle) const override;
private:
QList<CameraManager*> camList;
CameraManager* cam;
};
class CameraManager : public QObject
@ -58,6 +58,8 @@ public:
void stop();
bool isStarted();
void setXFlip(bool flip);
void captureFrame(u32* frame, int width, int height, bool yuv);
void feedFrame(u32* frame, int width, int height, bool yuv);
@ -87,9 +89,11 @@ private:
u32* frameBuffer;
QMutex frameMutex;
void copyFrame_Straight(u32* src, int swidth, int sheight, u32* dst, int dwidth, int dheight, bool yuv);
void copyFrame_RGBtoYUV(u32* src, int swidth, int sheight, u32* dst, int dwidth, int dheight);
void copyFrame_YUVtoRGB(u32* src, int swidth, int sheight, u32* dst, int dwidth, int dheight);
bool xFlip;
void copyFrame_Straight(u32* src, int swidth, int sheight, u32* dst, int dwidth, int dheight, bool xflip, bool yuv);
void copyFrame_RGBtoYUV(u32* src, int swidth, int sheight, u32* dst, int dwidth, int dheight, bool xflip);
void copyFrame_YUVtoRGB(u32* src, int swidth, int sheight, u32* dst, int dwidth, int dheight, bool xflip);
};
#endif // CAMERAMANAGER_H