Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1175)

Unified Diff: content/common/gpu/media/vt_stubs_header.fragment

Issue 340933002: Add VTSupport for dynamically linking VideoToolbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/vt.sig ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vt_stubs_header.fragment
diff --git a/content/common/gpu/media/vt_stubs_header.fragment b/content/common/gpu/media/vt_stubs_header.fragment
new file mode 100644
index 0000000000000000000000000000000000000000..42a4cf9b0011480baca5f83de7ae992cbdae157d
--- /dev/null
+++ b/content/common/gpu/media/vt_stubs_header.fragment
@@ -0,0 +1,90 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Declare CoreMedia types. For SDKs >= 10.7, use CoreMedia headers.
+#if !defined(MAC_OS_X_VERSION_10_7) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+
+#include <CoreFoundation/CoreFoundation.h>
+
+extern "C" {
+
+typedef signed long CMItemCount;
+typedef uint32_t CMBlockBufferFlags;
+typedef struct OpaqueCMBlockBuffer *CMBlockBufferRef;
+typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef;
+typedef CMFormatDescriptionRef CMVideoFormatDescriptionRef;
+typedef struct opaqueCMSampleBuffer *CMSampleBufferRef;
+
+typedef int64_t CMTimeValue;
+typedef int32_t CMTimeScale;
+typedef int64_t CMTimeEpoch;
+typedef uint32_t CMTimeFlags;
+
+typedef struct {
+ CMTimeValue value;
+ CMTimeScale timescale;
+ CMTimeFlags flags;
+ CMTimeEpoch epoch;
+} CMTime;
+
+typedef struct {
+ CMTime duration;
+ CMTime presentationTimeStamp;
+ CMTime decodeTimeStamp;
+} CMSampleTimingInfo;
+
+typedef struct {
+ int32_t width;
+ int32_t height;
+} CMVideoDimensions;
+
+typedef struct {
+ uint32_t version;
+ void *(*AllocateBlock)(void *refCon, size_t sizeInBytes);
+ void (*FreeBlock)(void *refCon, void *doomedMemoryBlock, size_t sizeInBytes);
+ void *refCon;
+} CMBlockBufferCustomBlockSource;
+
+typedef OSStatus (*CMSampleBufferMakeDataReadyCallback)(
+ CMSampleBufferRef sbuf,
+ void *makeDataReadyRefcon);
+
+} // extern "C"
+
+#else
+#include <CoreMedia/CoreMedia.h>
+#endif
+
+// Declare VideoToolbox types. For SDKs >= 10.8, use VideoToolbox headers.
+#if !defined(MAC_OS_X_VERSION_10_8) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
+
+extern "C" {
+
+typedef struct __CVBuffer *CVBufferRef;
+typedef CVBufferRef CVImageBufferRef;
+typedef uint32_t VTDecodeFrameFlags;
+typedef UInt32 VTDecodeInfoFlags;
+typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef;
+
+typedef void (*VTDecompressionOutputCallback)(
+ void *decompressionOutputRefCon,
+ void *sourceFrameRefCon,
+ OSStatus status,
+ VTDecodeInfoFlags infoFlags,
+ CVImageBufferRef imageBuffer,
+ CMTime presentationTimeStamp,
+ CMTime presentationDuration);
+
+typedef struct {
+ VTDecompressionOutputCallback decompressionOutputCallback;
+ void *decompressionOutputRefCon;
+} VTDecompressionOutputCallbackRecord;
+
+} // extern "C"
+
+#else
+#include <VideoToolbox/VideoToolbox.h>
+#endif
« no previous file with comments | « content/common/gpu/media/vt.sig ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698