Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
FramePixelBuffer.cpp
1// Author: Kang Lin <kl222@126.com>
2
3#include "FramePixelBuffer.h"
4#include <QLoggingCategory>
5
6static Q_LOGGING_CATEGORY(log, "VNC")
7
8CFramePixelBuffer::CFramePixelBuffer(int width, int height, QObject *parent)
9 : QObject(parent),
10 rfb::FullFramePixelBuffer(rfb::PixelFormat(32, 24, false, true,
11 255, 255, 255, 16, 8, 0),
12 0, 0, NULL, 0),
13 m_FrameBuffer(width, height, QImage::Format_RGB32)
14{
15 setBuffer(width, height, m_FrameBuffer.bits(),
16 m_FrameBuffer.bytesPerLine() / (getPF().bpp/8));
17}
18
19CFramePixelBuffer::~CFramePixelBuffer()
20{
21 qDebug(log) << "CFramePixelBuffer::~CFramePixelBuffer()";
22}
23
24const QImage& CFramePixelBuffer::getImage()
25{
26 return m_FrameBuffer;
27}