aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kodi.xcodeproj/project.pbxproj2
-rw-r--r--tools/darwin/Configurations/App-iOS.xcconfig2
-rwxr-xr-xtools/darwin/Support/copyframeworks-ios.command6
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp135
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.h6
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DllVideoToolBox.h161
6 files changed, 230 insertions, 82 deletions
diff --git a/Kodi.xcodeproj/project.pbxproj b/Kodi.xcodeproj/project.pbxproj
index ae7d472a80..747fe1e7ee 100644
--- a/Kodi.xcodeproj/project.pbxproj
+++ b/Kodi.xcodeproj/project.pbxproj
@@ -4612,6 +4612,7 @@
DFBB4307178B574E006CC20A /* AddonCallbacksCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddonCallbacksCodec.h; sourceTree = "<group>"; };
DFBB4317178B5E6F006CC20A /* CompileInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompileInfo.cpp; sourceTree = "<group>"; };
DFBB4318178B5E6F006CC20A /* CompileInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompileInfo.h; sourceTree = "<group>"; };
+ DFBD336A1BD531CB001A8FEE /* DllVideoToolBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllVideoToolBox.h; sourceTree = "<group>"; };
DFBE803D15F7D72100D7D102 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
DFC6F4AD1AFF7CB10039A7FA /* _kiss_fft_guts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _kiss_fft_guts.h; sourceTree = "<group>"; };
DFC6F4AF1AFF7CB10039A7FA /* kiss_fft.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = kiss_fft.c; sourceTree = "<group>"; };
@@ -8458,6 +8459,7 @@
children = (
E38E15430D25F9F900618676 /* libmpeg2 */,
E38E153B0D25F9F900618676 /* DllLibMpeg2.h */,
+ DFBD336A1BD531CB001A8FEE /* DllVideoToolBox.h */,
F597B05A18A804E0005AADAE /* DVDVideoCodec.cpp */,
E38E153C0D25F9F900618676 /* DVDVideoCodec.h */,
E38E153D0D25F9F900618676 /* DVDVideoCodecFFmpeg.cpp */,
diff --git a/tools/darwin/Configurations/App-iOS.xcconfig b/tools/darwin/Configurations/App-iOS.xcconfig
index 1a8fcc8794..f71fafafbb 100644
--- a/tools/darwin/Configurations/App-iOS.xcconfig
+++ b/tools/darwin/Configurations/App-iOS.xcconfig
@@ -40,6 +40,6 @@ COPY_PHASE_STRIP = NO
DEAD_CODE_STRIPPING = NO
OTHER_CPLUSPLUSFLAGS = $(inherited) $(OTHER_CFLAGS) -Wreorder
-OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON) -weak_framework VideoToolbox -Wl,-segalign,4000
+OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON)
GCC_PREPROCESSOR_DEFINITIONS = TARGET_DARWIN_IOS $(inherited)
diff --git a/tools/darwin/Support/copyframeworks-ios.command b/tools/darwin/Support/copyframeworks-ios.command
index a0031ab79a..409d0b69eb 100755
--- a/tools/darwin/Support/copyframeworks-ios.command
+++ b/tools/darwin/Support/copyframeworks-ios.command
@@ -75,12 +75,6 @@ chmod u+w "$TARGET_FRAMEWORKS/$(basename $a)"
install_name_tool -change "$a" "$DYLIB_NAMEPATH/$(basename $a)" "$TARGET_BINARY"
done
-echo "Fixing $TARGET_BINARY VideoToolbox dylib name"
-VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
-VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
-install_name_tool -change "$VTB_SDK6" "$VTB_SDK5" "$TARGET_BINARY"
-
-
echo "Package $EXTERNAL_LIBS/lib/python2.6"
mkdir -p "$TARGET_CONTENTS/Frameworks/lib"
PYTHONSYNC="rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests"
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
index 67ae61b5e4..0f3cf18913 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
@@ -38,80 +38,14 @@ extern "C" {
#include "libavformat/avformat.h"
}
+#include "DllVideoToolBox.h"
+
#if defined(__cplusplus)
extern "C"
{
#endif
#pragma pack(push, 4)
-
-//-----------------------------------------------------------------------------------
-// /System/Library/PrivateFrameworks/VideoToolbox.framework
-enum VTFormat {
- kVTFormatJPEG = 'jpeg', // kCMVideoCodecType_JPEG
- kVTFormatH264 = 'avc1', // kCMVideoCodecType_H264 (MPEG-4 Part 10))
- kVTFormatMPEG4Video = 'mp4v', // kCMVideoCodecType_MPEG4Video (MPEG-4 Part 2)
- kVTFormatMPEG2Video = 'mp2v' // kCMVideoCodecType_MPEG2Video
-};
-enum {
- kVTDecoderNoErr = 0,
- kVTDecoderHardwareNotSupportedErr = -12470,
- kVTDecoderFormatNotSupportedErr = -12471,
- kVTDecoderConfigurationError = -12472,
- kVTDecoderDecoderFailedErr = -12473,
-};
-enum {
- kVTDecodeInfo_Asynchronous = 1UL << 0,
- kVTDecodeInfo_FrameDropped = 1UL << 1
-};
-enum {
- // tells the decoder not to bother returning a CVPixelBuffer
- // in the outputCallback. The output callback will still be called.
- kVTDecoderDecodeFlags_DontEmitFrame = 1 << 1,
-};
-enum {
- // decode and return buffers for all frames currently in flight.
- kVTDecoderFlush_EmitFrames = 1 << 0
-};
-
-typedef UInt32 VTFormatId;
-typedef CFTypeRef VTDecompressionSessionRef;
-
-typedef void (*VTDecompressionOutputCallbackFunc)(
- void *refCon,
- CFDictionaryRef frameInfo,
- OSStatus status,
- UInt32 infoFlags,
- CVBufferRef imageBuffer);
-
-typedef struct _VTDecompressionOutputCallback VTDecompressionOutputCallback;
-struct _VTDecompressionOutputCallback {
- VTDecompressionOutputCallbackFunc callback;
- void *refcon;
-};
-
-extern CFStringRef kVTVideoDecoderSpecification_EnableSandboxedVideoDecoder;
-
-extern OSStatus VTDecompressionSessionCreate(
- CFAllocatorRef allocator,
- CMFormatDescriptionRef videoFormatDescription,
- CFTypeRef sessionOptions,
- CFDictionaryRef destinationPixelBufferAttributes,
- VTDecompressionOutputCallback *outputCallback,
- VTDecompressionSessionRef *session);
-
-extern OSStatus VTDecompressionSessionDecodeFrame(
- VTDecompressionSessionRef session, CMSampleBufferRef sbuf,
- uint32_t decoderFlags, CFDictionaryRef frameInfo, uint32_t unk1);
-
-extern OSStatus VTDecompressionSessionCopyProperty(VTDecompressionSessionRef session, CFTypeRef key, void* unk, CFTypeRef * value);
-extern OSStatus VTDecompressionSessionCopySupportedPropertyDictionary(VTDecompressionSessionRef session, CFDictionaryRef * dict);
-extern OSStatus VTDecompressionSessionSetProperty(VTDecompressionSessionRef session, CFStringRef propName, CFTypeRef propValue);
-extern void VTDecompressionSessionInvalidate(VTDecompressionSessionRef session);
-extern void VTDecompressionSessionRelease(VTDecompressionSessionRef session);
-extern VTDecompressionSessionRef VTDecompressionSessionRetain(VTDecompressionSessionRef session);
-extern OSStatus VTDecompressionSessionWaitForAsynchronousFrames(VTDecompressionSessionRef session);
-
//-----------------------------------------------------------------------------------
// /System/Library/Frameworks/CoreMedia.framework
union
@@ -202,7 +136,7 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V
free(attrs_str);
}
- status = VTDecompressionSessionCopyProperty(dpc->session, prop_name, NULL, &prop_value);
+ status = CDVDVideoCodecVideoToolBox::GetDllImpl()->VTDecompressionSessionCopyProperty(dpc->session, prop_name, NULL, &prop_value);
if (status == kVTDecoderNoErr)
{
char *value_str;
@@ -230,7 +164,7 @@ void vtdec_session_dump_properties(VTDecompressionSessionRef session)
CFDictionaryRef dict;
OSStatus status;
- status = VTDecompressionSessionCopySupportedPropertyDictionary(session, &dict);
+ status = CDVDVideoCodecVideoToolBox::GetDllImpl()->VTDecompressionSessionCopySupportedPropertyDictionary(session, &dict);
if (status != kVTDecoderNoErr)
goto error;
CFDictionaryApplyFunction(dict, (CFDictionaryApplierFunction)vtdec_session_dump_property, &dpc);
@@ -1037,6 +971,8 @@ bool validate_avcC_spc(uint8_t *extradata, uint32_t extrasize, int32_t *max_ref_
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
+DllVideoToolBoxInterface *CDVDVideoCodecVideoToolBox::m_pLibVTB = NULL;
+
CDVDVideoCodecVideoToolBox::CDVDVideoCodecVideoToolBox() : CDVDVideoCodec()
{
m_fmt_desc = NULL;
@@ -1053,14 +989,60 @@ CDVDVideoCodecVideoToolBox::CDVDVideoCodecVideoToolBox() : CDVDVideoCodec()
memset(&m_videobuffer, 0, sizeof(DVDVideoPicture));
m_DropPictures = false;
m_sort_time_offset = 0.0;
+
+ if (m_pLibVTB == NULL)
+ {
+ if (CDarwinUtils::GetIOSVersion() < 6.0)
+ {
+ m_pLibVTB = new DllVideoToolBoxPrivate();
+ }
+ else
+ {
+ m_pLibVTB = new DllVideoToolBoxPublic();// todo - load the public version
+ }
+ }
}
CDVDVideoCodecVideoToolBox::~CDVDVideoCodecVideoToolBox()
{
Dispose();
pthread_mutex_destroy(&m_queue_mutex);
+ if (m_pLibVTB != NULL)
+ {
+ delete m_pLibVTB;
+ m_pLibVTB = NULL; // its a static!
+ }
+}
+
+bool CDVDVideoCodecVideoToolBox::HandleDyLoad()
+{
+ bool ret = true;
+ if (CDarwinUtils::GetIOSVersion() < 6.0)
+ {
+ if(!((DllVideoToolBoxPrivate *)m_pLibVTB)->IsLoaded())
+ {
+ if(!((DllVideoToolBoxPrivate *)m_pLibVTB)->Load())
+ {
+ CLog::Log(LOGERROR,"VideoToolBox: Error loading private VideoToolBox framework (%s).",__FUNCTION__);
+ ret = false; //fatal
+ }
+ }
+ }
+ else
+ {
+ if(!((DllVideoToolBoxPublic *)m_pLibVTB)->IsLoaded())
+ {
+ if(!((DllVideoToolBoxPublic *)m_pLibVTB)->Load())
+ {
+ CLog::Log(LOGERROR,"VideoToolBox: Error loading public VideoToolBox framework (%s).",__FUNCTION__);
+ ret = false; //fatal
+ }
+ }
+ }
+ return ret;
}
+
bool CDVDVideoCodecVideoToolBox::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
{
if (CSettings::Get().GetBool("videoplayer.usevideotoolbox") && !hints.software)
@@ -1074,6 +1056,9 @@ bool CDVDVideoCodecVideoToolBox::Open(CDVDStreamInfo &hints, CDVDCodecOptions &o
unsigned int extrasize = hints.extrasize; // extra data for codec to use
uint8_t *extradata = (uint8_t*)hints.extradata; // size of extra data
+ if (!HandleDyLoad())
+ return false;
+
switch(profile)
{
case FF_PROFILE_H264_HIGH_10:
@@ -1387,7 +1372,7 @@ int CDVDVideoCodecVideoToolBox::Decode(uint8_t* pData, int iSize, double dts, do
}
// submit for decoding
- status = VTDecompressionSessionDecodeFrame(m_vt_session, sampleBuff, decoderFlags, frameInfo, 0);
+ status = GetDllImpl()->VTDecompressionSessionDecodeFrame(m_vt_session, sampleBuff, decoderFlags, frameInfo, 0);
if (status != kVTDecoderNoErr)
{
CLog::Log(LOGNOTICE, "%s - VTDecompressionSessionDecodeFrame returned(%d)",
@@ -1404,7 +1389,7 @@ int CDVDVideoCodecVideoToolBox::Decode(uint8_t* pData, int iSize, double dts, do
}
// wait for decoding to finish
- status = VTDecompressionSessionWaitForAsynchronousFrames(m_vt_session);
+ status = GetDllImpl()->VTDecompressionSessionWaitForAsynchronousFrames(m_vt_session);
if (status != kVTDecoderNoErr)
{
CLog::Log(LOGNOTICE, "%s - VTDecompressionSessionWaitForAsynchronousFrames returned(%d)",
@@ -1433,7 +1418,7 @@ int CDVDVideoCodecVideoToolBox::Decode(uint8_t* pData, int iSize, double dts, do
void CDVDVideoCodecVideoToolBox::Reset(void)
{
// flush decoder
- VTDecompressionSessionWaitForAsynchronousFrames(m_vt_session);
+ GetDllImpl()->VTDecompressionSessionWaitForAsynchronousFrames(m_vt_session);
while (m_queue_depth)
DisplayQueuePop();
@@ -1569,7 +1554,7 @@ CDVDVideoCodecVideoToolBox::CreateVTSession(int width, int height, CMFormatDescr
outputCallback.callback = VTDecoderCallback;
outputCallback.refcon = this;
- status = VTDecompressionSessionCreate(
+ status = GetDllImpl()->VTDecompressionSessionCreate(
NULL, // CFAllocatorRef allocator
fmt_desc,
NULL, // CFTypeRef sessionOptions
@@ -1595,7 +1580,7 @@ CDVDVideoCodecVideoToolBox::DestroyVTSession(void)
{
if (m_vt_session)
{
- VTDecompressionSessionInvalidate((VTDecompressionSessionRef)m_vt_session);
+ GetDllImpl()->VTDecompressionSessionInvalidate((VTDecompressionSessionRef)m_vt_session);
CFRelease((VTDecompressionSessionRef)m_vt_session);
m_vt_session = NULL;
}
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.h
index d320886ae1..5e9a9465ad 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.h
@@ -27,6 +27,8 @@
#include <CoreVideo/CoreVideo.h>
#include <CoreMedia/CoreMedia.h>
+class DllVideoToolBoxInterface;
+
// tracks a frame in and output queue in display order
typedef struct frame_queue {
double dts;
@@ -45,6 +47,8 @@ public:
CDVDVideoCodecVideoToolBox();
virtual ~CDVDVideoCodecVideoToolBox();
+ static DllVideoToolBoxInterface *GetDllImpl() { return m_pLibVTB; }
+
// Required overrides
virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options);
virtual void Dispose(void);
@@ -56,6 +60,7 @@ public:
virtual const char* GetName(void) { return (const char*)m_pFormatName; }
protected:
+ bool HandleDyLoad();
void DisplayQueuePop(void);
void CreateVTSession(int width, int height, CMFormatDescriptionRef fmt_desc);
void DestroyVTSession(void);
@@ -78,6 +83,7 @@ protected:
bool m_convert_bytestream;
bool m_convert_3byteTo4byteNALSize;
+ static DllVideoToolBoxInterface *m_pLibVTB;//the framework
};
#endif
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DllVideoToolBox.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DllVideoToolBox.h
new file mode 100644
index 0000000000..6a9bb6b06c
--- /dev/null
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DllVideoToolBox.h
@@ -0,0 +1,161 @@
+#pragma once
+
+/*
+ * Copyright (C) 2015 Team Kodi
+ * http://kodi.tv
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Kodi; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "DynamicDll.h"
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+#pragma pack(push, 4)
+
+//-----------------------------------------------------------------------------------
+// /System/Library/PrivateFrameworks/VideoToolbox.framework
+enum VTFormat {
+ kVTFormatJPEG = 'jpeg', // kCMVideoCodecType_JPEG
+ kVTFormatH264 = 'avc1', // kCMVideoCodecType_H264 (MPEG-4 Part 10))
+ kVTFormatMPEG4Video = 'mp4v', // kCMVideoCodecType_MPEG4Video (MPEG-4 Part 2)
+ kVTFormatMPEG2Video = 'mp2v' // kCMVideoCodecType_MPEG2Video
+};
+enum {
+ kVTDecoderNoErr = 0,
+ kVTDecoderHardwareNotSupportedErr = -12470,
+ kVTDecoderFormatNotSupportedErr = -12471,
+ kVTDecoderConfigurationError = -12472,
+ kVTDecoderDecoderFailedErr = -12473,
+};
+enum {
+ kVTDecodeInfo_Asynchronous = 1UL << 0,
+ kVTDecodeInfo_FrameDropped = 1UL << 1
+};
+enum {
+ // tells the decoder not to bother returning a CVPixelBuffer
+ // in the outputCallback. The output callback will still be called.
+ kVTDecoderDecodeFlags_DontEmitFrame = 1 << 1,
+};
+enum {
+ // decode and return buffers for all frames currently in flight.
+ kVTDecoderFlush_EmitFrames = 1 << 0
+};
+
+typedef UInt32 VTFormatId;
+typedef CFTypeRef VTDecompressionSessionRef;
+
+typedef void (*VTDecompressionOutputCallbackFunc)(
+ void *refCon,
+ CFDictionaryRef frameInfo,
+ OSStatus status,
+ UInt32 infoFlags,
+ CVBufferRef imageBuffer);
+
+typedef struct _VTDecompressionOutputCallback VTDecompressionOutputCallback;
+struct _VTDecompressionOutputCallback {
+ VTDecompressionOutputCallbackFunc callback;
+ void *refcon;
+};
+
+extern CFStringRef kVTVideoDecoderSpecification_EnableSandboxedVideoDecoder;
+
+OSStatus VTDecompressionSessionCreate(
+ CFAllocatorRef allocator,
+ CMFormatDescriptionRef videoFormatDescription,
+ CFTypeRef sessionOptions,
+ CFDictionaryRef destinationPixelBufferAttributes,
+ VTDecompressionOutputCallback *outputCallback,
+ VTDecompressionSessionRef *session);
+
+OSStatus VTDecompressionSessionDecodeFrame(
+ VTDecompressionSessionRef session, CMSampleBufferRef sbuf,
+ uint32_t decoderFlags, CFDictionaryRef frameInfo, uint32_t unk1);
+
+OSStatus VTDecompressionSessionCopyProperty(VTDecompressionSessionRef session, CFTypeRef key, void* unk, CFTypeRef * value);
+OSStatus VTDecompressionSessionCopySupportedPropertyDictionary(VTDecompressionSessionRef session, CFDictionaryRef * dict);
+OSStatus VTDecompressionSessionSetProperty(VTDecompressionSessionRef session, CFStringRef propName, CFTypeRef propValue);
+void VTDecompressionSessionInvalidate(VTDecompressionSessionRef session);
+OSStatus VTDecompressionSessionWaitForAsynchronousFrames(VTDecompressionSessionRef session);
+#pragma pack(pop)
+
+#if defined(__cplusplus)
+}
+#endif
+
+class DllVideoToolBoxInterface
+{
+public:
+ virtual ~DllVideoToolBoxInterface() {}
+
+ virtual OSStatus VTDecompressionSessionCreate(CFAllocatorRef allocator, CMFormatDescriptionRef videoFormatDescription, CFTypeRef sessionOptions, CFDictionaryRef destinationPixelBufferAttributes, VTDecompressionOutputCallback *outputCallback, VTDecompressionSessionRef *session) = 0;
+ virtual OSStatus VTDecompressionSessionDecodeFrame(VTDecompressionSessionRef session, CMSampleBufferRef sbuf, uint32_t decoderFlags, CFDictionaryRef frameInfo, uint32_t unk1) = 0;
+ virtual OSStatus VTDecompressionSessionCopyProperty(VTDecompressionSessionRef session, CFTypeRef key, void* unk, CFTypeRef * value) = 0;
+ virtual OSStatus VTDecompressionSessionCopySupportedPropertyDictionary(VTDecompressionSessionRef session, CFDictionaryRef * dict) = 0;
+ virtual OSStatus VTDecompressionSessionSetProperty(VTDecompressionSessionRef session, CFStringRef propName, CFTypeRef propValue) = 0;
+ virtual void VTDecompressionSessionInvalidate(VTDecompressionSessionRef session) = 0;
+ virtual OSStatus VTDecompressionSessionWaitForAsynchronousFrames(VTDecompressionSessionRef session) = 0;
+};
+
+// load from private framework path - needed for ios 5.x
+class DllVideoToolBoxPrivate : public DllDynamic, public DllVideoToolBoxInterface
+{
+ DECLARE_DLL_WRAPPER(DllVideoToolBoxPrivate, "/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox")
+ DEFINE_METHOD6(OSStatus, VTDecompressionSessionCreate, (CFAllocatorRef p1, CMFormatDescriptionRef p2, CFTypeRef p3, CFDictionaryRef p4, VTDecompressionOutputCallback *p5, VTDecompressionSessionRef *p6))
+ DEFINE_METHOD5(OSStatus, VTDecompressionSessionDecodeFrame, (VTDecompressionSessionRef p1, CMSampleBufferRef p2, uint32_t p3, CFDictionaryRef p4, uint32_t p5))
+ DEFINE_METHOD4(OSStatus, VTDecompressionSessionCopyProperty, (VTDecompressionSessionRef p1, CFTypeRef p2, void* p3, CFTypeRef * p4))
+ DEFINE_METHOD2(OSStatus, VTDecompressionSessionCopySupportedPropertyDictionary, (VTDecompressionSessionRef p1, CFDictionaryRef * p2))
+ DEFINE_METHOD3(OSStatus, VTDecompressionSessionSetProperty, (VTDecompressionSessionRef p1, CFStringRef p2, CFTypeRef p3))
+ DEFINE_METHOD1(void, VTDecompressionSessionInvalidate, (VTDecompressionSessionRef p1))
+ DEFINE_METHOD1(OSStatus, VTDecompressionSessionWaitForAsynchronousFrames, (VTDecompressionSessionRef p1))
+
+ BEGIN_METHOD_RESOLVE()
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionCreate, VTDecompressionSessionCreate)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionDecodeFrame, VTDecompressionSessionDecodeFrame)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionCopyProperty, VTDecompressionSessionCopyProperty)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionCopySupportedPropertyDictionary, VTDecompressionSessionCopySupportedPropertyDictionary)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionSetProperty, VTDecompressionSessionSetProperty)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionInvalidate, VTDecompressionSessionInvalidate)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionWaitForAsynchronousFrames, VTDecompressionSessionWaitForAsynchronousFrames)
+ END_METHOD_RESOLVE()
+};
+
+// load from public framework path -> available for >= ios 6.0
+class DllVideoToolBoxPublic : public DllDynamic, public DllVideoToolBoxInterface
+{
+ DECLARE_DLL_WRAPPER(DllVideoToolBoxPublic, "/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox")
+ DEFINE_METHOD6(OSStatus, VTDecompressionSessionCreate, (CFAllocatorRef p1, CMFormatDescriptionRef p2, CFTypeRef p3, CFDictionaryRef p4, VTDecompressionOutputCallback *p5, VTDecompressionSessionRef *p6))
+ DEFINE_METHOD5(OSStatus, VTDecompressionSessionDecodeFrame, (VTDecompressionSessionRef p1, CMSampleBufferRef p2, uint32_t p3, CFDictionaryRef p4, uint32_t p5))
+ DEFINE_METHOD4(OSStatus, VTDecompressionSessionCopyProperty, (VTDecompressionSessionRef p1, CFTypeRef p2, void* p3, CFTypeRef * p4))
+ DEFINE_METHOD2(OSStatus, VTDecompressionSessionCopySupportedPropertyDictionary, (VTDecompressionSessionRef p1, CFDictionaryRef * p2))
+ DEFINE_METHOD3(OSStatus, VTDecompressionSessionSetProperty, (VTDecompressionSessionRef p1, CFStringRef p2, CFTypeRef p3))
+ DEFINE_METHOD1(void, VTDecompressionSessionInvalidate, (VTDecompressionSessionRef p1))
+ DEFINE_METHOD1(OSStatus, VTDecompressionSessionWaitForAsynchronousFrames, (VTDecompressionSessionRef p1))
+
+ BEGIN_METHOD_RESOLVE()
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionCreate, VTDecompressionSessionCreate)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionDecodeFrame, VTDecompressionSessionDecodeFrame)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionCopyProperty, VTDecompressionSessionCopyProperty)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionCopySupportedPropertyDictionary, VTDecompressionSessionCopySupportedPropertyDictionary)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionSetProperty, VTDecompressionSessionSetProperty)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionInvalidate, VTDecompressionSessionInvalidate)
+ RESOLVE_METHOD_RENAME(VTDecompressionSessionWaitForAsynchronousFrames, VTDecompressionSessionWaitForAsynchronousFrames)
+ END_METHOD_RESOLVE()
+};
+