OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #ifndef MEDIA_BASE_MAC_VIDEOTOOLBOX_HELPERS_H_ |
| 6 #define MEDIA_BASE_MAC_VIDEOTOOLBOX_HELPERS_H_ |
| 7 |
| 8 #include "base/mac/scoped_cftyperef.h" |
| 9 #include "media/base/mac/videotoolbox_glue.h" |
| 10 #include "media/base/media_export.h" |
| 11 |
| 12 namespace media { |
| 13 |
| 14 MEDIA_EXPORT void CopySampleBufferToAnnexBBuffer( |
| 15 CoreMediaGlue::CMSampleBufferRef sbuf, |
| 16 std::string* annexb_buffer, |
| 17 bool keyframe); |
| 18 |
| 19 template <typename NalSizeType> |
| 20 MEDIA_EXPORT void CopyNalsToAnnexB(char* avcc_buffer, |
| 21 const size_t avcc_size, |
| 22 std::string* annexb_buffer); |
| 23 |
| 24 MEDIA_EXPORT base::ScopedCFTypeRef<CFDictionaryRef> |
| 25 DictionaryWithKeysAndValues(CFTypeRef* keys, CFTypeRef* values, size_t size); |
| 26 |
| 27 MEDIA_EXPORT base::ScopedCFTypeRef<CFDictionaryRef> DictionaryWithKeyValue( |
| 28 CFTypeRef key, |
| 29 CFTypeRef value); |
| 30 |
| 31 MEDIA_EXPORT base::ScopedCFTypeRef<CFArrayRef> ArrayWithIntegers(const int* v, |
| 32 size_t size); |
| 33 |
| 34 typedef VideoToolboxGlue::VTCompressionSessionRef VTCompressionSessionRef; |
| 35 |
| 36 MEDIA_EXPORT bool SetSessionProperty( |
| 37 base::ScopedCFTypeRef<VTCompressionSessionRef> session, |
| 38 const VideoToolboxGlue* const glue, |
| 39 CFStringRef key, |
| 40 int32_t value); |
| 41 |
| 42 MEDIA_EXPORT bool SetSessionProperty( |
| 43 base::ScopedCFTypeRef<VTCompressionSessionRef> session, |
| 44 const VideoToolboxGlue* const glue, |
| 45 CFStringRef key, |
| 46 bool value); |
| 47 |
| 48 MEDIA_EXPORT bool SetSessionProperty( |
| 49 base::ScopedCFTypeRef<VTCompressionSessionRef> session, |
| 50 const VideoToolboxGlue* const glue, |
| 51 CFStringRef key, |
| 52 CFStringRef value); |
| 53 |
| 54 } // namespace media |
| 55 |
| 56 #endif // MEDIA_BASE_MAC_VIDEOTOOLBOX_HELPERS_H_ |
OLD | NEW |