[FFmpeg-devel] [PATCH 1/2] osx: detect version of mac os

Sebastien Zwickert dilaroga at gmail.com
Thu Aug 23 17:57:07 CEST 2012

On Aug 23, 2012, at 5:38 PM, Xidorn Quan <quanxunzhen at gmail.com> wrote:

> On Thu, Aug 23, 2012 at 8:28 PM, Sebastien Zwickert <dilaroga at gmail.com>wrote:
>> An alternative was to use the old Gestalt Manager API but this API became
>> deprecated since 10.8
>> and apple did not provide any replacement API.
>> There's a radar opened about this:
>> http://openradar.appspot.com/11798430
>> Another one is to use the kCFCoreFoundationVersionNumber macro to do a
>> runtime version check.
> My system version is 10.7.x but the largest version number defined in
> CFBase.h is kCFCoreFoundationVersionNumber10_6_5, so it cannot be used. If
> we can check version for Core Video, that might be a good replacement.

AFAIK, CoreVideo doesn't define version numbers.

A hack could be to define kCFCoreFoundationVersionNumber10_7 yourself if it's not defined.

#ifndef kCFCoreFoundationVersionNumber10_7
#define kCFCoreFoundationVersionNumber10_7      635.00

kCFCoreFoundationVersionNumber10_7 is defined in CFBase.h from 10.8 SDK.

Sebastien Zwickert

More information about the ffmpeg-devel mailing list