音视频再学习笔记(1)(about AVAsset)

文档地址:

https://developer.apple.com/reference/avfoundation/avasset


1AVAsset is an abstract ,immutable class used to model timed audiovisual media such as videos and sounds.An asset may contain one or more tracks that are intended to be presented or processed together, each of a uniform media type, including but not limited to audio ,video, text,closed captions,and subtitles.

AVAsset 是一个抽象不可变的类用来模型化同步的试听的媒体,例如视频和声音,一个asset 可以包含一条或者多条磁道,这些磁道被用来一起呈现或者加工,每个通用的媒体类型,包括但不限于音频视频文字或者闭合字幕和副标题

2、An AVAsset defines the collective properties of the tracks that comprise the asset.(You can access the instances of AVAssetTrack representing tracks of the collection, so you can examin e each of these independently if you need to .)

一个AVAsset 定义了共同的磁道共同的属性,这些属性包含asset实例,你可以去接近AVAssetTrack实例,这个实例代表容器的磁道,你能检查这些中的任意一个,如果你想的话。

3、You often instaniate an asset using AVURLAsset —a concrete subclas of AVAsset —with

URLs that refer to audiovisual media resources ,such as streams (including HTTP live streams),QuickTime movie files,MP3 files, and files of other types.You can also instantiate an asset using other concrete subclasses that extend the basic model for audiovisual media in useful ways, as AVComposition does for temporal editing.

你常常用AVURLAsset实例化一个asset,这个是AVAsset的一个具体的子类,URLs是指视听的媒体资源,像流(包括HTTP live流),QuickTime 电影文件,MP3文件,其他类型的文件, 你也可以用其他的具体的子类实例一个asset,这些子类扩展基本的模型用有用的方式,就如AVComposition 能有暂时的编辑。

4、Properties of assets as a whole are defined byAVAsset. Additionally, references to instances ofAVAssetTrack representing tracks of the collection can be obtained, so that each of these can be examined independently.????

5、Because of the nature of timed audiovisual media ,upon successful initialization of an asset some or all of the values for its keys may not be immediately available.因为同步视听媒体属性,所以只要一个asset进行了成功的初始化,它的键对应的值的一些或者全部可能不会立即可行。

6、To play an instance of AVAsset, initialize an instance of AVPlayerItem with it ,use the player item to set up its presentation state(such as whether only a limited timeRange of the asset should be played,etc), and provide the player item to an AVPlayer object according to whether the item is to be played by itself or together with a collection of other items.

为了使用AVAsset实例,用它初始化一个AVPlayerItem

,然后用playeritem设置他的呈现状态(例如是否应该设置asset一个受限制的timeRange) 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值