搭建代码框架并更新文档
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
#pragma once
|
||||
|
||||
#include "displayflow/core/common/types.h"
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
// 前向声明
|
||||
struct VideoFrame;
|
||||
|
||||
/**
|
||||
* @brief 摄像头信息
|
||||
*/
|
||||
struct CameraInfo {
|
||||
std::string deviceId;
|
||||
std::string name;
|
||||
std::string friendlyName;
|
||||
Resolution maxResolution;
|
||||
std::vector<Resolution> supportedResolutions;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief 摄像头捕获
|
||||
*
|
||||
* 使用 DirectShow 或 Media Foundation 进行摄像头捕获
|
||||
*/
|
||||
class CameraCapture {
|
||||
public:
|
||||
CameraCapture();
|
||||
~CameraCapture();
|
||||
|
||||
/**
|
||||
* @brief 初始化摄像头捕获
|
||||
*/
|
||||
bool Initialize();
|
||||
|
||||
/**
|
||||
* @brief 枚举可用的摄像头设备
|
||||
*/
|
||||
std::vector<CameraInfo> EnumerateCameras();
|
||||
|
||||
/**
|
||||
* @brief 打开指定摄像头
|
||||
*/
|
||||
bool OpenCamera(const std::string& deviceId);
|
||||
|
||||
/**
|
||||
* @brief 开始捕获
|
||||
*/
|
||||
bool StartCapture(const Resolution& resolution, int fps);
|
||||
|
||||
/**
|
||||
* @brief 停止捕获
|
||||
*/
|
||||
void StopCapture();
|
||||
|
||||
/**
|
||||
* @brief 关闭摄像头
|
||||
*/
|
||||
void CloseCamera();
|
||||
|
||||
/**
|
||||
* @brief 设置帧回调
|
||||
*/
|
||||
void SetFrameCallback(std::function<void(const VideoFrame&)> callback);
|
||||
|
||||
/**
|
||||
* @brief 设置摄像头参数
|
||||
*/
|
||||
bool SetFocus(int value); // 0-100
|
||||
bool SetExposure(int value);
|
||||
bool SetWhiteBalance(int value);
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief Windows 键盘输入处理
|
||||
*/
|
||||
class KeyboardHandler {
|
||||
public:
|
||||
KeyboardHandler();
|
||||
~KeyboardHandler();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief Windows 鼠标输入处理
|
||||
*/
|
||||
class MouseHandler {
|
||||
public:
|
||||
MouseHandler();
|
||||
~MouseHandler();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief Windows 网络管理器
|
||||
*/
|
||||
class WindowsNetworkManager {
|
||||
public:
|
||||
WindowsNetworkManager();
|
||||
~WindowsNetworkManager();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
#include "displayflow/core/common/types.h"
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
// 前向声明
|
||||
struct VideoFrame;
|
||||
|
||||
/**
|
||||
* @brief Windows 平台适配器
|
||||
*
|
||||
* 封装 Windows 平台特定的功能
|
||||
*/
|
||||
class WindowsPlatformAdapter {
|
||||
public:
|
||||
WindowsPlatformAdapter();
|
||||
~WindowsPlatformAdapter();
|
||||
|
||||
/**
|
||||
* @brief 初始化平台适配器
|
||||
*/
|
||||
bool Initialize();
|
||||
|
||||
/**
|
||||
* @brief 创建虚拟显示器
|
||||
*/
|
||||
bool CreateVirtualDisplay(const Resolution& resolution);
|
||||
|
||||
/**
|
||||
* @brief 销毁虚拟显示器
|
||||
*/
|
||||
void DestroyVirtualDisplay();
|
||||
|
||||
/**
|
||||
* @brief 渲染视频帧
|
||||
*/
|
||||
bool RenderFrame(const VideoFrame& frame);
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief D3D11 渲染器实现
|
||||
*/
|
||||
class D3D11Renderer {
|
||||
public:
|
||||
D3D11Renderer();
|
||||
~D3D11Renderer();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief DirectX 渲染器
|
||||
*/
|
||||
class DirectXRenderer {
|
||||
public:
|
||||
DirectXRenderer();
|
||||
~DirectXRenderer();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief IddCx 驱动框架封装
|
||||
*/
|
||||
class IddCxWrapper {
|
||||
public:
|
||||
IddCxWrapper();
|
||||
~IddCxWrapper();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace windows {
|
||||
|
||||
/**
|
||||
* @brief Windows 虚拟显示器
|
||||
*/
|
||||
class VirtualDisplay {
|
||||
public:
|
||||
VirtualDisplay();
|
||||
~VirtualDisplay();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
Reference in New Issue
Block a user