MeiCam SDK For iOS  3.14.0
NvsAIParser.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright Meishe Co. Ltd, 2016. 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: Feb 18. 2022
11 // Author: Meishe video team
12 //================================================================================
13 #pragma once
14 #import "NvsObject.h"
15 
16 NS_ASSUME_NONNULL_BEGIN
17 
18 @protocol AIParserDelegate <NSObject>
19 @optional
20 - (void)onParserStarted:(NSString*)mediaPath taskId:(int64_t)taskId;
21 - (void)onParserFinished:(NSString*)mediaPath scdPath:(NSString*)scdPath;
22 - (void)onParserError:(int)errorType;
23 - (void)onParserProgress:(NvsVideoFrameInfo *_Nullable)videoFrameInfo mediaPath:(NSString*)mediaPath progress:(float)progress;
24 
25 @end
26 
27 typedef enum {
31 
32 NVS_EXPORT @interface NvsDetectData : NSObject
33 
34 @property(nonatomic, strong) NSString *mediaPath;
35 @property(nonatomic, assign) int frameSpace;
36 @property(nonatomic, assign) NvsSize detectSize;
37 @property(nonatomic, assign) int year;
38 @property(nonatomic, assign) int month;
39 @property(nonatomic, assign) int day;
40 @property(nonatomic, assign) int hour;
41 @property(nonatomic, assign) int minute;
42 @property(nonatomic, assign) int second;
43 
44 @end
45 
46 NVS_EXPORT @interface NvsAIParser : NSObject
47 
48 - (instancetype)initWithFlags:(int)flags;
49 @property (nonatomic, weak) id<AIParserDelegate> delegate;
50 
51 - (BOOL)parseMediaFiles:(NSArray <NvsDetectData*>*)dataList;
52 
53 - (void)cancelTask:(int64_t)taskId;
54 
55 - (void)cancelAllTasks;
56 
57 - (void)suspend;
58 
59 - (void)resume;
60 
61 - (void)setGlobalFrameSpace:(int)frameSpace;
62 
64 
65 @end
66 
67 NS_ASSUME_NONNULL_END
NvsDetectData::second
int second
Definition: NvsAIParser.h:42
NvsDetectData::minute
int minute
Definition: NvsAIParser.h:41
NvsVideoFrameInfo
Video frame information.
Definition: NvsCommonDef.h:446
-[NvsAIParser cancelAllTasks]
void cancelAllTasks()
AIParserDelegate-p
Definition: NvsAIParser.h:18
NvsDetectData::hour
int hour
Definition: NvsAIParser.h:40
NvsDetectData::day
int day
Definition: NvsAIParser.h:39
NvsDetectData::frameSpace
int frameSpace
frame space
Definition: NvsAIParser.h:35
NvsAIParserFlag_OnlyDetectKeyFrameFrameSpace
@ NvsAIParserFlag_OnlyDetectKeyFrameFrameSpace
Definition: NvsAIParser.h:29
NvsDetectData::year
int year
Definition: NvsAIParser.h:37
NvsAIParser::delegate
id< AIParserDelegate > delegate
Definition: NvsAIParser.h:49
NvsAIParserFlag_None
@ NvsAIParserFlag_None
Definition: NvsAIParser.h:28
NvsObject.h
NvsDetectData
detect data class.
Definition: NvsAIParser.h:33
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
-[NvsAIParser suspend]
void suspend()
NvsAIParserFlag
NvsAIParserFlag
Definition: NvsAIParser.h:27
NvsDetectData::month
int month
Definition: NvsAIParser.h:38
NvsDetectData::detectSize
NvsSize detectSize
detect size
Definition: NvsAIParser.h:36
NvsSize
Size.
Definition: NvsCommonDef.h:350
NvsDetectData::mediaPath
NSString * mediaPath
media path
Definition: NvsAIParser.h:34
-[NvsAIParser disableGlobalFrameSpace]
void disableGlobalFrameSpace()
-[NvsAIParser resume]
void resume()
NvsAIParser
Definition: NvsAIParser.h:47