翻译:AVPlayerItemVideoOutput

来源:互联网 发布:淘宝店运营商靠谱吗 编辑:程序博客网 时间:2024/05/17 23:33

@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:.