diff --git a/src/CoreVideo/CMakeLists.txt b/src/CoreVideo/CMakeLists.txt index 25e5d2486..31e5b7c77 100644 --- a/src/CoreVideo/CMakeLists.txt +++ b/src/CoreVideo/CMakeLists.txt @@ -11,6 +11,8 @@ add_framework(CoreVideo VERSION "A" SOURCES + src/constants.c + src/stubs.c src/CVDisplayLink.mm DEPENDENCIES diff --git a/src/CoreVideo/src/constants.c b/src/CoreVideo/src/constants.c new file mode 100644 index 000000000..e3b4354dd --- /dev/null +++ b/src/CoreVideo/src/constants.c @@ -0,0 +1,8 @@ +#include + +const CFStringRef kCVImageBufferChromaLocationBottomFieldKey = CFSTR("CVImageBufferChromaLocationBottomField"); +const CFStringRef kCVImageBufferChromaLocationTopFieldKey = CFSTR("CVImageBufferChromaLocationTopField"); +const CFStringRef kCVImageBufferChromaLocation_Left = CFSTR("Left"); +const CFStringRef kCVPixelBufferIOSurfacePropertiesKey = CFSTR("IOSurfaceProperties"); +const CFStringRef kCVPixelBufferOpenGLCompatibilityKey = CFSTR("OpenGLCompatibility"); +const CFStringRef kCVPixelBufferPixelFormatTypeKey = CFSTR("PixelFormatType"); diff --git a/src/CoreVideo/src/stubs.c b/src/CoreVideo/src/stubs.c new file mode 100644 index 000000000..f82aadb08 --- /dev/null +++ b/src/CoreVideo/src/stubs.c @@ -0,0 +1,66 @@ +#include + +void* CVBufferRelease(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferCreateWithPlanarBytes(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} +void* CVPixelBufferGetBaseAddress(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferGetBaseAddressOfPlane(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferGetBytesPerRowOfPlane(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferGetHeight(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferGetIOSurface(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferGetPlaneCount(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferGetWidth(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferLockBaseAddress(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} + +void* CVPixelBufferUnlockBaseAddress(void) +{ + printf("STUB: %s\n", __PRETTY_FUNCTION__); + return NULL; +} diff --git a/src/VideoToolbox/src/VideoToolbox.m b/src/VideoToolbox/src/VideoToolbox.m index afa8095c7..ca6566087 100644 --- a/src/VideoToolbox/src/VideoToolbox.m +++ b/src/VideoToolbox/src/VideoToolbox.m @@ -22,6 +22,21 @@ #include #include +#include + +const CFStringRef kVTCompressionPropertyKey_AllowFrameReordering = CFSTR("AllowFrameReordering"); +const CFStringRef kVTCompressionPropertyKey_AverageBitRate = CFSTR("AverageBitRate"); +const CFStringRef kVTCompressionPropertyKey_MaxKeyFrameInterval = CFSTR("MaxKeyFrameInterval"); +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_Main_AutoLevel = CFSTR("AutoLevel"); +const CFStringRef kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder = CFSTR("EnableHardwareAcceleratedVideoDecoder"); +const CFStringRef kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder = CFSTR("EnableHardwareAcceleratedVideoEncoder"); + static int verbose = 0; __attribute__((constructor)) diff --git a/src/external/cocotron b/src/external/cocotron index e071d599c..5c854296a 160000 --- a/src/external/cocotron +++ b/src/external/cocotron @@ -1 +1 @@ -Subproject commit e071d599cb929db39c2aa8bb6f1dc5fbe039926d +Subproject commit 5c854296a5265bd3b7324bb40b97ad7e1107a393 diff --git a/src/external/foundation b/src/external/foundation index 4dc6dae17..9eb51cd2f 160000 --- a/src/external/foundation +++ b/src/external/foundation @@ -1 +1 @@ -Subproject commit 4dc6dae179c79a856037fd4d764ea65a136c2d9f +Subproject commit 9eb51cd2f336f108cbade19662d481238db330fc diff --git a/src/frameworks/AVFoundation/constants.m b/src/frameworks/AVFoundation/constants.m index 52091fe52..9f947c23b 100644 --- a/src/frameworks/AVFoundation/constants.m +++ b/src/frameworks/AVFoundation/constants.m @@ -30,3 +30,11 @@ NSString *const AVErrorPresentationTimeStampKey = @"AVErrorPresentationTimeStamp NSString *const AVErrorPersistentTrackIDKey = @"AVErrorPersistentTrackIDKey"; NSString *const AVErrorFileTypeKey = @"AVErrorFileTypeKey"; NSString *const AVFoundationErrorDomain = @"AVFoundationErrorDomain"; +NSString *const AVCaptureDeviceWasConnectedNotification = @"AVCaptureDeviceWasConnectedNotification"; +NSString *const AVCaptureDeviceWasDisconnectedNotification = @"AVCaptureDeviceWasDisconnectedNotification"; +NSString *const AVCaptureSessionPreset1280x720 = @"AVCaptureSessionPreset1280x720"; +NSString *const AVCaptureSessionPreset352x288 = @"AVCaptureSessionPreset352x288"; +NSString *const AVCaptureSessionPreset640x480 = @"AVCaptureSessionPreset640x480"; +NSString *const AVCaptureSessionPresetLow = @"AVCaptureSessionPresetLow"; +NSString *const AVMediaTypeAudio = @"soun"; +NSString *const AVMediaTypeVideo = @"vide"; diff --git a/src/frameworks/CoreMedia/src/CoreMedia.c b/src/frameworks/CoreMedia/src/CoreMedia.c index 4a388b088..3d76e8103 100644 --- a/src/frameworks/CoreMedia/src/CoreMedia.c +++ b/src/frameworks/CoreMedia/src/CoreMedia.c @@ -19,9 +19,13 @@ #include +#include #include #include +const CFStringRef kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms = CFSTR("SampleDescriptionExtensionAtoms"); +const CFStringRef kCMSampleAttachmentKey_NotSync = CFSTR("NotSync"); + static int verbose = 0; __attribute__((constructor)) diff --git a/src/frameworks/CoreServices/constants.m b/src/frameworks/CoreServices/constants.m index ba6be1a7b..e5996c8cb 100644 --- a/src/frameworks/CoreServices/constants.m +++ b/src/frameworks/CoreServices/constants.m @@ -32,6 +32,10 @@ const CFStringRef kUTTypeImage = CFSTR("public.image"); const CFStringRef kUTTypeUTF8PlainText = CFSTR("public.utf8-plain-text"); const CFStringRef kUTTypeApplication = CFSTR("com.apple.application"); const CFStringRef kUTTypeBundle = CFSTR("com.apple.bundle"); +const CFStringRef kUTTypeHTML = CFSTR("public.html"); +const CFStringRef kUTTypePICT = CFSTR("com.apple.pict"); +const CFStringRef kUTTypeUTF16ExternalPlainText = CFSTR("public.utf16-external-plain-text"); +const CFStringRef kUTTypeUTF16PlainText = CFSTR("public.utf16-plain-text"); const CFStringRef _kLSASNKey = CFSTR("LSASN"); const CFStringRef _kLSApplicationTypeKey = CFSTR("ApplicationType");