15 #import <Foundation/Foundation.h>
27 NvsPassthroughConvertorErrorType_NoError = 0,
28 NvsPassthroughConvertorErrorType_Cancled = 1,
29 NvsPassthroughConvertorErrorType_SetupAudioEncoder = 2,
30 NvsPassthroughConvertorErrorType_SetupAudioDecoder = 3,
31 NvsPassthroughConvertorErrorType_ProcessVideo = 4,
32 NvsPassthroughConvertorErrorType_ProcessAudio = 5,
33 NvsPassthroughConvertorErrorType_InvalidData = 6,
34 NvsPassthroughConvertorErrorType_IO = 7,
35 NvsPassthroughConvertorErrorType_ConvertFile = 8,
36 NvsPassthroughConvertorErrorType_UnkownError = 65535
37 } NvsPassthroughConvertorErrorType;
46 NvsPassthroughType_All = 0,
47 NvsPassthroughType_OnlyVideo = 1,
48 NvsPassthroughType_DisableTranscode = 2
51 #define PASSTHROUGH_OPTIMIZE_FOR_NETWORK_USE @"optimize-for-network-use"
52 #define PASSTHROUGH_CREATION_TIME @"creation time"
53 #define PASSTHROUGH_METADATADESCRIPTION @"metadata description"
55 @protocol NvsPassthroughConvertorDelegate<NSObject>
57 - (void)didConvertorProgress:(int64_t)taskId progress:(
float)progress;
59 - (void)didConvertorFinish:(int64_t)taskId errorCode:(NvsPassthroughConvertorErrorType)error errorString:(NSString*)errorString;
70 NVS_EXPORT @interface NvsPassthroughFileInfo : NSObject
72 @property (nonatomic) NSString *mediaFilePath;
73 @property (nonatomic) int64_t trimIn;
74 @property (nonatomic) int64_t trimOut;
79 NVS_EXPORT @interface NvsPassthroughConvertor : NSObject
81 @property (nonatomic, weak) id<NvsPassthroughConvertorDelegate> delegate;
101 - (int64_t)convertMediaFile:(NSArray<NvsPassthroughFileInfo*>*)srcFileInfos
102 outputFile:(NSString *)outputFilePath
103 options:(NSMutableDictionary *)options
104 passthroughType:(
int)passthroughType;
106 - (void)cancelTask:(int64_t)taskId;