hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2019 Fuzhou Rockchip Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
 
#include "ai_task_manager.h"
#include "ai_task_factory.h"
 
namespace rockchip {
namespace aiserver {
 
AITaskManager::AITaskManager() {
    mTaskHandler = AITaskFactory::createHandler();
}
 
AITaskManager::~AITaskManager() {
    if (mTaskHandler != nullptr) {
        delete mTaskHandler;
        mTaskHandler = nullptr;
    }
}
 
int32_t AITaskManager::processAIData(RTMediaBuffer *buffer) {
    return mTaskHandler->processAIData(buffer);
}
 
int32_t AITaskManager::processAIMatting(RTMediaBuffer *buffer) {
    return mTaskHandler->processAIMatting(buffer);
}
 
int32_t AITaskManager::processAIFeature(RTMediaBuffer *buffer) {
    return mTaskHandler->processAIFeature(buffer);
}
 
int32_t AITaskManager::convertDetectType(int32_t detectType) {
    return mTaskHandler->convertDetectType(detectType);
}
 
} // namespace aiserver
} // namespace rockchip