diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/media/platforms/apple/VideoToolbox | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/media/platforms/apple/VideoToolbox')
-rw-r--r-- | dom/media/platforms/apple/VideoToolbox/VideoToolbox.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/dom/media/platforms/apple/VideoToolbox/VideoToolbox.h b/dom/media/platforms/apple/VideoToolbox/VideoToolbox.h new file mode 100644 index 000000000..edd3f9c1b --- /dev/null +++ b/dom/media/platforms/apple/VideoToolbox/VideoToolbox.h @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// Stub header for VideoToolbox framework API. +// We include our own copy so we can build on MacOS versions +// where it's not available. + +#ifndef mozilla_VideoToolbox_VideoToolbox_h +#define mozilla_VideoToolbox_VideoToolbox_h + +// CoreMedia is available starting in OS X 10.7, +// so we need to dlopen it as well to run on 10.6, +// but we can depend on the real framework headers at build time. + +#include <CoreFoundation/CoreFoundation.h> +#include <CoreMedia/CoreMedia.h> +#include <CoreVideo/CVPixelBuffer.h> + +typedef uint32_t VTDecodeFrameFlags; +typedef uint32_t VTDecodeInfoFlags; +enum { + kVTDecodeInfo_Asynchronous = 1UL << 0, + kVTDecodeInfo_FrameDropped = 1UL << 1, +}; +enum { + kVTDecodeFrame_EnableAsynchronousDecompression = 1<<0, + kVTDecodeFrame_DoNotOutputFrame = 1<<1, + kVTDecodeFrame_1xRealTimePlayback = 1<<2, + kVTDecodeFrame_EnableTemporalProcessing = 1<<3, +}; + +typedef CFTypeRef VTSessionRef; +typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef; +typedef void (*VTDecompressionOutputCallback)( + void*, + void*, + OSStatus, + VTDecodeInfoFlags, + CVImageBufferRef, + CMTime, + CMTime +); +typedef struct VTDecompressionOutputCallbackRecord { + VTDecompressionOutputCallback decompressionOutputCallback; + void* decompressionOutputRefCon; +} VTDecompressionOutputCallbackRecord; + +OSStatus +VTDecompressionSessionCreate( + CFAllocatorRef, + CMVideoFormatDescriptionRef, + CFDictionaryRef, + CFDictionaryRef, + const VTDecompressionOutputCallbackRecord*, + VTDecompressionSessionRef* +); + +OSStatus +VTDecompressionSessionDecodeFrame( + VTDecompressionSessionRef, + CMSampleBufferRef, + VTDecodeFrameFlags, + void*, + VTDecodeInfoFlags* +); + +OSStatus +VTDecompressionSessionWaitForAsynchronousFrames( + VTDecompressionSessionRef +); + +void +VTDecompressionSessionInvalidate( + VTDecompressionSessionRef +); + +OSStatus +VTSessionCopyProperty( + VTSessionRef, + CFStringRef, + CFAllocatorRef, + void* +); + +OSStatus +VTSessionCopySupportedPropertyDictionary( + VTSessionRef, + CFDictionaryRef* +); + +#endif // mozilla_VideoToolbox_VideoToolbox_h |