| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Declare CoreMedia types. For SDKs >= 10.7, use CoreMedia headers. | |
| 6 #if !defined(MAC_OS_X_VERSION_10_7) || \ | |
| 7 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | |
| 8 | |
| 9 #include <CoreFoundation/CoreFoundation.h> | 5 #include <CoreFoundation/CoreFoundation.h> |
| 10 | 6 |
| 11 extern "C" { | 7 extern "C" { |
| 12 | 8 |
| 9 // |
| 10 // Declare CoreMedia types. |
| 11 // |
| 12 |
| 13 typedef signed long CMItemCount; | 13 typedef signed long CMItemCount; |
| 14 typedef uint32_t CMBlockBufferFlags; | 14 typedef uint32_t CMBlockBufferFlags; |
| 15 typedef struct OpaqueCMBlockBuffer *CMBlockBufferRef; | 15 typedef struct OpaqueCMBlockBuffer *CMBlockBufferRef; |
| 16 typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef; | 16 typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef; |
| 17 typedef CMFormatDescriptionRef CMVideoFormatDescriptionRef; | 17 typedef CMFormatDescriptionRef CMVideoFormatDescriptionRef; |
| 18 typedef struct opaqueCMSampleBuffer *CMSampleBufferRef; | 18 typedef struct opaqueCMSampleBuffer *CMSampleBufferRef; |
| 19 | 19 |
| 20 typedef int64_t CMTimeValue; | 20 typedef int64_t CMTimeValue; |
| 21 typedef int32_t CMTimeScale; | 21 typedef int32_t CMTimeScale; |
| 22 typedef int64_t CMTimeEpoch; | 22 typedef int64_t CMTimeEpoch; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 44 uint32_t version; | 44 uint32_t version; |
| 45 void *(*AllocateBlock)(void *refCon, size_t sizeInBytes); | 45 void *(*AllocateBlock)(void *refCon, size_t sizeInBytes); |
| 46 void (*FreeBlock)(void *refCon, void *doomedMemoryBlock, size_t sizeInBytes); | 46 void (*FreeBlock)(void *refCon, void *doomedMemoryBlock, size_t sizeInBytes); |
| 47 void *refCon; | 47 void *refCon; |
| 48 } CMBlockBufferCustomBlockSource; | 48 } CMBlockBufferCustomBlockSource; |
| 49 | 49 |
| 50 typedef OSStatus (*CMSampleBufferMakeDataReadyCallback)( | 50 typedef OSStatus (*CMSampleBufferMakeDataReadyCallback)( |
| 51 CMSampleBufferRef sbuf, | 51 CMSampleBufferRef sbuf, |
| 52 void *makeDataReadyRefcon); | 52 void *makeDataReadyRefcon); |
| 53 | 53 |
| 54 } // extern "C" | 54 // |
| 55 | 55 // Declare VideoToolbox types. |
| 56 #else | 56 // |
| 57 #include <CoreMedia/CoreMedia.h> | |
| 58 #endif | |
| 59 | |
| 60 // Declare VideoToolbox types. For SDKs >= 10.8, use VideoToolbox headers. | |
| 61 #if !defined(MAC_OS_X_VERSION_10_8) || \ | |
| 62 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 | |
| 63 | |
| 64 extern "C" { | |
| 65 | 57 |
| 66 typedef struct __CVBuffer *CVBufferRef; | 58 typedef struct __CVBuffer *CVBufferRef; |
| 67 typedef CVBufferRef CVImageBufferRef; | 59 typedef CVBufferRef CVImageBufferRef; |
| 68 typedef uint32_t VTDecodeFrameFlags; | 60 typedef uint32_t VTDecodeFrameFlags; |
| 69 typedef UInt32 VTDecodeInfoFlags; | 61 typedef UInt32 VTDecodeInfoFlags; |
| 70 typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef; | 62 typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef; |
| 71 | 63 |
| 72 typedef void (*VTDecompressionOutputCallback)( | 64 typedef void (*VTDecompressionOutputCallback)( |
| 73 void *decompressionOutputRefCon, | 65 void *decompressionOutputRefCon, |
| 74 void *sourceFrameRefCon, | 66 void *sourceFrameRefCon, |
| 75 OSStatus status, | 67 OSStatus status, |
| 76 VTDecodeInfoFlags infoFlags, | 68 VTDecodeInfoFlags infoFlags, |
| 77 CVImageBufferRef imageBuffer, | 69 CVImageBufferRef imageBuffer, |
| 78 CMTime presentationTimeStamp, | 70 CMTime presentationTimeStamp, |
| 79 CMTime presentationDuration); | 71 CMTime presentationDuration); |
| 80 | 72 |
| 81 typedef struct { | 73 typedef struct { |
| 82 VTDecompressionOutputCallback decompressionOutputCallback; | 74 VTDecompressionOutputCallback decompressionOutputCallback; |
| 83 void *decompressionOutputRefCon; | 75 void *decompressionOutputRefCon; |
| 84 } VTDecompressionOutputCallbackRecord; | 76 } VTDecompressionOutputCallbackRecord; |
| 85 | 77 |
| 86 } // extern "C" | 78 } // extern "C" |
| 87 | |
| 88 #else | |
| 89 #include <VideoToolbox/VideoToolbox.h> | |
| 90 #endif | |
| OLD | NEW |