Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/frameworks/AVFoundation/constants.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@
const AVLayerVideoGravity AVLayerVideoGravityResizeAspectFill = @"AVLayerVideoGravityResizeAspectFill";

const AVMediaType AVMediaTypeAudio = @"soun";
const AVMediaType AVMediaTypeMuxed = @"muxx";
const AVMediaType AVMediaTypeVideo = @"vide";
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ typedef NSString *AVMediaType;
typedef NSString *AVFileType;

extern const AVMediaType AVMediaTypeAudio;
extern const AVMediaType AVMediaTypeMuxed;
extern const AVMediaType AVMediaTypeVideo;

extern const AVFileType AVFileTypeMPEG4;
Expand Down
16 changes: 16 additions & 0 deletions src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@


#include <CoreMedia/CMTime.h>
#include <CoreFoundation/CFBase.h>

extern const CFStringRef kCMFormatDescriptionColorPrimaries_ITU_R_2020;
extern const CFStringRef kCMFormatDescriptionColorPrimaries_DCI_P3;
extern const CFStringRef kCMFormatDescriptionColorPrimaries_P3_D65;
extern const CFStringRef kCMFormatDescriptionExtension_ContentLightLevelInfo;
extern const CFStringRef kCMFormatDescriptionExtension_Depth;
extern const CFStringRef kCMFormatDescriptionExtension_FormatName;
extern const CFStringRef kCMFormatDescriptionExtension_FullRangeVideo;
extern const CFStringRef kCMFormatDescriptionExtension_MasteringDisplayColorVolume;
extern const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2020;
extern const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG;
extern const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ;
extern const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_428_1;
extern const CFStringRef kCMFormatDescriptionYCbCrMatrix_ITU_R_2020;
extern const CFStringRef kCMSampleAttachmentKey_IsDependedOnByOthers;

void* AudioToolbox_AudioConverterDispose(void);
void* AudioToolbox_AudioConverterGetProperty(void);
Expand Down
14 changes: 14 additions & 0 deletions src/frameworks/CoreMedia/src/CoreMedia.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,22 @@
#include <stdlib.h>
#include <stdio.h>

