Debian Codegraph @

src/videofilters/h26x/videotoolbox-h265-utilities.h

raw symbols SCIP
1 /*
2 * Copyright (c) 2010-2022 Belledonne Communications SARL.
3 *
4 * This file is part of mediastreamer2
5 * (see https://gitlab.linphone.org/BC/public/mediastreamer2).
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #pragma once
22
23 #include "videotoolbox-utils.h"
24
25 namespace mediastreamer {
26
27 class VideoToolboxH265Utilities : public VideoToolboxUtilities {
28 public:
29 VideoToolboxH265Utilities();
30
31 CMVideoCodecType getCodecType() const override;
32 CFStringRef getDefaultProfileLevel() const override;
33
34 private:
35 typedef OSStatus (*GetParameterSetNativeFunc)(CMFormatDescriptionRef videoDesc,
36 size_t parameterSetIndex,
37 const uint8_t **parameterSetPointerOut,
38 size_t *parameterSetSizeOut,
39 size_t *parameterSetCountOut,
40 int *NALUnitHeaderLengthOut);
41 typedef OSStatus (*CreateFormatDescriptionNativeFunc)(CFAllocatorRef allocator,
42 size_t parameterSetCount,
43 const uint8_t *const *parameterSetPointers,
44 const size_t *parameterSetSizes,
45 int NALUnitHeaderLength,
46 CFDictionaryRef extensions,
47 CMFormatDescriptionRef *formatDescriptionOut);
48
49 void getParameterSet(const CMFormatDescriptionRef format,
50 size_t offset,
51 const uint8_t *&parameterSet,
52 size_t &parameterSetSize,
53 size_t &parameterSetsCount) const override;
54 CMFormatDescriptionRef createFormatDescription(size_t paramterSetsCount,
55 const uint8_t *parameterSets[],
56 const size_t parameterSetSizes[]) const override;
57
58 static CFStringRef _kVTProfileLevel_HEVC_Main_AutoLevel;
59 static GetParameterSetNativeFunc _CMVideoFormatDescriptionGetHEVCParameterSetAtIndex;
60 static CreateFormatDescriptionNativeFunc _CMVideoFormatDescriptionCreateFromHEVCParameterSets;
61 };
62
63 } // namespace mediastreamer