From da5da055408906bd61766d225d299d7b30709cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Fri, 5 Nov 2010 15:07:38 +0100 Subject: [PATCH] mtapi: update to reflect new API on iOS 4.x Also add remaining property constants for device and stream. --- sys/applemedia/mtapi.c | 33 +++++++++++++++++++++++++-------- sys/applemedia/mtapi.h | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/sys/applemedia/mtapi.c b/sys/applemedia/mtapi.c index 05dd58a2de..34b525a853 100644 --- a/sys/applemedia/mtapi.c +++ b/sys/applemedia/mtapi.c @@ -45,15 +45,32 @@ gst_mt_api_obtain (GError ** error) SYM_SPEC (FigCaptureDeviceGetFigBaseObject), SYM_SPEC (FigCaptureStreamGetFigBaseObject), - SYM_SPEC (kFigCaptureDeviceProperty_ImagerFormatDescription), - SYM_SPEC (kFigCaptureDeviceProperty_ImagerFrameRate), - SYM_SPEC (kFigCaptureDeviceProperty_ImagerMinimumFrameRate), - SYM_SPEC (kFigCaptureDeviceProperty_ImagerSupportedFormatsArray), + SYM_SPEC (kFigCaptureDeviceProperty_Clock), + SYM_SPEC (kFigCaptureDeviceProperty_StreamArray), + SYM_SPEC (kFigCaptureStreamProperty_AudioLevelArray), + SYM_SPEC (kFigCaptureStreamProperty_AudioLevelMeteringEnable), + SYM_SPEC (kFigCaptureStreamProperty_AudioLevelUnits), + SYM_SPEC (kFigCaptureStreamProperty_AutoAENow), + SYM_SPEC (kFigCaptureStreamProperty_AutoFocusNow), + SYM_SPEC (kFigCaptureStreamProperty_BufferAllocator), SYM_SPEC (kFigCaptureStreamProperty_BufferQueue), - SYM_SPEC (kFigImagerSupportedFormat_FormatDescription), - SYM_SPEC (kFigImagerSupportedFormat_IsBinned), - SYM_SPEC (kFigImagerSupportedFormat_MaxFrameRate), - SYM_SPEC (kFigImagerSupportedFormat_ScaleFactor), + SYM_SPEC (kFigCaptureStreamProperty_FixedFrameRate), + SYM_SPEC (kFigCaptureStreamProperty_FormatDescription), + SYM_SPEC (kFigCaptureStreamProperty_FormatIndex), + SYM_SPEC (kFigCaptureStreamProperty_FrameDuration), + SYM_SPEC (kFigCaptureStreamProperty_MaximumFrameRate), + SYM_SPEC (kFigCaptureStreamProperty_MinimumFrameRate), + SYM_SPEC (kFigCaptureStreamProperty_NeedSampleBufferDurations), + SYM_SPEC (kFigCaptureStreamProperty_StillImageBufferQueue), + SYM_SPEC (kFigCaptureStreamProperty_StillImageCaptureNow), + SYM_SPEC (kFigCaptureStreamProperty_SupportedFormatsArray), + SYM_SPEC (kFigSupportedFormat_AudioMaxSampleRate), + SYM_SPEC (kFigSupportedFormat_AudioMinSampleRate), + SYM_SPEC (kFigSupportedFormat_FormatDescription), + SYM_SPEC (kFigSupportedFormat_VideoIsBinned), + SYM_SPEC (kFigSupportedFormat_VideoMaxFrameRate), + SYM_SPEC (kFigSupportedFormat_VideoMinFrameRate), + SYM_SPEC (kFigSupportedFormat_VideoScaleFactor), {NULL, 0}, }; diff --git a/sys/applemedia/mtapi.h b/sys/applemedia/mtapi.h index 7fc7367e1b..fbedf31b82 100644 --- a/sys/applemedia/mtapi.h +++ b/sys/applemedia/mtapi.h @@ -29,8 +29,15 @@ typedef struct _GstMTApiClass GstMTApiClass; typedef struct _FigCaptureDevice * FigCaptureDeviceRef; typedef struct _FigCaptureStream * FigCaptureStreamRef; +typedef struct _FigCaptureDeviceIface FigCaptureDeviceIface; typedef struct _FigCaptureStreamIface FigCaptureStreamIface; +struct _FigCaptureDeviceIface +{ + gsize unk; + OSStatus (* Func1) (FigCaptureDeviceRef stream); +}; + struct _FigCaptureStreamIface { gsize unk; @@ -47,15 +54,32 @@ struct _GstMTApi FigBaseObjectRef (* FigCaptureStreamGetFigBaseObject) (FigCaptureStreamRef stream); - CFStringRef * kFigCaptureDeviceProperty_ImagerFormatDescription; - CFStringRef * kFigCaptureDeviceProperty_ImagerFrameRate; - CFStringRef * kFigCaptureDeviceProperty_ImagerMinimumFrameRate; - CFStringRef * kFigCaptureDeviceProperty_ImagerSupportedFormatsArray; + CFStringRef * kFigCaptureDeviceProperty_Clock; + CFStringRef * kFigCaptureDeviceProperty_StreamArray; + CFStringRef * kFigCaptureStreamProperty_AudioLevelArray; + CFStringRef * kFigCaptureStreamProperty_AudioLevelMeteringEnable; + CFStringRef * kFigCaptureStreamProperty_AudioLevelUnits; + CFStringRef * kFigCaptureStreamProperty_AutoAENow; + CFStringRef * kFigCaptureStreamProperty_AutoFocusNow; + CFStringRef * kFigCaptureStreamProperty_BufferAllocator; CFStringRef * kFigCaptureStreamProperty_BufferQueue; - CFStringRef * kFigImagerSupportedFormat_FormatDescription; - CFStringRef * kFigImagerSupportedFormat_IsBinned; - CFStringRef * kFigImagerSupportedFormat_MaxFrameRate; - CFStringRef * kFigImagerSupportedFormat_ScaleFactor; + CFStringRef * kFigCaptureStreamProperty_FixedFrameRate; + CFStringRef * kFigCaptureStreamProperty_FormatDescription; + CFStringRef * kFigCaptureStreamProperty_FormatIndex; + CFStringRef * kFigCaptureStreamProperty_FrameDuration; + CFStringRef * kFigCaptureStreamProperty_MaximumFrameRate; + CFStringRef * kFigCaptureStreamProperty_MinimumFrameRate; + CFStringRef * kFigCaptureStreamProperty_NeedSampleBufferDurations; + CFStringRef * kFigCaptureStreamProperty_StillImageBufferQueue; + CFStringRef * kFigCaptureStreamProperty_StillImageCaptureNow; + CFStringRef * kFigCaptureStreamProperty_SupportedFormatsArray; + CFStringRef * kFigSupportedFormat_AudioMaxSampleRate; + CFStringRef * kFigSupportedFormat_AudioMinSampleRate; + CFStringRef * kFigSupportedFormat_FormatDescription; + CFStringRef * kFigSupportedFormat_VideoIsBinned; + CFStringRef * kFigSupportedFormat_VideoMaxFrameRate; + CFStringRef * kFigSupportedFormat_VideoMinFrameRate; + CFStringRef * kFigSupportedFormat_VideoScaleFactor; }; struct _GstMTApiClass