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 #include <CoreFoundation/CoreFoundation.h> | |
6 #include <stddef.h> | |
7 #include <stdint.h> | |
8 | |
9 extern "C" { | |
10 | |
11 // | |
12 // Declare CoreMedia types. | |
13 // | |
14 | |
15 typedef signed long CMItemCount; | |
16 typedef uint32_t CMBlockBufferFlags; | |
17 typedef struct OpaqueCMBlockBuffer *CMBlockBufferRef; | |
18 typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef; | |
19 typedef CMFormatDescriptionRef CMVideoFormatDescriptionRef; | |
20 typedef struct opaqueCMSampleBuffer *CMSampleBufferRef; | |
21 | |
22 typedef int64_t CMTimeValue; | |
23 typedef int32_t CMTimeScale; | |
24 typedef int64_t CMTimeEpoch; | |
25 typedef uint32_t CMTimeFlags; | |
26 | |
27 typedef struct { | |
28 CMTimeValue value; | |
29 CMTimeScale timescale; | |
30 CMTimeFlags flags; | |
31 CMTimeEpoch epoch; | |
32 } CMTime; | |
33 | |
34 typedef struct { | |
35 CMTime duration; | |
36 CMTime presentationTimeStamp; | |
37 CMTime decodeTimeStamp; | |
38 } CMSampleTimingInfo; | |
39 | |
40 typedef struct { | |
41 int32_t width; | |
42 int32_t height; | |
43 } CMVideoDimensions; | |
44 | |
45 typedef struct { | |
46 uint32_t version; | |
47 void *(*AllocateBlock)(void *refCon, size_t sizeInBytes); | |
48 void (*FreeBlock)(void *refCon, void *doomedMemoryBlock, size_t sizeInBytes); | |
49 void *refCon; | |
50 } CMBlockBufferCustomBlockSource; | |
51 | |
52 typedef OSStatus (*CMSampleBufferMakeDataReadyCallback)( | |
53 CMSampleBufferRef sbuf, | |
54 void *makeDataReadyRefcon); | |
55 | |
56 // | |
57 // Declare VideoToolbox types. | |
58 // | |
59 | |
60 typedef struct __CVBuffer *CVBufferRef; | |
61 typedef CVBufferRef CVImageBufferRef; | |
62 typedef uint32_t VTDecodeFrameFlags; | |
63 enum { | |
64 kVTDecodeFrame_EnableAsynchronousDecompression = 1 << 0, | |
65 kVTDecodeFrame_DoNotOutputFrame = 1 << 1, | |
66 kVTDecodeFrame_1xRealTimePlayback = 1 << 2, | |
67 kVTDecodeFrame_EnableTemporalProcessing = 1 << 3, | |
68 }; | |
69 typedef UInt32 VTDecodeInfoFlags; | |
70 typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef; | |
71 typedef CFTypeRef VTSessionRef; | |
72 | |
73 typedef void (*VTDecompressionOutputCallback)( | |
74 void *decompressionOutputRefCon, | |
75 void *sourceFrameRefCon, | |
76 OSStatus status, | |
77 VTDecodeInfoFlags infoFlags, | |
78 CVImageBufferRef imageBuffer, | |
79 CMTime presentationTimeStamp, | |
80 CMTime presentationDuration); | |
81 | |
82 typedef struct { | |
83 VTDecompressionOutputCallback decompressionOutputCallback; | |
84 void *decompressionOutputRefCon; | |
85 } VTDecompressionOutputCallbackRecord; | |
86 | |
87 } // extern "C" | |
OLD | NEW |