Advantages of managing asset loading via AVAsset vs AVPlayerItem?

I'm working on an application which requires fine-grained control over the loading and playback of video assets, and I am unsure whether it's better to manage my assets at the level of AVAsset or AVPlayerItem.

It seems like both these classes are capable of loading video, and the main difference is that AVPlayerItem also has the functionality to manage the playback status of videos in addition to loading them.

Conceptually, it makes sense to me to manage the video data as AVAsset objects (AVURLAsset specifically since these will be loaded from network) as part of my model layer, and then to introduce AVPlayerItem objects in the view layer as needed to attach to AVPlayerLayers for display.

Does this approach make sense, or is it totally redundant to manage AVAsset and AVPlayerItem separately?

链接地址: http://www.djcxy.com/p/56892.html

上一篇: Rails扩展ActiveRecord :: Base

下一篇: 通过AVAsset与AVPlayerItem管理资产加载的优点?