音视频开发-CMTime的运用

CMTime是视频时间表示的数据类型,用于描述不同播放速度的视频时长。CMTimeMake通常用于创建帧数/FPS的时间,timescale决定了时间精度,建议视频使用600,音频使用60,000。CMTimeMakeWithSeconds则表示按秒划分的时间单位。" 126571537,15161599,数据仓库基础解析:架构、概念与应用,"['数据仓库', '数据库系统', '后端开发', '数据处理', '数据架构']
摘要由CSDN通过智能技术生成

CMTime

/*!
	@typedef	CMTime
	@abstract	Rational time value represented as int64/int32.
*/
typedef struct
{
   
	CMTimeValue	value;		/*! @field value The value of the CMTime. value/timescale = seconds. */
	CMTimeScale	timescale;	/*! @field timescale The timescale of the CMTime. value/timescale = seconds.  */
	CMTimeFlags	flags;		/*! @field flags The flags, eg. kCMTimeFlags_Valid, kCMTimeFlags_PositiveInfinity, etc. */
	CMTimeEpoch	epoch;		/*! @field epoch Differentiates between equal timestamps that are actually different because
												 of looping, multi-item sequencing, etc.  
												 Will be used during comparison: greater epochs happen after lesser ones. 
												 Additions/subtraction is only possible within a single epoch,
												 however, since epoch length may be unknown/variable. */
} CMTime;

CMTime是专门针对视频时间的一种数据类型,首先我们探讨一下,有两个视频ABA视频共15帧,播放速度为5fps(即每秒播放5帧),那么A的持续时间为3s,同样有B视频,共60帧,播放速率为20fps,那么B的持续时间也为3s。既然两个视频都是3s的持续时长,那我们怎么用一种时间格式表示他们之间的差异,CMTime就适用于这

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值