[Bug 758012] New: systemclock: Use mach_time on Apple platforms

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Nov 12 07:54:00 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=758012

            Bug ID: 758012
           Summary: systemclock: Use mach_time on Apple platforms
    Classification: Platform
           Product: GStreamer
           Version: unspecified
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: hfink at toolsonair.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Under iOS and OSX, posix timers are not available, and system clock currently
falls back  to using g_get_current_time, which ultimately uses gettimeofday.
This is not ideal, rather it is recommended to use mach_absolute_time for
high-resolution timers on these platforms. Attached is a patch that provides
this implementation. A new test for clock_get_resolution of the system clock
implementation is also added. 

I have tested this on OSX 10.11, but I haven't had the chance to test this on
iOS. All changes should be compatible with iOS, but it would be great if
someone could test this. Also, mach_absolute_time is likely more accurate on
iOS than g_get_current_time, but it could come at a price of using more CPU
cycles, i.e. use more power, which might be relevant on mobile devices.

Apple's own documentation, though, suggests using mach_absolute_time on iOS,
too: 

https://developer.apple.com/library/ios/qa/qa1643/_index.html

Also related:
https://developer.apple.com/library/ios/technotes/tn2169/_index.html

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list