OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 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> |
| 10 |
| 11 extern "C" { |
| 12 |
| 13 typedef signed long CMItemCount; |
| 14 typedef uint32_t CMBlockBufferFlags; |
| 15 typedef struct OpaqueCMBlockBuffer *CMBlockBufferRef; |
| 16 typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef; |
| 17 typedef CMFormatDescriptionRef CMVideoFormatDescriptionRef; |
| 18 typedef struct opaqueCMSampleBuffer *CMSampleBufferRef; |
| 19 |
| 20 typedef int64_t CMTimeValue; |
| 21 typedef int32_t CMTimeScale; |
| 22 typedef int64_t CMTimeEpoch; |
| 23 typedef uint32_t CMTimeFlags; |
| 24 |
| 25 typedef struct { |
| 26 CMTimeValue value; |
| 27 CMTimeScale timescale; |
| 28 CMTimeFlags flags; |
| 29 CMTimeEpoch epoch; |
| 30 } CMTime; |
| 31 |
| 32 typedef struct { |
| 33 CMTime duration; |
| 34 CMTime presentationTimeStamp; |
| 35 CMTime decodeTimeStamp; |
| 36 } CMSampleTimingInfo; |
| 37 |
| 38 typedef struct { |
| 39 int32_t width; |
| 40 int32_t height; |
| 41 } CMVideoDimensions; |
| 42 |
| 43 typedef struct { |
| 44 uint32_t version; |
| 45 void *(*AllocateBlock)(void *refCon, size_t sizeInBytes); |
| 46 void (*FreeBlock)(void *refCon, void *doomedMemoryBlock, size_t sizeInBytes); |
| 47 void *refCon; |
| 48 } CMBlockBufferCustomBlockSource; |
| 49 |
| 50 typedef OSStatus (*CMSampleBufferMakeDataReadyCallback)( |
| 51 CMSampleBufferRef sbuf, |
| 52 void *makeDataReadyRefcon); |
| 53 |
| 54 } // extern "C" |
| 55 |
| 56 #else |
| 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 |
| 66 typedef struct __CVBuffer *CVBufferRef; |
| 67 typedef CVBufferRef CVImageBufferRef; |
| 68 typedef uint32_t VTDecodeFrameFlags; |
| 69 typedef UInt32 VTDecodeInfoFlags; |
| 70 typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef; |
| 71 |
| 72 typedef void (*VTDecompressionOutputCallback)( |
| 73 void *decompressionOutputRefCon, |
| 74 void *sourceFrameRefCon, |
| 75 OSStatus status, |
| 76 VTDecodeInfoFlags infoFlags, |
| 77 CVImageBufferRef imageBuffer, |
| 78 CMTime presentationTimeStamp, |
| 79 CMTime presentationDuration); |
| 80 |
| 81 typedef struct { |
| 82 VTDecompressionOutputCallback decompressionOutputCallback; |
| 83 void *decompressionOutputRefCon; |
| 84 } VTDecompressionOutputCallbackRecord; |
| 85 |
| 86 } // extern "C" |
| 87 |
| 88 #else |
| 89 #include <VideoToolbox/VideoToolbox.h> |
| 90 #endif |
OLD | NEW |