| Index: media/base/mac/videotoolbox_helpers.h
|
| diff --git a/media/base/mac/videotoolbox_helpers.h b/media/base/mac/videotoolbox_helpers.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..08165e3cf70d366b055e33ae141f1611fa3411d5
|
| --- /dev/null
|
| +++ b/media/base/mac/videotoolbox_helpers.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#ifndef MEDIA_BASE_MAC_VIDEOTOOLBOX_HELPERS_H_
|
| +#define MEDIA_BASE_MAC_VIDEOTOOLBOX_HELPERS_H_
|
| +
|
| +#include "base/mac/scoped_cftyperef.h"
|
| +#include "media/base/mac/videotoolbox_glue.h"
|
| +#include "media/base/media_export.h"
|
| +
|
| +namespace media {
|
| +
|
| +MEDIA_EXPORT void CopySampleBufferToAnnexBBuffer(
|
| + CoreMediaGlue::CMSampleBufferRef sbuf,
|
| + std::string* annexb_buffer,
|
| + bool keyframe);
|
| +
|
| +template <typename NalSizeType>
|
| +MEDIA_EXPORT void CopyNalsToAnnexB(char* avcc_buffer,
|
| + const size_t avcc_size,
|
| + std::string* annexb_buffer);
|
| +
|
| +MEDIA_EXPORT base::ScopedCFTypeRef<CFDictionaryRef>
|
| +DictionaryWithKeysAndValues(CFTypeRef* keys, CFTypeRef* values, size_t size);
|
| +
|
| +MEDIA_EXPORT base::ScopedCFTypeRef<CFDictionaryRef> DictionaryWithKeyValue(
|
| + CFTypeRef key,
|
| + CFTypeRef value);
|
| +
|
| +MEDIA_EXPORT base::ScopedCFTypeRef<CFArrayRef> ArrayWithIntegers(const int* v,
|
| + size_t size);
|
| +
|
| +typedef VideoToolboxGlue::VTCompressionSessionRef VTCompressionSessionRef;
|
| +
|
| +MEDIA_EXPORT bool SetSessionProperty(
|
| + base::ScopedCFTypeRef<VTCompressionSessionRef> session,
|
| + const VideoToolboxGlue* const glue,
|
| + CFStringRef key,
|
| + int32_t value);
|
| +
|
| +MEDIA_EXPORT bool SetSessionProperty(
|
| + base::ScopedCFTypeRef<VTCompressionSessionRef> session,
|
| + const VideoToolboxGlue* const glue,
|
| + CFStringRef key,
|
| + bool value);
|
| +
|
| +MEDIA_EXPORT bool SetSessionProperty(
|
| + base::ScopedCFTypeRef<VTCompressionSessionRef> session,
|
| + const VideoToolboxGlue* const glue,
|
| + CFStringRef key,
|
| + CFStringRef value);
|
| +
|
| +} // namespace media
|
| +
|
| +#endif // MEDIA_BASE_MAC_VIDEOTOOLBOX_HELPERS_H_
|
|
|