MeiCam SDK For iOS  3.10.0
NvsDetectShotParser.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 2023. 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: Oct 27. 2023
11 // Author: Meishe video team
12 //================================================================================
13 #pragma once
14 
15 #import "NvsCommonDef.h"
16 #import <Foundation/Foundation.h>
17 
18 @protocol NvsDetectShotParserDelegate <NSObject>
19 @optional
20 
31 - (void)didDetectStarted:(NSString*)videoPath taskId:(int64_t)taskId;
32 
43 - (void)didDetectFinished:(NSString*)videoPath timeStampArray:(NSArray *)timeStampArray;
44 
53 - (void)didDetectError:(int)errorType;
54 
65 - (void)didDetectProgress:(NSString*)videoPath progress:(float)progress;
66 
67 @end
68 
78 NVS_EXPORT @interface NvsDetectShotParser : NSObject
79 
80 @property (atomic, weak) id<NvsDetectShotParserDelegate> delegate;
81 
92 
101 + (void)close;
102 
114 
125 - (Boolean)setMaxThreadCount:(int)threadCount;
126 
137 - (Boolean)detect:(NSString *)videoPath;
138 
147 - (void)cancelTask:(int64_t)taskId;
148 
155 - (void)cancelAllTasks;
156 
163 - (void)suspend;
164 
171 - (void)resume;
172 
173 @end
174 
175 
+[NvsDetectShotParser init]
NvsDetectShotParser * init()
Initializes detect shot instance.
-[NvsDetectShotParser cancelAllTasks]
void cancelAllTasks()
cancel all detect tasks.
-[NvsDetectShotParser suspend]
void suspend()
suspend all detect tasks.
+[NvsDetectShotParser close]
void close()
Destroys the detect shot object instance. note: it can be created again after destruction.
NvsDetectShotParser
Detect shot parser class.
Definition: NvsDetectShotParser.h:79
+[NvsDetectShotParser getInstance]
NvsDetectShotParser * getInstance()
Gets the instance of detect shot object (only can use this after initialization)
NvsDetectShotParserDelegate-p
Definition: NvsDetectShotParser.h:18
-[NvsDetectShotParser resume]
void resume()
resume all detect tasks.
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsCommonDef.h
NvsDetectShotParser::delegate
id< NvsDetectShotParserDelegate > delegate
Definition: NvsDetectShotParser.h:80