BNBVideo
Objective-C
@interface BNBVideo : NSObject
/**@return current loaded video file (string). */
- (nonnull NSString *)getCurrentVideo;
/**@return current loaded video pixels width (int). */
- (int32_t)getWidth;
/**@return current loaded video pixels height (int). */
- (int32_t)getHeight;
/**
*Load video file for decoding.
*@param file_name (string): absolute path for video file.
*/
- (void)load:(nonnull NSString *)videoPath
onLoadingFinished:(nullable id<BNBVideoLoadingResultListener>)onLoadingFinished;
/**
*Load video file for decoding by file descriptor.
*@param fd (i32): file descriptor, should be closed on the caller side.
*/
- (void)loadByFd:(int32_t)fd
onLoadingFinished:(nullable id<BNBVideoLoadingResultListener>)onLoadingFinished;
/**cast video to media parent class (media). */
- (nullable BNBMedia *)asMedia;
/**@return upcast to image type */
- (nullable BNBImage *)asImage;
/** Video own rotation angle */
- (float)getRotationAngle;
/**
*set gpu video texture filtering mode
*param mode (texture_filtering_mode)
*/
- (void)setFilteringMode:(BNBTextureFilteringMode)value;
/**@return filtering mode (texture_filtering_mode) */
- (BNBTextureFilteringMode)getFilteringMode;
@end
Swift
class BNBVideo : NSObject
Undocumented
-
Declaration
Objective-C
- (nonnull NSString *)getCurrentVideo;
Swift
func getCurrentVideo() -> String
Return Value
current loaded video file (string).
-
Declaration
Objective-C
- (int32_t)getWidth;
Swift
func getWidth() -> Int32
Return Value
current loaded video pixels width (int).
-
Declaration
Objective-C
- (int32_t)getHeight;
Swift
func getHeight() -> Int32
Return Value
current loaded video pixels height (int).
-
Load video file for decoding.
Declaration
Objective-C
- (void)load:(nonnull NSString *)videoPath onLoadingFinished: (nullable id<BNBVideoLoadingResultListener>)onLoadingFinished;
Swift
func load(_ videoPath: String, onLoadingFinished: BNBVideoLoadingResultListener?)
Parameters
file_name
(string): absolute path for video file.
-
Load video file for decoding by file descriptor.
Declaration
Objective-C
- (void)loadByFd:(int32_t)fd onLoadingFinished: (nullable id<BNBVideoLoadingResultListener>)onLoadingFinished;
Swift
func load(byFd fd: Int32, onLoadingFinished: BNBVideoLoadingResultListener?)
Parameters
fd
(i32): file descriptor, should be closed on the caller side.
-
Video own rotation angle
Declaration
Objective-C
- (float)getRotationAngle;
Swift
func getRotationAngle() -> Float
-
set gpu video texture filtering mode param mode (texture_filtering_mode)
Declaration
Objective-C
- (void)setFilteringMode:(BNBTextureFilteringMode)value;
Swift
func setFilteringMode(_ value: BNBTextureFilteringMode)
-
Declaration
Objective-C
- (BNBTextureFilteringMode)getFilteringMode;
Swift
func getFilteringMode() -> BNBTextureFilteringMode
Return Value
filtering mode (texture_filtering_mode)