diff --git a/src/frameworks/AVFoundation/constants.m b/src/frameworks/AVFoundation/constants.m index bce135acff..5cdb85ac4f 100644 --- a/src/frameworks/AVFoundation/constants.m +++ b/src/frameworks/AVFoundation/constants.m @@ -83,4 +83,5 @@ const AVLayerVideoGravity AVLayerVideoGravityResizeAspectFill = @"AVLayerVideoGravityResizeAspectFill"; const AVMediaType AVMediaTypeAudio = @"soun"; +const AVMediaType AVMediaTypeMuxed = @"muxx"; const AVMediaType AVMediaTypeVideo = @"vide"; diff --git a/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h b/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h index 8de20cd23a..d9788354c5 100644 --- a/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h +++ b/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h @@ -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; diff --git a/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h b/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h index 37c796a3a3..b8114a9b92 100644 --- a/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h +++ b/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h @@ -23,6 +23,22 @@ #include +#include + +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); diff --git a/src/frameworks/CoreMedia/src/CoreMedia.c b/src/frameworks/CoreMedia/src/CoreMedia.c index 3d76e81032..8602a326c8 100644 --- a/src/frameworks/CoreMedia/src/CoreMedia.c +++ b/src/frameworks/CoreMedia/src/CoreMedia.c @@ -23,8 +23,22 @@ #include #include +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 kCMSampleAttachmentKey_NotSync = CFSTR("NotSync"); +const CFStringRef kCMSampleAttachmentKey_IsDependedOnByOthers = CFSTR("IsDependedOnByOthers"); static int verbose = 0; diff --git a/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h b/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h index 7ef741010e..1422f86231 100644 --- a/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h +++ b/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h @@ -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_ diff --git a/src/frameworks/CoreVideo/src/constants.c b/src/frameworks/CoreVideo/src/constants.c index 919f4e19fc..2fc7251131 100644 --- a/src/frameworks/CoreVideo/src/constants.c +++ b/src/frameworks/CoreVideo/src/constants.c @@ -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"); diff --git a/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h b/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h index faebfe496c..a5555aae13 100644 --- a/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h +++ b/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h @@ -22,9 +22,17 @@ #define _VideoToolbox_H_ #import - +#import #import +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); diff --git a/src/frameworks/VideoToolbox/src/VideoToolbox.m b/src/frameworks/VideoToolbox/src/VideoToolbox.m index 845b012a2a..2b4633bfc1 100644 --- a/src/frameworks/VideoToolbox/src/VideoToolbox.m +++ b/src/frameworks/VideoToolbox/src/VideoToolbox.m @@ -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"); 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;