ios – CMTimeCompare如何工作?

ios – CMTimeCompare如何工作?,第1张

概述CMTimeCompare如何工作? Apple似乎已经从他们的文档中遗漏了返回值. https://developer.apple.com/library/mac/#documentation/CoreMedia/Reference/CMTime/Reference/reference.html 我假设如果时间相等则返回零并返回正或负1,基于哪个更大? 来自CMTime.h: Returns t CMTimeCompare如何工作? Apple似乎已经从他们的文档中遗漏了返回值.

https://developer.apple.com/library/mac/#documentation/CoreMedia/Reference/CMTime/Reference/reference.html

我假设如果时间相等则返回零并返回正或负1,基于哪个更大?

解决方法 来自CMTime.h:

Returns the numerical relationship (-1 = less than,1 = greater than,
0 = equal) of two CMTimes.

-1 is returned if time1 is less than time2. 0 is returned if they are equal. 1 is returned if time1 is greater than time2.

编辑:

请注意:

InvalID CMTimes are consIDered to be equal to other invalID CMTimes,and greater than any other CMTime. Positive infinity is consIDered to be less than any invalID CMTime,equal to itself,and greater than any other CMTime. An indefinite CMTime is consIDered to be less than any invalID CMTime,less than positive infinity,and greater than any other CMTime. Negative infinity is consIDered to be equal to itself,and less than any other CMTime.

总结

以上是内存溢出为你收集整理的ios – CMTimeCompare如何工作?全部内容,希望文章能够帮你解决ios – CMTimeCompare如何工作?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1102601.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存