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

Side by Side Diff: media/base/mac/videotoolbox_helpers.h

Issue 1636083003: H264 HW encode using VideoToolbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698