移除无用代码。

This commit is contained in:
2025-03-17 14:01:30 +08:00
parent 2451467118
commit 74a38cb67a
13 changed files with 57 additions and 304 deletions

View File

@ -1,6 +1,5 @@
#include "VideoInput.h"
#include "Core/Logger.h"
#include "DetectAlgorithm.h"
#include "rw_mpp_api.h"
#include <chrono>
@ -11,7 +10,6 @@ public:
int32_t encodeChannel = -1;
int32_t scaleChannel = -1;
S_vdec_config decoderConfig;
std::shared_ptr<DetectAlgorithm> m_detector;
};
VideoInput::VideoInput(int32_t width, int32_t height) : m_d(new VideoInputPrivate()), m_width(width), m_height(height) {
@ -19,8 +17,6 @@ VideoInput::VideoInput(int32_t width, int32_t height) : m_d(new VideoInputPrivat
if (status != 0) {
LOG(error) << "rw_mpp__vdec_init() failed, status: " << status;
}
m_d->m_detector = std::make_shared<DetectAlgorithm>();
}
VideoInput::~VideoInput() {
@ -108,7 +104,7 @@ bool VideoInput::startEncode() {
}
m_d->scaleChannel = 0;
S_vscale_cfg scaleConfig = {2960, 1664, DetectAlgorithm::DetectWidth, DetectAlgorithm::DetectHeight};
S_vscale_cfg scaleConfig = {2960, 1664, 1280, 720};
status = rw_mpp__vscale_start(m_d->scaleChannel, &scaleConfig);
if (status != 0) {
LOG(error) << "rw_mpp__vscale_start() failed, status: " << status;
@ -144,7 +140,6 @@ void VideoInput::setPacketHandler(const PacketHandler &hanlder) {
}
void VideoInputPrivate::processImage(S_mpp_img &image, S_mpp_img &detectImage, uint64_t frameIndex) {
m_detector->detect(detectImage.nv21, frameIndex);
}
void VideoInputPrivate::processFrame(S_mpp_img &image) {