GNOME Bugzilla – Bug 667303
systemclock: use CoreVideo on Mac OS X
Last modified: 2015-11-13 08:25:25 UTC
Created attachment 204621 [details] [review] patch CoreAudio and CoreVideo have a common clock, so using CoreVideo in GstSystemClock means that Mac-specific elements will be able to use timestamps from native APIs. It is also likely to be the best clock source on this OS. However, on iOS this does not work very well, so make sure it is not being used there, even if available.
Review of attachment 204621 [details] [review]: How good is the accuracy of the clock? Is it monotonic? ::: configure.ac @@ +359,3 @@ + +HAVE_IOS="no" +AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-]) What's the [-]? And why doesn't it work properly on iOS? ::: gst/gstsystemclock.c @@ +202,3 @@ + } else { + priv->cv_ratio_n = 1; + priv->cv_ratio_d = host_freq / GST_SECOND; You mean cv_ratio_n = GST_SECOND; cv_ratio_d = host_freq; right? And the frequency is really reported in nanoseconds by CVGetHostClocKFrequency?
(In reply to comment #1) > Review of attachment 204621 [details] [review]: > > How good is the accuracy of the clock? Is it monotonic? > > I don't remember those numbers anymore, but it was the clock we used for everything in Movi / Jabber Video on OSX. > > What's the [-]? And why doesn't it work properly on iOS? > > Don't remember, probably not needed, and you will have to ask Apple why. I just remember that it did not behave at all. > ::: gst/gstsystemclock.c > @@ +202,3 @@ > + } else { > + priv->cv_ratio_n = 1; > + priv->cv_ratio_d = host_freq / GST_SECOND; > > You mean cv_ratio_n = GST_SECOND; cv_ratio_d = host_freq; right? And the > frequency is really reported in nanoseconds by CVGetHostClocKFrequency? Well, do you do one large division initially, or do you do a large division every time you access the clock? Result is the same, consider it a small optimization. And yes, obviously in nanoseconds.
Ok, so what's the big advantage of doing this over just using the monotonic clock? Especially, is this clock monotonic or not? :)
*** This bug has been marked as a duplicate of bug 758012 ***