const CFStringRef kCMFormatDescriptionColorPrimaries_ITU_R_2020 = CFSTR("CMFormatDescriptionColorPrimaries_ITU_R_2020");
const CFStringRef kCMFormatDescriptionColorPrimaries_DCI_P3 = CFSTR("CMFormatDescriptionColorPrimaries_DCI_P3");
const CFStringRef kCMFormatDescriptionColorPrimaries_P3_D65 = CFSTR("CMFormatDescriptionColorPrimaries_P3_D65");
const CFStringRef kCMFormatDescriptionExtension_ContentLightLevelInfo = CFSTR("CMFormatDescriptionExtension_ContentLightLevelInfo");
const CFStringRef kCMFormatDescriptionExtension_Depth = CFSTR("CMFormatDescriptionExtension_Depth");
const CFStringRef kCMFormatDescriptionExtension_FormatName = CFSTR("CMFormatDescriptionExtension_FormatName");
const CFStringRef kCMFormatDescriptionExtension_FullRangeVideo = CFSTR("CMFormatDescriptionExtension_FullRangeVideo");
const CFStringRef kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms = CFSTR("SampleDescriptionExtensionAtoms");
const CFStringRef kCMFormatDescriptionExtension_MasteringDisplayColorVolume = CFSTR("CMFormatDescriptionExtension_MasteringDisplayColorVolume");
const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2020 = CFSTR("CMFormatDescriptionTransferFunction_ITU_R_2020");
const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG = CFSTR("CMFormatDescriptionTransferFunction_ITU_R_2100_HLG");
const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ = CFSTR("CMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ");
const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_428_1 = CFSTR("CMFormatDescriptionTransferFunction_SMPTE_ST_428_1");
const CFStringRef kCMFormatDescriptionYCbCrMatrix_ITU_R_2020 = CFSTR("CMFormatDescriptionYCbCrMatrix_ITU_R_2020");
Comment on lines +26 to +39
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const CFStringRef kCMFormatDescriptionColorPrimaries_ITU_R_2020 = CFSTR("CMFormatDescriptionColorPrimaries_ITU_R_2020");
const CFStringRef kCMFormatDescriptionColorPrimaries_DCI_P3 = CFSTR("CMFormatDescriptionColorPrimaries_DCI_P3");
const CFStringRef kCMFormatDescriptionColorPrimaries_P3_D65 = CFSTR("CMFormatDescriptionColorPrimaries_P3_D65");
const CFStringRef kCMFormatDescriptionExtension_ContentLightLevelInfo = CFSTR("CMFormatDescriptionExtension_ContentLightLevelInfo");
const CFStringRef kCMFormatDescriptionExtension_Depth = CFSTR("CMFormatDescriptionExtension_Depth");
const CFStringRef kCMFormatDescriptionExtension_FormatName = CFSTR("CMFormatDescriptionExtension_FormatName");
const CFStringRef kCMFormatDescriptionExtension_FullRangeVideo = CFSTR("CMFormatDescriptionExtension_FullRangeVideo");
const CFStringRef kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms = CFSTR("SampleDescriptionExtensionAtoms");
const CFStringRef kCMFormatDescriptionExtension_MasteringDisplayColorVolume = CFSTR("CMFormatDescriptionExtension_MasteringDisplayColorVolume");
const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2020 = CFSTR("CMFormatDescriptionTransferFunction_ITU_R_2020");
const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG = CFSTR("CMFormatDescriptionTransferFunction_ITU_R_2100_HLG");
const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ = CFSTR("CMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ");
const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_428_1 = CFSTR("CMFormatDescriptionTransferFunction_SMPTE_ST_428_1");
const CFStringRef kCMFormatDescriptionYCbCrMatrix_ITU_R_2020 = CFSTR("CMFormatDescriptionYCbCrMatrix_ITU_R_2020");
const CFStringRef kCMFormatDescriptionColorPrimaries_ITU_R_2020 = CFSTR("ITU_R_2020");
const CFStringRef kCMFormatDescriptionColorPrimaries_DCI_P3 = CFSTR("DCI_P3");
const CFStringRef kCMFormatDescriptionColorPrimaries_P3_D65 = CFSTR("P3_D65");
const CFStringRef kCMFormatDescriptionExtension_ContentLightLevelInfo = CFSTR("ContentLightLevelInfo");
const CFStringRef kCMFormatDescriptionExtension_Depth = CFSTR("Depth");
const CFStringRef kCMFormatDescriptionExtension_FormatName = CFSTR("FormatName");
const CFStringRef kCMFormatDescriptionExtension_FullRangeVideo = CFSTR("FullRangeVideo");
const CFStringRef kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms = CFSTR("SampleDescriptionExtensionAtoms");
const CFStringRef kCMFormatDescriptionExtension_MasteringDisplayColorVolume = CFSTR("MasteringDisplayColorVolume");
const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2020 = CFSTR("ITU_R_2020");
const CFStringRef kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG = CFSTR("ITU_R_2100_HLG");
const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ = CFSTR("SMPTE_ST_2084_PQ");
const CFStringRef kCMFormatDescriptionTransferFunction_SMPTE_ST_428_1 = CFSTR("SMPTE_ST_428_1");
const CFStringRef kCMFormatDescriptionYCbCrMatrix_ITU_R_2020 = CFSTR("ITU_R_2020");

const CFStringRef kCMSampleAttachmentKey_NotSync = CFSTR("NotSync");
const CFStringRef kCMSampleAttachmentKey_IsDependedOnByOthers = CFSTR("IsDependedOnByOthers");

static int verbose = 0;

Expand Down
21 changes: 21 additions & 0 deletions src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,25 @@

typedef CVBufferRef CVImageBufferRef;

