VKAudioDecoder Class Reference
Overview
VKAudioDecoder is responsible for decoding & resampling of audio packets, and making audio effects
– initWithFormatContext:codecContext:stream:streamId:manager:
Initialize VKAudioDecoder object with AVCodecContext, AVStream, stream, and index parameters
- (id)initWithFormatContext:(AVFormatContext *)avFmtCtx codecContext:(AVCodecContext *)cdcCtx stream:(AVStream *)strm streamId:(NSInteger)sId manager:(id)managerParameters
cdcCtx |
FFmpeg’s codec I/O context |
|---|---|
strm |
FFmpeg’s Stream structure |
sId |
Stream index |
manager |
VKDecodeManager object |
Return Value
VKAudioDecoder object
Declared In
VKAudioDecoder.h
– unlockQueues
Queues are interworking with eachother and uses wait mechanism for management, this methods unlocks all queues
- (void)unlockQueuesDeclared In
VKAudioDecoder.h
– setEOF:
Inform Audio Decoder that it’s reached end of file
- (void)setEOF:(BOOL)valueParameters
value |
Specify YES for end of file is reached or NO for continue playing |
|---|
Declared In
VKAudioDecoder.h
isWaitingForPackets
Buffering is based on whather the queue has audio packets or not, so this property indicates this state
@property (nonatomic, readonly) BOOL isWaitingForPacketsDeclared In
VKAudioDecoder.h
currentPtsDrift
Time difference of current PTS value and now
@property (nonatomic, readonly) double currentPtsDriftDeclared In
VKAudioDecoder.h
currentPos
Current byte position of AVPacket in stream, used for AV syncing
@property (nonatomic, readonly) int64_t currentPosDeclared In
VKAudioDecoder.h
volumeLevel
This a gain volume effect which must be between 0.0 - 1.0, default value is 1.0
@property (nonatomic, assign) float volumeLevelDiscussion
volumeLevel does not have any effect on MPVolumeView
Declared In
VKAudioDecoder.h
panningLevel
This is a channel panning effect which must be between -1.0 (all audio is routed to left channel) and +1.0 (all audio is routed to right channel), default value is 0.0 which means no panning (audio is routed to both left & right channels)
@property (nonatomic, assign) float panningLevelDeclared In
VKAudioDecoder.h