Sar*_*aya 0 iphone objective-c avfoundation avplayer
您好,我正在使用 AVFoundation Framework 播放来自互联网的剪辑。我用AVPlayerItem playerItemWithURL:URL
现在我想检查从该视频文件接收到的字节的大小。我在此页面上找不到任何相关内容: https //developer.apple.com/library/mac/#documentation/AVFoundation/Reference/AVPlayerItem_Class/Reference/Reference.html
那么有没有办法找到接收到的字节大小?
小智 5
看看AVPlayerItemAccessLogEvent类。
您可以通过`访问
self.aPlayer.currentItem.accessLog
AVPlayerItemAccessLog *accesslog = self.aPlayer.currentItem.accessLog;
NSArray *events = [accesslog events];
AVPlayerItemAccessLogEvent *event = [events objectAtIndex:0];
NSLog(@"Number of bytes received %@", [event numberOfBytesTransferred]);
Run Code Online (Sandbox Code Playgroud)
您有 Accesslog,它为您提供有关数据属性的详细信息
numberOfSegmentsDownloaded property
numberOfMediaRequests property
playbackStartDate property
URI property
serverAddress property
numberOfServerAddressChanges property
playbackSessionID property
playbackStartOffset property
segmentsDownloadedDuration property
durationWatched property
numberOfStalls property
numberOfBytesTransferred property
indicatedBitrate property
observedBitrate property
numberOfDroppedVideoFrames property
Run Code Online (Sandbox Code Playgroud)
IMO,这是您唯一的选择,但这也有其缺陷,尤其是在寻求等时。
| 归档时间: |
|
| 查看次数: |
1781 次 |
| 最近记录: |