搭建代码框架并更新文档
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 android {
|
||||
|
||||
// 前向声明
|
||||
struct VideoFrame;
|
||||
|
||||
/**
|
||||
* @brief 摄像头信息
|
||||
*/
|
||||
struct CameraInfo {
|
||||
std::string cameraId;
|
||||
std::string name;
|
||||
bool isFrontFacing;
|
||||
Resolution maxResolution;
|
||||
std::vector<Resolution> supportedResolutions;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief 摄像头捕获
|
||||
*
|
||||
* 使用 Android NDK Camera API 或 Camera2 API 进行摄像头捕获
|
||||
*/
|
||||
class CameraCapture {
|
||||
public:
|
||||
CameraCapture();
|
||||
~CameraCapture();
|
||||
|
||||
/**
|
||||
* @brief 初始化摄像头捕获
|
||||
*/
|
||||
bool Initialize();
|
||||
|
||||
/**
|
||||
* @brief 枚举可用的摄像头设备
|
||||
*/
|
||||
std::vector<CameraInfo> EnumerateCameras();
|
||||
|
||||
/**
|
||||
* @brief 打开指定摄像头
|
||||
*/
|
||||
bool OpenCamera(const std::string& cameraId);
|
||||
|
||||
/**
|
||||
* @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 SetFocusMode(const std::string& mode); // "auto", "continuous", "fixed"
|
||||
bool SetExposureMode(const std::string& mode);
|
||||
bool SetWhiteBalanceMode(const std::string& mode);
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* @brief MediaProjection API 封装
|
||||
*/
|
||||
class MediaProjectionWrapper {
|
||||
public:
|
||||
MediaProjectionWrapper();
|
||||
~MediaProjectionWrapper();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* @brief Android 屏幕捕获
|
||||
*/
|
||||
class ScreenCapture {
|
||||
public:
|
||||
ScreenCapture();
|
||||
~ScreenCapture();
|
||||
|
||||
bool Initialize();
|
||||
bool StartCapture();
|
||||
void StopCapture();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* @brief Android 触摸输入处理
|
||||
*/
|
||||
class TouchHandler {
|
||||
public:
|
||||
TouchHandler();
|
||||
~TouchHandler();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* @brief Android 网络管理器
|
||||
*/
|
||||
class AndroidNetworkManager {
|
||||
public:
|
||||
AndroidNetworkManager();
|
||||
~AndroidNetworkManager();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include "displayflow/core/common/types.h"
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* @brief Android 平台适配器
|
||||
*
|
||||
* 封装 Android 平台特定的功能
|
||||
*/
|
||||
class AndroidPlatformAdapter {
|
||||
public:
|
||||
AndroidPlatformAdapter();
|
||||
~AndroidPlatformAdapter();
|
||||
|
||||
/**
|
||||
* @brief 初始化平台适配器
|
||||
*/
|
||||
bool Initialize();
|
||||
|
||||
/**
|
||||
* @brief 启动屏幕捕获
|
||||
*/
|
||||
bool StartScreenCapture();
|
||||
|
||||
/**
|
||||
* @brief 停止屏幕捕获
|
||||
*/
|
||||
void StopScreenCapture();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
namespace displayflow {
|
||||
namespace platform {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* @brief Android 渲染引擎
|
||||
*/
|
||||
class RenderEngine {
|
||||
public:
|
||||
RenderEngine();
|
||||
~RenderEngine();
|
||||
|
||||
private:
|
||||
// TODO: 添加私有成员
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace platform
|
||||
} // namespace displayflow
|
||||
|
||||
Reference in New Issue
Block a user