AliyunNativeParser
@interface AliyunNativeParser : NSObject
* A class that defines parsers.
-
* Initializer.
Declaration
Objective-C
- (instancetype)initWithPath:(NSString *)path;Parameters
pathThe file path.
Return Value
A parser object.
-
* Gets basic parameters about the file.
Declaration
Objective-C
- (NSString *)getValueForKey:(NSInteger)key;Parameters
keyThe parameter name.
Return Value
The parameter value represented as a string. For example, to get the video duration: CGFloat duration = [[_parser getValueForKey:ALIYUN_VIDEO_DURATION] integerValue]/1000000.0f;
-
* Gets the video encoding format.
Declaration
Objective-C
- (NSString *)getVideoCodec;Return Value
The video encoding format. The getValueForKey: method is available.
-
* Gets the video duration.
Declaration
Objective-C
- (CGFloat)getVideoDuration;Return Value
The video duration. The getValueForKey: method is available.
-
* Gets the number of frames in the video.
Declaration
Objective-C
- (NSInteger)getVideoFrameCount;Return Value
The number of frames. The getValueForKey: method is available.
-
* Gets the video frame rate.
Declaration
Objective-C
- (NSInteger)getVideoFrameRate;Return Value
The video frame rate. The getValueForKey: method is available.
-
* Gets the video bitrate.
Declaration
Objective-C
- (NSInteger)getVideoBitrate;Return Value
The video bitrate. The getValueForKey: method is available.
-
* Gets the width of the video.
Declaration
Objective-C
- (NSInteger)getVideoWidth;Return Value
The width of the video. The getValueForKey: method is available.
-
* Gets the height of the video.
Declaration
Objective-C
- (NSInteger)getVideoHeight;Return Value
The height of the video. The getValueForKey: method is available.
-
* Gets the audio encoding format.
Declaration
Objective-C
- (NSString *)getAudioCodec;Return Value
The audio encoding format. The getValueForKey: method is available.
-
* Gets the audio duration.
Declaration
Objective-C
- (CGFloat)getAudioDuration;Return Value
The audio duration. The getValueForKey: method is available.
-
* Gets the number of frames in the audio.
Declaration
Objective-C
- (NSInteger)getAudioFrameCount;Return Value
The number of frames in the audio. The getValueForKey: method is available.
-
* Gets the audio bitrate.
Declaration
Objective-C
- (NSInteger)getAudioBitrate;Return Value
The audio bitrate. The getValueForKey: method is available.
-
* Gets the number of sound channels in the audio.
Declaration
Objective-C
- (NSInteger)getAudioChannels;Return Value
The number of sound channels in the audio. The getValueForKey: method is available.
-
* Gets the audio sample rate.
Declaration
Objective-C
- (NSInteger)getAudioSampleRate;Return Value
The audio sample rate. The getValueForKey: method is available.
-
* Get the audio sound format
Declaration
Objective-C
- (NSInteger)getAudioSoundFormat;Return Value
The audio sound format The getValudForKey: method is avaliable.
-
* Gets the video file duration.
Declaration
Objective-C
- (CGFloat)getFileDuration;Return Value
The video file duration. The getValueForKey: method is available.
-
* Gets the file format.
Declaration
Objective-C
- (NSString *)getFileFormat;Return Value
The file format. The getValueForKey: method is available.
-
* Gets the video file bitrate.
Declaration
Objective-C
- (NSInteger)getFileBitrate;Return Value
The video file bitrate. The getValueForKey: method is available.
-
* Gets the GOP size of the video.
Declaration
Objective-C
- (NSInteger)getGopSize;Return Value
The GOP size.
-
Deprecated
deprecated
* Whether B-frames exist in the video.
Declaration
Objective-C
- (BOOL)checkBFrame;Return Value
Whether B-frames exist.
-
Deprecated
deprecated
* Whether the video supports reverse playback.
Declaration
Objective-C
- (BOOL)checkInvertAvailable;Return Value
Whether reverse playback is supported.
-
Deprecated
deprecated
* Gets the maximum cache size for the video.
Declaration
Objective-C
- (int)getMaxEstimatedCacheSize;Return Value
The maximum cache size.
-
* Gets the Thumbnails of the video. API_AVAILABLE(3.20.0)
Declaration
Objective-C
- (void)loadThumbnailListWithDuration:(float)duration imageWidth:(int)imageWidth complete:(ThumbnailCallBack)complete;Parameters
durationthe duration of time to get image,unit: seconds
imageWidthwidth of the output image
completecomplete,- see: ThumbnailCallBack
-
* Gets the Thumbnails of the video. API_AVAILABLE(3.20.0)
Declaration
Objective-C
- (void)loadThumbnailWithTimeList:(NSArray<NSNumber *> *)timeList imageWidth:(int)imageWidth complete:(ThumbnailCallBack)complete;Parameters
timeListcontains time of vide, unit: seconds
imageWidthwidth of the output image
completecomplete,- see: ThumbnailCallBack
AliyunNativeParser Class Reference