safesight/edge/include/hw/atlas_defaults.h
tian 29d9ef5d0d refactor: 项目结构梳理 - 设备端/管理端对称布局
仓库结构:
  edge/     设备端(原根目录设备端代码整体移入)
  control/  管理端(清理后)
  docs/     文档(PRD 移入 design/)
  README.md 根导航(新增)

清理:
- control/.brainstorm 临时草稿删除
- control 根级重复文档(API表/PRD_04)并入 docs/design/
- control/plan.md -> docs/implementation/control-plan.md
- control/safesightd-linux-arm64 二进制取消版本控制(.gitignore)
- edge/transform 模型转换产物归入 models/,onnx/pt 大源文件取消跟踪(.gitignore)
- Readme.md(PRD) -> docs/design/PRD_Product_v1.2.md(避开 README 大小写冲突)

更新:
- 根 README.md 导航、docs/README.md 文档索引
- deployment.md/检查表路径加 edge/ 前缀
- .gitignore 重写(edge/control 分区规则)
2026-08-02 11:39:54 +08:00

99 lines
2.8 KiB
C++

#pragma once
#include <memory>
#include <string>
#include <vector>
#include "hw/i_decoder.h"
#include "hw/i_encoder.h"
#include "hw/i_image_processor.h"
#include "hw/i_infer_backend.h"
#include "utils/result.h"
namespace rk3588 {
class AtlasInferBackend : public IInferBackend {
public:
ModelHandle LoadModel(const std::string& /*model_path*/, std::string& err) override {
err = "atlas infer backend not supported";
return kInvalidModelHandle;
}
void UnloadModel(ModelHandle /*handle*/) override {}
bool GetModelInfo(ModelHandle /*handle*/, ModelInfo& /*info*/) const override {
return false;
}
InferResult Infer(ModelHandle /*handle*/, const InferInput& /*input*/) override {
InferResult res;
res.success = false;
res.error = "atlas infer backend not supported";
return res;
}
AiScheduler::BorrowedInferResult InferBorrowed(ModelHandle /*handle*/, const InferInput& /*input*/) override {
AiScheduler::BorrowedInferResult res;
res.success = false;
res.error = "atlas infer backend not supported";
return res;
}
};
class AtlasImageProcessor : public IImageProcessor {
public:
Status Resize(const Frame& /*src*/, Frame& /*dst*/) override {
return FailStatus("atlas image processor not supported");
}
Status CvtColor(const Frame& /*src*/, Frame& /*dst*/, PixelFormat /*dst_format*/) override {
return FailStatus("atlas image processor not supported");
}
Status Normalize(const Frame& /*src*/, std::vector<float>& /*out*/,
const std::vector<float>& /*mean*/,
const std::vector<float>& /*std*/) override {
return FailStatus("atlas image processor not supported");
}
};
class AtlasDecoder : public IDecoder {
public:
Status Open(const SimpleJson& /*config*/) override {
return FailStatus("atlas decoder not supported");
}
Status Send(const DecodePacket& /*packet*/) override {
return FailStatus("atlas decoder not supported");
}
Result<std::shared_ptr<Frame>> Receive() override {
return MakeError<std::shared_ptr<Frame>>("atlas decoder not supported");
}
void Close() override {}
};
class AtlasEncoder : public IEncoder {
public:
Status Open(const SimpleJson& /*config*/) override {
return FailStatus("atlas encoder not supported");
}
Status Send(const std::shared_ptr<Frame>& /*frame*/) override {
return FailStatus("atlas encoder not supported");
}
Result<EncodePacket> Receive() override {
return MakeError<EncodePacket>("atlas encoder not supported");
}
std::vector<uint8_t> ExtraData() const override {
return {};
}
void Close() override {}
};
} // namespace rk3588