[Mac] Add helper methods to convert CMTime <--> MediaTime
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Oct 2013 07:07:07 +0000 (07:07 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Oct 2013 07:07:07 +0000 (07:07 +0000)
commit7b058309cbc9752662cc971e44eda1002a6392f0
tree44a671bbad90e8ff087017540b612a26ef50921c
parent36a0e01b4dbe6c18a61d75f4b7abd795899a7cb1
[Mac] Add helper methods to convert CMTime <--> MediaTime
https://bugs.webkit.org/show_bug.cgi?id=123285

Reviewed by Eric Carlson.

Source/WebCore:

Add utility methods to convert between CMTime (a rational time class) and MediaTime.
Once there, PlatformClockCM can now vend and accept MediaTimes for currentTime.

* platform/mac/MediaTimeMac.h:
* platform/mac/MediaTimeMac.cpp:
(WebCore::toMediaTime): Added conversion utility method.
(WebCore::toCMTime): Ditto.

* platform/mac/PlatformClockCM.h:
* platform/mac/PlatformClockCM.mm:
(PlatformClockCM::setCurrentMediaTime): Added.
(PlatformClockCM::currentMediaTime): Added.

* WebCore.xcodeproj/project.pbxproj: Add new files to project.

Source/WTF:

Add a #ifdef header_h protector.

* wtf/MediaTime.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/WTF/ChangeLog
Source/WTF/wtf/MediaTime.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mac/MediaTimeMac.cpp [new file with mode: 0644]
Source/WebCore/platform/mac/MediaTimeMac.h [new file with mode: 0644]
Source/WebCore/platform/mac/PlatformClockCM.h
Source/WebCore/platform/mac/PlatformClockCM.mm