Screen image transmission uses H.264 compression #65
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "2015Remote.h"
|
||||
#include "SettingDlg.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "client/CursorInfo.h"
|
||||
|
||||
|
||||
// CSettingDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
|
||||
@@ -16,6 +17,7 @@ CSettingDlg::CSettingDlg(CWnd* pParent)
|
||||
, m_nListenPort(0)
|
||||
, m_nMax_Connect(0)
|
||||
, m_sScreenCapture(_T("GDI"))
|
||||
, m_sScreenCompress(_T("<EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -32,6 +34,8 @@ void CSettingDlg::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Control(pDX, IDC_COMBO_SCREEN_CAPTURE, m_ComboScreenCapture);
|
||||
DDX_CBString(pDX, IDC_COMBO_SCREEN_CAPTURE, m_sScreenCapture);
|
||||
DDV_MaxChars(pDX, m_sScreenCapture, 32);
|
||||
DDX_Control(pDX, IDC_COMBO_SCREEN_COMPRESS, m_ComboScreenCompress);
|
||||
DDX_CBString(pDX, IDC_COMBO_SCREEN_COMPRESS, m_sScreenCompress);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSettingDlg, CDialog)
|
||||
@@ -54,9 +58,30 @@ BOOL CSettingDlg::OnInitDialog()
|
||||
|
||||
int DXGI = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetInt("settings", "DXGI");
|
||||
|
||||
CString algo = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetStr("settings", "ScreenCompress", "");
|
||||
|
||||
m_nListenPort = (nPort<=0 || nPort>65535) ? 6543 : nPort;
|
||||
m_nMax_Connect = nMaxConnection<=0 ? 10000 : nMaxConnection;
|
||||
|
||||
int n = algo.IsEmpty() ? ALGORITHM_DIFF : atoi(algo.GetString());
|
||||
switch (n)
|
||||
{
|
||||
case ALGORITHM_GRAY:
|
||||
m_sScreenCompress = "<EFBFBD>Ҷ<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||
break;
|
||||
case ALGORITHM_DIFF:
|
||||
m_sScreenCompress = "<EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨";
|
||||
break;
|
||||
case ALGORITHM_H264:
|
||||
m_sScreenCompress = "H264ѹ<EFBFBD><EFBFBD><EFBFBD>㷨";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_ComboScreenCompress.InsertString(ALGORITHM_GRAY, "<EFBFBD>Ҷ<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
m_ComboScreenCompress.InsertString(ALGORITHM_DIFF, "<EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨");
|
||||
m_ComboScreenCompress.InsertString(ALGORITHM_H264, "H264ѹ<EFBFBD><EFBFBD><EFBFBD>㷨");
|
||||
|
||||
m_ComboScreenCapture.InsertString(0, "GDI");
|
||||
m_ComboScreenCapture.InsertString(1, "DXGI");
|
||||
m_sScreenCapture = DXGI ? "DXGI" : "GDI";
|
||||
@@ -77,6 +102,9 @@ void CSettingDlg::OnBnClickedButtonSettingapply()
|
||||
int n = m_ComboScreenCapture.GetCurSel();
|
||||
((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.SetInt("settings", "DXGI", n);
|
||||
|
||||
n = m_ComboScreenCompress.GetCurSel();
|
||||
((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.SetInt("settings", "ScreenCompress", n);
|
||||
|
||||
m_ApplyButton.EnableWindow(FALSE);
|
||||
m_ApplyButton.ShowWindow(SW_HIDE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user