extern const CFStringRef kCVImageBufferColorPrimaries_EBU_3213;
extern const CFStringRef kCVImageBufferColorPrimaries_ITU_R_2020;
extern const CFStringRef kCVImageBufferColorPrimaries_ITU_R_709_2;
extern const CFStringRef kCVImageBufferColorPrimaries_SMPTE_C;
extern const CFStringRef kCVImageBufferColorPrimariesKey;
extern const CFStringRef kCVImageBufferGammaLevelKey;
extern const CFStringRef kCVImageBufferTransferFunction_ITU_R_2020;
extern const CFStringRef kCVImageBufferTransferFunction_ITU_R_2100_HLG;
extern const CFStringRef kCVImageBufferTransferFunction_ITU_R_709_2;
extern const CFStringRef kCVImageBufferTransferFunction_SMPTE_240M_1995;
extern const CFStringRef kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
extern const CFStringRef kCVImageBufferTransferFunction_SMPTE_ST_428_1;
extern const CFStringRef kCVImageBufferTransferFunction_UseGamma;
extern const CFStringRef kCVImageBufferTransferFunctionKey;
extern const CFStringRef kCVImageBufferTransferFunction_sRGB;
extern const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_2020;
extern const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_601_4;
extern const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_709_2;
extern const CFStringRef kCVImageBufferYCbCrMatrix_SMPTE_240M_1995;
extern const CFStringRef kCVImageBufferYCbCrMatrixKey;

#endif // _COREVIDEO_CVIMAGEBUFFER_H_
20 changes: 20 additions & 0 deletions src/frameworks/CoreVideo/src/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
const CFStringRef kCVImageBufferChromaLocationBottomFieldKey = CFSTR("CVImageBufferChromaLocationBottomField");
const CFStringRef kCVImageBufferChromaLocationTopFieldKey = CFSTR("CVImageBufferChromaLocationTopField");
const CFStringRef kCVImageBufferChromaLocation_Left = CFSTR("Left");
const CFStringRef kCVImageBufferColorPrimaries_EBU_3213 = CFSTR("CVImageBufferColorPrimaries_EBU_3213");
const CFStringRef kCVImageBufferColorPrimaries_ITU_R_2020 = CFSTR("CVImageBufferColorPrimaries_ITU_R_2020");
const CFStringRef kCVImageBufferColorPrimaries_ITU_R_709_2 = CFSTR("CVImageBufferColorPrimaries_ITU_R_709_2");
const CFStringRef kCVImageBufferColorPrimaries_SMPTE_C = CFSTR("CVImageBufferColorPrimaries_SMPTE_C");
const CFStringRef kCVImageBufferColorPrimariesKey = CFSTR("CVImageBufferColorPrimariesKey");
const CFStringRef kCVImageBufferGammaLevelKey = CFSTR("CVImageBufferGammaLevelKey");
const CFStringRef kCVImageBufferTransferFunctionKey = CFSTR("CVImageBufferTransferFunctionKey");
const CFStringRef kCVImageBufferTransferFunction_sRGB = CFSTR("CVImageBufferTransferFunction_sRGB");
const CFStringRef kCVImageBufferTransferFunction_ITU_R_2020 = CFSTR("CVImageBufferTransferFunction_ITU_R_2020");
const CFStringRef kCVImageBufferTransferFunction_ITU_R_2100_HLG = CFSTR("CVImageBufferTransferFunction_ITU_R_2100_HLG");
const CFStringRef kCVImageBufferTransferFunction_ITU_R_709_2 = CFSTR("CVImageBufferTransferFunction_ITU_R_709_2");
const CFStringRef kCVImageBufferTransferFunction_SMPTE_240M_1995 = CFSTR("CVImageBufferTransferFunction_SMPTE_240M_1995");
const CFStringRef kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ = CFSTR("CVImageBufferTransferFunction_SMPTE_ST_2084_PQ");
const CFStringRef kCVImageBufferTransferFunction_SMPTE_ST_428_1 = CFSTR("CVImageBufferTransferFunction_SMPTE_ST_428_1");
const CFStringRef kCVImageBufferTransferFunction_UseGamma = CFSTR("CVImageBufferTransferFunction_UseGamma");
const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_2020 = CFSTR("CVImageBufferYCbCrMatrix_ITU_R_2020");
const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_601_4 = CFSTR("CVImageBufferYCbCrMatrix_ITU_R_601_4");
const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_709_2 = CFSTR("CVImageBufferYCbCrMatrix_ITU_R_709_2");
const CFStringRef kCVImageBufferYCbCrMatrix_SMPTE_240M_1995 = CFSTR("CVImageBufferYCbCrMatrix_SMPTE_240M_1995");
const CFStringRef kCVImageBufferYCbCrMatrixKey = CFSTR("CVImageBufferYCbCrMatrixKey");
const CFStringRef kCVPixelBufferIOSurfacePropertiesKey = CFSTR("IOSurfaceProperties");
const CFStringRef kCVPixelBufferOpenGLCompatibilityKey = CFSTR("OpenGLCompatibility");
const CFStringRef kCVPixelBufferPixelFormatTypeKey = CFSTR("PixelFormatType");
Expand Down
10 changes: 9 additions & 1 deletion src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@
#define _VideoToolbox_H_

