BNBVisualClip
Objective-C
@interface BNBVisualClip : NSObject
/**
* Create instance of visual clip processor
* @param musicDbPath absolute path to folder with music info
* @param effectsTemplatesPath absolute path to folder with effects templates
* @param listener callback
*/
+ (nullable BNBVisualClip *)create:(nonnull NSString *)musicDbPath
effectsTemplatesPath:(nonnull NSString *)effectsTemplatesPath
listener:(nullable id<BNBVisualClipListener>)listener;
/**
* Process video and get recomendations
* @param videos array of videos to process
* @param numFrames number of frames in video to process
* @param resultSize number of recomendations in result array
* @return array of recomendations, each is json, sorted by relevance
*/
- (nonnull NSArray<NSString *> *)process:(nonnull NSArray<BNBVisualClipVideo *> *)videos
numFrames:(int32_t)numFrames
resultSize:(int32_t)resultSize;
@end
Swift
class BNBVisualClip : NSObject
Undocumented
-
Create instance of visual clip processor
Declaration
Objective-C
+ (nullable BNBVisualClip *)create:(nonnull NSString *)musicDbPath effectsTemplatesPath:(nonnull NSString *)effectsTemplatesPath listener:(nullable id<BNBVisualClipListener>)listener;
Swift
class func create(_ musicDbPath: String, effectsTemplatesPath: String, listener: BNBVisualClipListener?) -> BNBVisualClip?
Parameters
musicDbPath
absolute path to folder with music info
effectsTemplatesPath
absolute path to folder with effects templates
listener
callback
-
Process video and get recomendations
Declaration
Objective-C
- (nonnull NSArray<NSString *> *) process:(nonnull NSArray<BNBVisualClipVideo *> *)videos numFrames:(int32_t)numFrames resultSize:(int32_t)resultSize;
Swift
func process(_ videos: [BNBVisualClipVideo], numFrames: Int32, resultSize: Int32) -> [String]
Parameters
videos
array of videos to process
numFrames
number of frames in video to process
resultSize
number of recomendations in result array
Return Value
array of recomendations, each is json, sorted by relevance