MeiCam SDK For iOS  3.7.2
NvsPassthroughConvertor.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 2022. 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: Mar 21. 2022
11 // Author: NewAuto video team
12 //================================================================================
13 #pragma once
14 
15 #import <Foundation/Foundation.h>
16 #import "NvsCommonDef.h"
17 
26 typedef enum {
27  NvsPassthroughConvertorErrorType_NoError = 0,
28  NvsPassthroughConvertorErrorType_Cancled,
29  NvsPassthroughConvertorErrorType_ProcessVideoError,
30  NvsPassthroughConvertorErrorType_ProcessAudioError,
31  NvsPassthroughConvertorErrorType_InvalidData,
32  NvsPassthroughConvertorErrorType_IO,
33  NvsPassthroughConvertorErrorType_UnkownError = 65535
34 } NvsPassthroughConvertorErrorType;
35 
36 @protocol NvsPassthroughConvertorDelegate<NSObject>
37 
38 - (void)didConvertorProgress:(int64_t)taskId progress:(float)progress;
39 
40 - (void)didConvertorFinish:(int64_t)taskId sourceFile:(NSString*)src outputFile:(NSString*)dst trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut errorCode:(NvsPassthroughConvertorErrorType)error;
41 
42 @end
43 
44 
45 NVS_EXPORT @interface NvsPassthroughConvertor : NSObject
46 
47 @property (nonatomic, weak) id<NvsPassthroughConvertorDelegate> delegate;
48 
49 - (instancetype)init;
50 
51 - (int64_t)convertMediaFile:(NSString *)srcFilePath
52  outputFile:(NSString *)outputFilePath
53  trimIn:(int64_t)trimIn
54  trimOut:(int64_t)trimOut
55  options:(NSMutableDictionary *)options;
56 
57 - (void)cancelTask:(int64_t)taskId;
58 
59 @end
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsCommonDef.h