#import <Foundation/Foundation.h>

#import <CoreFoundation/CFBase.h>
#import <VideoToolbox/FigMetalTransferHelper.h>

extern const CFStringRef kVTCompressionPropertyKey_DataRateLimits;
extern const CFStringRef kVTCompressionPropertyKey_ExpectedFrameRate;
extern const CFStringRef kVTCompressionPropertyKey_MaxFrameDelayCount;
extern const CFStringRef kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration;
extern const CFStringRef kVTProfileLevel_H264_High_AutoLevel;
extern const CFStringRef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder;
extern const CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder;

void* COLOR_Y2R24(void);
void* COLOR_Y2R32(void);
void* COLOR_Y420uToUYVY_scalar(void);
Expand Down
7 changes: 7 additions & 0 deletions src/frameworks/VideoToolbox/src/VideoToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,23 @@

const CFStringRef kVTCompressionPropertyKey_AllowFrameReordering = CFSTR("AllowFrameReordering");
const CFStringRef kVTCompressionPropertyKey_AverageBitRate = CFSTR("AverageBitRate");
const CFStringRef kVTCompressionPropertyKey_DataRateLimits = CFSTR("DataRateLimits");
const CFStringRef kVTCompressionPropertyKey_ExpectedFrameRate = CFSTR("ExpectedFrameRate");
const CFStringRef kVTCompressionPropertyKey_MaxFrameDelayCount = CFSTR("MaxFrameDelayCount");
const CFStringRef kVTCompressionPropertyKey_MaxKeyFrameInterval = CFSTR("MaxKeyFrameInterval");
const CFStringRef kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration = CFSTR("MaxKeyFrameIntervalDuration");
const CFStringRef kVTCompressionPropertyKey_ProfileLevel = CFSTR("ProfileLevel");
const CFStringRef kVTCompressionPropertyKey_RealTime = CFSTR("RealTime");
const CFStringRef kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder = CFSTR("UsingHardwareAcceleratedVideoEncoder");
const CFStringRef kVTDecompressionPropertyKey_UsingHardwareAcceleratedVideoDecoder = CFSTR("UsingHardwareAcceleratedVideoDecoder");
const CFStringRef kVTEncodeFrameOptionKey_ForceKeyFrame = CFSTR("ForceKeyFrame");
const CFStringRef kVTProfileLevel_H264_Baseline_AutoLevel = CFSTR("AutoLevel");
const CFStringRef kVTProfileLevel_H264_High_AutoLevel = CFSTR("AutoLevel");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const CFStringRef kVTProfileLevel_H264_High_AutoLevel = CFSTR("AutoLevel");
const CFStringRef kVTProfileLevel_H264_High_AutoLevel = CFSTR("H264_High_AutoLevel");

const CFStringRef kVTProfileLevel_H264_Main_AutoLevel = CFSTR("AutoLevel");
const CFStringRef kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder = CFSTR("EnableHardwareAcceleratedVideoDecoder");
const CFStringRef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder = CFSTR("RequireHardwareAcceleratedVideoDecoder");
const CFStringRef kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder = CFSTR("EnableHardwareAcceleratedVideoEncoder");
const CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder = CFSTR("RequireHardwareAcceleratedVideoEncoder");
const CFStringRef kVTPixelTransferPropertyKey_RealTime = CFSTR("RealTime");

static int verbose = 0;
Expand Down