mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-22 23:33:14 +08:00
Feature: Add menu to switch screen for remote control
This commit is contained in:
@@ -133,6 +133,7 @@ public:
|
||||
int m_GOP; // <20>ؼ<EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD>
|
||||
bool m_SendKeyFrame; // <20><><EFBFBD>ؼ<CDB9>֡
|
||||
CX264Encoder *m_encoder; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int m_nScreenCount; // <20><>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD>
|
||||
|
||||
ScreenCapture(int n = 32, BYTE algo = ALGORITHM_DIFF, BOOL all = FALSE) :
|
||||
m_ThreadPool(nullptr), m_FirstBuffer(nullptr), m_RectBuffer(nullptr),
|
||||
@@ -141,11 +142,11 @@ public:
|
||||
m_FrameID(0), m_GOP(DEFAULT_GOP), m_iScreenX(0), m_iScreenY(0), m_biBitCount(n),
|
||||
m_SendKeyFrame(false), m_encoder(nullptr)
|
||||
{
|
||||
|
||||
m_BlockNum = 8;
|
||||
m_ThreadPool = new ThreadPool(m_BlockNum);
|
||||
static auto monitors = GetAllMonitors();
|
||||
static int index = 0;
|
||||
m_nScreenCount = monitors.size();
|
||||
if (all && !monitors.empty()) {
|
||||
int idx = index++ % (monitors.size()+1);
|
||||
if (idx == 0) {
|
||||
@@ -207,6 +208,10 @@ public:
|
||||
SAFE_DELETE(m_encoder);
|
||||
}
|
||||
|
||||
virtual int GetScreenCount() const {
|
||||
return m_nScreenCount;
|
||||
}
|
||||
|
||||
virtual int SendQuality(int quality)
|
||||
{
|
||||
int old = m_SendQuality;
|
||||
|
||||
Reference in New Issue
Block a user