美摄SDK For iOS  3.7.2
NvsSmartCutParser.h
浏览该文件的文档.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 2019. All rights reserved.
4 //
5 // This code and information is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the implied
7 // warranties of merchantability and/or fitness for a particular purpose.
8 //
9 //--------------------------------------------------------------------------------
10 // Birth Date: Aug 21. 2019
11 // Author: NewAuto video team
12 //================================================================================
13 #pragma once
14 
15 #import <Foundation/Foundation.h>
16 #import "NvsCommonDef.h"
17 
18 @class NvsInferenceScheme;
19 
27 typedef enum {
30 
38 typedef enum {
47 
55 typedef enum {
61 
62 @protocol NvsSmartCutParserDelegate <NSObject>
63 @optional
64 
75 - (void)didDetectStarted:(NSString*)mediaPath taskId:(int64_t)taskId;
76 
87 - (void)didDetectFinished:(NSString*)mediaPath scdPath:(NSString*)scdPath;
88 
97 - (void)didDetectError:(int)errorType;
98 
109 - (void)didDetectProgress:(NSString*)mediaPath progress:(float)progress;
110 
111 @end
112 
122 NVS_EXPORT @interface NvsSmartCutParser : NSObject
123 
124 @property (atomic, weak) id<NvsSmartCutParserDelegate> delegate;
125 
136 + (NSArray *)querySupportedSchemes;
137 
154 + (NvsSmartCutParser *)init:(NvsInferenceScheme *)scheme sceneModelPath:(NSString *)sceneModelPath placeModelPath:(NSString *) placeModelPath;
155 
156 
175 + (NvsSmartCutParser *)init:(NvsInferenceScheme *)scheme sceneModelPath:(NSString *)sceneModelPath placeModelPath:(NSString *) placeModelPath flags:(int)flags;
176 
185 + (void)close;
186 
200 + (BOOL)initHumanDetection:(NSString *)modelFilePath
201  licenseFilePath:(NSString *)licenseFilePath
202  features:(int)features;
203 
215 
226 - (Boolean)setMaxThreadCount:(int)threadCount;
227 
238 - (Boolean)detectMediaFiles:(NSArray *)dataArray;
239 
248 - (void)cancelTask:(int64_t)taskId;
249 
256 - (void)cancelAllTasks;
257 
264 - (void)suspend;
265 
272 - (void)resume;
273 
274 @end
275 
286 NVS_EXPORT @interface NvsInferenceScheme : NSObject
287 
288 @property (nonatomic) NvsFrameworkTypeFlag frameworkType;
289 @property (nonatomic) NvsDeviceTypeFlag deviceType;
290 
291 @end
292 
300 NVS_EXPORT @interface NvsDetectData : NSObject
301 
302 @property (nonatomic) NSString* mediaPath;
303 @property (nonatomic) int frameSpace;
304 @property (nonatomic) NvsSize detectSize;
305 
306 @end
NvsDeviceTypeFlag_Cpu
@ NvsDeviceTypeFlag_Cpu
Definition: NvsSmartCutParser.h:57
NvsFrameworkTypeFlag_MobileGeneral
@ NvsFrameworkTypeFlag_MobileGeneral
Definition: NvsSmartCutParser.h:41
NvsFrameworkTypeFlag_General
@ NvsFrameworkTypeFlag_General
Definition: NvsSmartCutParser.h:40
-[NvsSmartCutParser resume]
void resume()
恢复所有检测任务
NvsSmartCutParser::delegate
id< NvsSmartCutParserDelegate > delegate
Definition: NvsSmartCutParser.h:124
NvsSmartCutParser
智能剪辑类
Definition: NvsSmartCutParser.h:123
NvsDeviceTypeFlag
NvsDeviceTypeFlag
Definition: NvsSmartCutParser.h:55
NvsFrameworkTypeFlag_Nnapi
@ NvsFrameworkTypeFlag_Nnapi
Definition: NvsSmartCutParser.h:45
NvsSmartCutParserFlag
NvsSmartCutParserFlag
Definition: NvsSmartCutParser.h:27
NvsFrameworkTypeFlag
NvsFrameworkTypeFlag
Definition: NvsSmartCutParser.h:38
NvsDeviceTypeFlag_Unknown
@ NvsDeviceTypeFlag_Unknown
Definition: NvsSmartCutParser.h:56
NvsFrameworkTypeFlag_Unknown
@ NvsFrameworkTypeFlag_Unknown
Definition: NvsSmartCutParser.h:39
NvsDeviceTypeFlag_Gpu
@ NvsDeviceTypeFlag_Gpu
Definition: NvsSmartCutParser.h:58
-[NvsSmartCutParser suspend]
void suspend()
挂起检测任务
NvsDetectData
智能检测数据类
Definition: NvsAIParser.h:59
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsFrameworkTypeFlag_Qualcomm
@ NvsFrameworkTypeFlag_Qualcomm
Definition: NvsSmartCutParser.h:43
NvsCommonDef.h
NvsInferenceScheme
推理方案
Definition: NvsSmartCutParser.h:287
NvsDeviceTypeFlag_Npu
@ NvsDeviceTypeFlag_Npu
Definition: NvsSmartCutParser.h:59
NvsFrameworkTypeFlag_Mediatek
@ NvsFrameworkTypeFlag_Mediatek
Definition: NvsSmartCutParser.h:44
+[NvsSmartCutParser close]
void close()
销毁智能剪辑类实例。注意: 销毁之后可以再次创建及获取
NvsFrameworkTypeFlag_Huawei
@ NvsFrameworkTypeFlag_Huawei
Definition: NvsSmartCutParser.h:42
+[NvsSmartCutParser querySupportedSchemes]
NSArray * querySupportedSchemes()
获取支持的推理方案
NvsSize
尺寸
Definition: NvsCommonDef.h:265
NvsSmartCutParserDelegate-p
Definition: NvsSmartCutParser.h:62
-[NvsSmartCutParser cancelAllTasks]
void cancelAllTasks()
取消所有检测任务
+[NvsSmartCutParser getInstance]
NvsSmartCutParser * getInstance()
获取智能剪辑类的单例实例(必须进行初始化后才能使用)
NvsSmartCutParserFlag_None
@ NvsSmartCutParserFlag_None
Definition: NvsSmartCutParser.h:28