| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 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 *¶meterSet, |
| 52 |
size_t ¶meterSetSize, |
| 53 |
size_t ¶meterSetsCount) 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 |
} |