@class AVPlayerItemVideoOutput
@method initWithPixelBufferAttributes:
- (instancetype)initWithPixelBufferAttributes:(nullable NSDictionary<NSString *, id> *)pixelBufferAttributes NS_DESIGNATED_INITIALIZER;
@abstract
返回一個對應視頻圖像輸出的AVPlayerItemVideoOutput的實例,它根據設定的pixel buffer attributes來初始化。
@param pixelBufferAttributes
客戶端要求輸出的CVPixelBuffers,在
@method requestNotificationOfMediaDataChangeWithAdvanceInterval:
- (void)requestNotificationOfMediaDataChangeWithAdvanceInterval:(NSTimeInterval)interval;
@abstract
通知receiver AVPlayerItemVideoOutput client即將進入一個quiescent state。
@param interval
一個設定的時間間隔。
@discussion
在你打算延遲使用CVDisplayLink or CADisplayLink之前給這個方法發送消息。你提供的這個interval將是你的delegate接收到消息的延時,並且,這將重啓display link。如果你提供的interval很大,effectively requesting wakeup earlier than the AVPlayerItemVideoOutput is prepared to act, the delegate will be invoked as soon as possible. Do not use this method to force a delegate invocation for each sample.(還不太明白).
@method setDelegate:queue:
- (void)setDelegate:(nullable id<AVPlayerItemOutputPullDelegate>)delegate queue:(nullable dispatch_queue_t)delegateQueue;
@abstract
@abstract Sets the receiver’s delegate and a dispatch queue on which the delegate will be called.
@param delegate
An object conforming to AVPlayerItemOutputPullDelegate protocol.
@param delegateQueue
A dispatch queue on which all delegate methods will be called.
@protocol AVPlayerItemOutputPullDelegate
@optional
@method outputMediaDataWillChange:
- (void)outputMediaDataWillChange:(AVPlayerItemOutput *)sender NS_AVAILABLE(10_8, 6_0);
@abstract
這個方法當AVPlayerItemOutput接收到requestNotificationOfMediaDataChangeWithAdvanceInterval時,會馬上調用。
@discussion
This method is invoked once after the sender is messaged requestNotificationOfMediaDataChangeWithAdvanceInterval:.