├── CMAudioFormatDescription+CMPExtradata.c ├── CMAudioFormatDescription+CMPExtradata.h ├── CMBlockBuffer+CMPData.c ├── CMBlockBuffer+CMPData.h ├── CMPAtoms+Iterate.c ├── CMPAtoms+Iterate.h ├── CMPAtoms.c ├── CMPAtoms.h ├── CMPAudioFormatDescription+Extradata.c ├── CMPAudioFormatDescription+Extradata.h ├── CMPBlockBuffer+Image.c ├── CMPBlockBuffer+Image.h ├── CMPBlockBuffer+Text.c ├── CMPBlockBuffer+Text.h ├── CMPErrors.h ├── CMPFormatDescription+Text.c ├── CMPFormatDescription+Text.h ├── CMPSampleBuffer+Image.c ├── CMPSampleBuffer+Image.h ├── CMPSampleBuffer+Text.c ├── CMPSampleBuffer+Text.h ├── CMSampleBuffer+CMPDependsOnOthers.c ├── CMSampleBuffer+CMPDependsOnOthers.h ├── CMVideoFormatDescription+CMPExtradata.c ├── CMVideoFormatDescription+CMPExtradata.h ├── CoreMediaPlus-OSX.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── CoreMediaPlus-Prefix.pch ├── CoreMediaPlus-iOS.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── CoreMediaPlus.h └── CoreMediaPlusTests ├── Baby.m4a ├── Baby.wav ├── CMAudioFormatDescription+CMPExtradata.m └── Info.plist /CMAudioFormatDescription+CMPExtradata.c: -------------------------------------------------------------------------------- 1 | #include "CMAudioFormatDescription+CMPExtradata.h" 2 | 3 | #include 4 | #if defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE > 0) 5 | #include 6 | #endif 7 | 8 | 9 | static OSStatus AudioDataGetTag(const uint8_t *data, uint32_t dataLength, uint8_t *outTagType, uint32_t *outTagHeaderLength, uint32_t *outTagDataLength) 10 | { 11 | static const uint8_t lengthMask = 0x7f; 12 | static const uint8_t endMask = ~lengthMask; 13 | 14 | if(dataLength < 1) 15 | { 16 | return paramErr; 17 | } 18 | 19 | uint8_t type = data[0]; 20 | 21 | uint32_t length = 0; 22 | uint32_t index = 1; 23 | 24 | for(; index <= 4; ++index) 25 | { 26 | if(dataLength < index + 1) 27 | { 28 | return paramErr; 29 | } 30 | 31 | const uint8_t b = data[index]; 32 | 33 | length = (length << 7) | (b & lengthMask); 34 | 35 | if(!(b & endMask)) 36 | { 37 | break; 38 | } 39 | } 40 | 41 | if(outTagType != NULL) 42 | { 43 | *outTagType = type; 44 | } 45 | 46 | if(outTagHeaderLength != NULL) 47 | { 48 | *outTagHeaderLength = 1 + index; 49 | } 50 | 51 | if(outTagDataLength != NULL) 52 | { 53 | *outTagDataLength = length; 54 | } 55 | 56 | return noErr; 57 | } 58 | 59 | static OSStatus AudioDataCopyExtradata(CFAllocatorRef allocator, const uint8_t *data, uint32_t dataSize, CFDataRef *outExtradata) 60 | { 61 | static const uint8_t ESDSTag = 0x03; 62 | static const uint8_t ESDSConfigTag = 0x04; 63 | static const uint8_t ESDSSpecifcTag = 0x05; 64 | 65 | uint8_t tag = 0; 66 | uint32_t tagDataLength = 0; 67 | uint32_t tagHeaderLength = 0; 68 | 69 | OSStatus status = AudioDataGetTag(data, dataSize, &tag, &tagHeaderLength, &tagDataLength); 70 | if(status != noErr) 71 | { 72 | return status; 73 | } 74 | 75 | data += tagHeaderLength; 76 | dataSize -= tagHeaderLength; 77 | 78 | const uint32_t skipSize = tag == ESDSTag ? 3 : 2; 79 | 80 | if(dataSize < skipSize) 81 | { 82 | return paramErr; 83 | } 84 | data += skipSize; 85 | dataSize -= skipSize; 86 | 87 | status = AudioDataGetTag(data, dataSize, &tag, &tagHeaderLength, &tagDataLength); 88 | if(status != noErr) 89 | { 90 | return status; 91 | } 92 | 93 | data += tagHeaderLength; 94 | dataSize -= tagHeaderLength; 95 | 96 | if(tag == ESDSConfigTag) 97 | { 98 | const uint32_t configSize = 13; 99 | 100 | if(dataSize < configSize) 101 | { 102 | return paramErr; 103 | } 104 | data += configSize; 105 | dataSize -= configSize; 106 | 107 | status = AudioDataGetTag(data, dataSize, &tag, &tagHeaderLength, &tagDataLength); 108 | if(status != noErr) 109 | { 110 | return status; 111 | } 112 | 113 | data += tagHeaderLength; 114 | dataSize -= tagHeaderLength; 115 | 116 | if(dataSize < tagDataLength) 117 | { 118 | return paramErr; 119 | } 120 | 121 | if(tag == ESDSSpecifcTag) 122 | { 123 | *outExtradata = CFDataCreate(allocator, data, tagDataLength); 124 | return noErr; 125 | } 126 | } 127 | 128 | return paramErr; 129 | } 130 | 131 | OSStatus CMPAudioFormatDescriptionCopyExtradata(CFAllocatorRef allocator, CMAudioFormatDescriptionRef formatDescription, CFDataRef* outExtradata) 132 | { 133 | if(formatDescription == NULL) 134 | { 135 | return paramErr; 136 | } 137 | 138 | const FourCharCode mediaSubType = CMFormatDescriptionGetMediaSubType(formatDescription); 139 | if(mediaSubType == kAudioFormatMPEG4AAC) 140 | { 141 | size_t magicCookieSize = 0; 142 | const unsigned char *magicCookie = CMAudioFormatDescriptionGetMagicCookie(formatDescription, &magicCookieSize); 143 | 144 | if(magicCookie == NULL || magicCookieSize == 0) 145 | { 146 | return paramErr; 147 | } 148 | 149 | return AudioDataCopyExtradata(allocator, magicCookie, (uint32_t)magicCookieSize, outExtradata); 150 | } 151 | else 152 | { 153 | *outExtradata = NULL; 154 | return noErr; 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /CMAudioFormatDescription+CMPExtradata.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | OSStatus CMPAudioFormatDescriptionCopyExtradata(CFAllocatorRef allocator, CMAudioFormatDescriptionRef audioFormatDescription, CFDataRef *outExtradata); 6 | -------------------------------------------------------------------------------- /CMBlockBuffer+CMPData.c: -------------------------------------------------------------------------------- 1 | #include "CMBlockBuffer+CMPData.h" 2 | 3 | OSStatus CMPBlockBufferAppendToData(CMBlockBufferRef blockBuffer, CFMutableDataRef data) 4 | { 5 | const size_t length = CMBlockBufferGetDataLength(blockBuffer); 6 | 7 | return CMPBlockBufferAppendRangeToData(blockBuffer, 0, length, data); 8 | } 9 | 10 | OSStatus CMPBlockBufferAppendRangeToData(CMBlockBufferRef blockBuffer, size_t offset, size_t length, CFMutableDataRef data) 11 | { 12 | do 13 | { 14 | char *dataPointer = NULL; 15 | size_t lengthAtOffset = 0; 16 | CMBlockBufferGetDataPointer(blockBuffer, offset, &lengthAtOffset, NULL, &dataPointer); 17 | 18 | if(lengthAtOffset > length) 19 | { 20 | lengthAtOffset = length; 21 | } 22 | 23 | offset += lengthAtOffset; 24 | length -= lengthAtOffset; 25 | 26 | CFDataAppendBytes(data, (UInt8 *)dataPointer, lengthAtOffset); 27 | } 28 | while(length > 0); 29 | 30 | return noErr; 31 | } 32 | -------------------------------------------------------------------------------- /CMBlockBuffer+CMPData.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | OSStatus CMPBlockBufferAppendToData(CMBlockBufferRef blockBuffer, CFMutableDataRef data); 4 | 5 | OSStatus CMPBlockBufferAppendRangeToData(CMBlockBufferRef blockBuffer, size_t offset, size_t length, CFMutableDataRef data); 6 | -------------------------------------------------------------------------------- /CMPAtoms+Iterate.c: -------------------------------------------------------------------------------- 1 | #include "CMPAtoms+Iterate.h" 2 | 3 | Boolean CMPAtomIterate(const void *buffer, const size_t bufferSize, size_t *ioOffset, CMPAtom **outAtom) 4 | { 5 | // check if the atom header fits 6 | if(*ioOffset + sizeof(**outAtom) > bufferSize) 7 | { 8 | return false; 9 | } 10 | 11 | CMPAtom *atom = (CMPAtom *)(buffer + *ioOffset); 12 | 13 | // check if the whole atom fits 14 | UInt32 atomSize = OSSwapBigToHostInt32(atom->size); 15 | if(*ioOffset + atomSize > bufferSize) 16 | { 17 | return false; 18 | } 19 | 20 | *ioOffset += atomSize; 21 | *outAtom = atom; 22 | 23 | return true; 24 | } 25 | -------------------------------------------------------------------------------- /CMPAtoms+Iterate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CMPAtoms.h" 4 | 5 | Boolean CMPAtomIterate(const void *buffer, const size_t bufferSize, size_t *ioOffset, CMPAtom **outAtom); 6 | -------------------------------------------------------------------------------- /CMPAtoms.c: -------------------------------------------------------------------------------- 1 | #include "CMPAtoms.h" 2 | 3 | #include 4 | 5 | CFStringRef CMPAtomTypeCopyStringRef(CFAllocatorRef allocator, FourCharCode type) 6 | { 7 | type = OSSwapBigToHostInt32(type); 8 | const UInt8 *characters = (UInt8 *)&type; 9 | 10 | if(isprint(characters[0]) && isprint(characters[1]) && isprint(characters[2]) && isprint(characters[3])) 11 | { 12 | return CFStringCreateWithBytes(allocator, characters, 4, kCFStringEncodingASCII, false); 13 | } 14 | else 15 | { 16 | return CFStringCreateWithFormat(allocator, NULL, CFSTR("%08x"), (unsigned int)type); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /CMPAtoms.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // kCMTextFormatType_QTText 6 | 7 | static const FourCharCode kCMPTextEncoding = 'encd'; 8 | 9 | static const FourCharCode CMPAtomTypeEncoding = 'encd'; 10 | 11 | 12 | static const FourCharCode kCMPImageTypeJpeg = 'jpeg'; 13 | static const FourCharCode kCMPImageTypePng = 'png '; 14 | 15 | 16 | typedef struct CMPAtom { 17 | UInt32 size; 18 | FourCharCode type; 19 | } CMPAtom; 20 | 21 | 22 | typedef struct CMPEncodingAtom { 23 | CMPAtom atom; 24 | UInt32 encoding; 25 | } CMPEncodingAtom; 26 | 27 | 28 | CFStringRef CMPAtomTypeCopyStringRef(CFAllocatorRef allocator, FourCharCode type); 29 | -------------------------------------------------------------------------------- /CMPAudioFormatDescription+Extradata.c: -------------------------------------------------------------------------------- 1 | #include "CMPAudioFormatDescription+Extradata.h" 2 | 3 | #include 4 | 5 | #include "CMPErrors.h" 6 | 7 | 8 | static OSStatus AudioDataGetTag(const uint8_t *data, uint32_t dataLength, uint8_t *outTagType, uint32_t *outTagHeaderLength, uint32_t *outTagDataLength) 9 | { 10 | static const uint8_t lengthMask = 0x7f; 11 | static const uint8_t endMask = ~lengthMask; 12 | 13 | if(dataLength < 1) 14 | { 15 | return CMPParameterError; 16 | } 17 | 18 | uint8_t type = data[0]; 19 | 20 | uint32_t length = 0; 21 | uint32_t index = 1; 22 | 23 | for(; index <= 4; ++index) 24 | { 25 | if(dataLength < index + 1) 26 | { 27 | return CMPParameterError; 28 | } 29 | 30 | const uint8_t b = data[index]; 31 | 32 | length = (length << 7) | (b & lengthMask); 33 | 34 | if(!(b & endMask)) 35 | { 36 | break; 37 | } 38 | } 39 | 40 | if(outTagType != NULL) 41 | { 42 | *outTagType = type; 43 | } 44 | 45 | if(outTagHeaderLength != NULL) 46 | { 47 | *outTagHeaderLength = 1 + index; 48 | } 49 | 50 | if(outTagDataLength != NULL) 51 | { 52 | *outTagDataLength = length; 53 | } 54 | 55 | return noErr; 56 | } 57 | 58 | static OSStatus AudioDataCopyExtradata(CFAllocatorRef allocator, const uint8_t *data, uint32_t dataSize, CFDataRef *outExtradata) 59 | { 60 | static const uint8_t ESDSTag = 0x03; 61 | static const uint8_t ESDSConfigTag = 0x04; 62 | static const uint8_t ESDSSpecifcTag = 0x05; 63 | 64 | uint8_t tag = 0; 65 | uint32_t tagDataLength = 0; 66 | uint32_t tagHeaderLength = 0; 67 | 68 | OSStatus status = AudioDataGetTag(data, dataSize, &tag, &tagHeaderLength, &tagDataLength); 69 | if(status != noErr) 70 | { 71 | return status; 72 | } 73 | 74 | data += tagHeaderLength; 75 | dataSize -= tagHeaderLength; 76 | 77 | const uint32_t skipSize = tag == ESDSTag ? 3 : 2; 78 | 79 | if(dataSize < skipSize) 80 | { 81 | return CMPParameterError; 82 | } 83 | data += skipSize; 84 | dataSize -= skipSize; 85 | 86 | status = AudioDataGetTag(data, dataSize, &tag, &tagHeaderLength, &tagDataLength); 87 | if(status != noErr) 88 | { 89 | return status; 90 | } 91 | 92 | data += tagHeaderLength; 93 | dataSize -= tagHeaderLength; 94 | 95 | if(tag == ESDSConfigTag) 96 | { 97 | const uint32_t configSize = 13; 98 | 99 | if(dataSize < configSize) 100 | { 101 | return CMPParameterError; 102 | } 103 | data += configSize; 104 | dataSize -= configSize; 105 | 106 | status = AudioDataGetTag(data, dataSize, &tag, &tagHeaderLength, &tagDataLength); 107 | if(status != noErr) 108 | { 109 | return status; 110 | } 111 | 112 | data += tagHeaderLength; 113 | dataSize -= tagHeaderLength; 114 | 115 | if(dataSize < tagDataLength) 116 | { 117 | return CMPParameterError; 118 | } 119 | 120 | if(tag == ESDSSpecifcTag) 121 | { 122 | *outExtradata = CFDataCreate(allocator, data, tagDataLength); 123 | return noErr; 124 | } 125 | } 126 | 127 | return CMPParameterError; 128 | } 129 | 130 | OSStatus CMPAudioFormatDescriptionCopyExtradata(CFAllocatorRef allocator, CMAudioFormatDescriptionRef audioFormatDescription, CFDataRef* outExtradata) 131 | { 132 | if(audioFormatDescription == NULL) 133 | { 134 | return CMPParameterError; 135 | } 136 | 137 | size_t magicCookieSize = 0; 138 | const unsigned char *magicCookie = CMAudioFormatDescriptionGetMagicCookie(audioFormatDescription, &magicCookieSize); 139 | 140 | if(magicCookie == NULL || magicCookieSize == 0) 141 | { 142 | // this is not an error, there is no magic cookie for this format 143 | *outExtradata = NULL; 144 | return noErr; 145 | } 146 | 147 | return AudioDataCopyExtradata(allocator, magicCookie, (uint32_t)magicCookieSize, outExtradata); 148 | } 149 | -------------------------------------------------------------------------------- /CMPAudioFormatDescription+Extradata.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | OSStatus CMPAudioFormatDescriptionCopyExtradata(CFAllocatorRef allocator, CMAudioFormatDescriptionRef audioFormatDescription, CFDataRef *outExtradata); 6 | -------------------------------------------------------------------------------- /CMPBlockBuffer+Image.c: -------------------------------------------------------------------------------- 1 | #include "CMPBlockBuffer+Image.h" 2 | 3 | 4 | CGImageRef CMPBlockBufferCopyJPEGImage(CFAllocatorRef allocator, CMBlockBufferRef blockBuffer) 5 | { 6 | char *buffer = NULL; 7 | size_t size = 0; 8 | 9 | OSStatus status = CMBlockBufferGetDataPointer(blockBuffer, 0, &size, NULL, &buffer); 10 | if(status != noErr) 11 | { 12 | return NULL; 13 | } 14 | 15 | CGDataProviderRef source = CGDataProviderCreateWithData(NULL, buffer, size, NULL); 16 | 17 | CGImageRef image = CGImageCreateWithJPEGDataProvider(source, NULL, false, kCGRenderingIntentDefault); 18 | 19 | CFRelease(source); 20 | 21 | return image; 22 | } 23 | 24 | CGImageRef CMPBlockBufferCopyPNGImage(CFAllocatorRef allocator, CMBlockBufferRef blockBuffer) 25 | { 26 | char *buffer = NULL; 27 | size_t size = 0; 28 | 29 | OSStatus status = CMBlockBufferGetDataPointer(blockBuffer, 0, &size, NULL, &buffer); 30 | if(status != noErr) 31 | { 32 | return NULL; 33 | } 34 | 35 | CGDataProviderRef source = CGDataProviderCreateWithData(NULL, buffer, size, NULL); 36 | 37 | CGImageRef image = CGImageCreateWithPNGDataProvider(source, NULL, false, kCGRenderingIntentDefault); 38 | 39 | CFRelease(source); 40 | 41 | return image; 42 | } 43 | -------------------------------------------------------------------------------- /CMPBlockBuffer+Image.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | CGImageRef CMPBlockBufferCopyJPEGImage(CFAllocatorRef allocator, CMBlockBufferRef blockBuffer); 8 | 9 | CGImageRef CMPBlockBufferCopyPNGImage(CFAllocatorRef allocator, CMBlockBufferRef blockBuffer); 10 | -------------------------------------------------------------------------------- /CMPBlockBuffer+Text.c: -------------------------------------------------------------------------------- 1 | #include "CMPBlockBuffer+Text.h" 2 | 3 | #include 4 | 5 | #include "CMPAtoms.h" 6 | #include "CMPAtoms+Iterate.h" 7 | #include "CMPErrors.h" 8 | 9 | 10 | typedef struct TextEncodingModifierBox 11 | { 12 | uint32_t size; 13 | OSType type; 14 | uint32_t encoding; 15 | } TextEncodingModifierBox; 16 | 17 | OSStatus CMPBlockBufferCreateWithText(CFAllocatorRef allocator, CFStringRef text, CMBlockBufferRef* outBlockBuffer) 18 | { 19 | CFDataRef utfData = CFStringCreateExternalRepresentation( NULL, text, kCFStringEncodingUTF8, '?' ); 20 | if (utfData == NULL) // should not happen 21 | { 22 | return CMPParameterError; 23 | } 24 | CFIndex textLengthUTF8 = CFDataGetLength( utfData ); 25 | if (textLengthUTF8 > USHRT_MAX) 26 | { 27 | // Text is too long to record the length in a uint16_t 28 | CFRelease( utfData ); 29 | return CMPParameterError; 30 | } 31 | const uint8_t* textData = CFDataGetBytePtr( utfData ); 32 | 33 | size_t bufferLength = sizeof(uint16_t) + textLengthUTF8 + sizeof(TextEncodingModifierBox); 34 | 35 | OSStatus status = CMBlockBufferCreateWithMemoryBlock(allocator, NULL, bufferLength, allocator, NULL, 0, bufferLength, kCMBlockBufferAssureMemoryNowFlag, outBlockBuffer); 36 | if (status != noErr) 37 | { 38 | CFRelease( utfData ); 39 | return status; 40 | } 41 | 42 | char *buffer = NULL; 43 | status = CMBlockBufferGetDataPointer(*outBlockBuffer, 0, NULL, NULL, &buffer); 44 | if (status != noErr) 45 | { 46 | CFRelease( utfData ); 47 | return status; 48 | } 49 | 50 | *(uint16_t *)buffer = CFSwapInt16HostToBig(textLengthUTF8); 51 | buffer += sizeof(uint16_t); 52 | 53 | memcpy(buffer, textData, textLengthUTF8); 54 | buffer += textLengthUTF8; 55 | CFRelease( utfData ); 56 | 57 | // write an explicit encoding atom here! 58 | TextEncodingModifierBox encodingBox; 59 | encodingBox.size = CFSwapInt32HostToBig( sizeof(TextEncodingModifierBox) ); 60 | encodingBox.type = CFSwapInt32HostToBig('encd'); 61 | encodingBox.encoding = CFSwapInt32HostToBig(kCFStringEncodingUTF8); 62 | memcpy( buffer, &encodingBox, sizeof(encodingBox) ); 63 | 64 | return noErr; 65 | } 66 | 67 | CFStringRef CMPBlockBufferCopyText(CFAllocatorRef allocator, CMBlockBufferRef blockBuffer) 68 | { 69 | char *buffer = NULL; 70 | size_t size = 0; 71 | 72 | OSStatus status = CMBlockBufferGetDataPointer(blockBuffer, 0, &size, NULL, &buffer); 73 | if(status != noErr) 74 | { 75 | return NULL; 76 | } 77 | 78 | // check if we can read the size 79 | if(size < 2) 80 | { 81 | return NULL; 82 | } 83 | 84 | CFIndex textLength = OSSwapBigToHostInt16(*(UInt16 *)buffer); 85 | buffer += 2; 86 | size -= 2; 87 | 88 | // check if the size is big enough for all values 89 | if(size < textLength) 90 | { 91 | return NULL; 92 | } 93 | 94 | const UInt8 *textCharacters = (UInt8 *)buffer; 95 | buffer += textLength; 96 | size -= textLength; 97 | 98 | CFStringEncoding textEncoding = kCFStringEncodingUTF8; 99 | 100 | // read appended atoms 101 | if(size > 0) 102 | { 103 | size_t offset = 0; 104 | CMPAtom *atom = NULL; 105 | 106 | while(CMPAtomIterate(buffer, size, &offset, &atom)) 107 | { 108 | FourCharCode atomType = OSSwapBigToHostInt32(atom->type); 109 | UInt32 atomSize = OSSwapBigToHostInt32(atom->size); 110 | 111 | if(atomType == CMPAtomTypeEncoding) 112 | { 113 | CMPEncodingAtom *encodingAtom = (CMPEncodingAtom *)atom; 114 | 115 | // atom does not fit 116 | if(atomSize > sizeof(*encodingAtom)) 117 | { 118 | continue; 119 | } 120 | 121 | textEncoding = OSSwapBigToHostInt32(encodingAtom->encoding); 122 | } 123 | } 124 | } 125 | 126 | // search "User Data Text Strings and Language Codes" 127 | // https://developer.apple.com/library/mac/documentation/QuickTime/qtff/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-BBCCFFGD 128 | 129 | if(textLength > 2) 130 | { 131 | UInt16 bom = *(UInt16 *)textCharacters; 132 | if(textEncoding == kCFStringEncodingUTF8) 133 | { 134 | if(bom == 0xfeff || bom == 0xfffe) 135 | { 136 | textEncoding = kCFStringEncodingUTF16; 137 | } 138 | } 139 | else if(textEncoding == kCFStringEncodingUTF16) 140 | { 141 | if(bom != 0xfeff && bom != 0xfffe) 142 | { 143 | textEncoding = kCFStringEncodingUTF8; 144 | } 145 | } 146 | } 147 | 148 | return CFStringCreateWithBytes(allocator, textCharacters, textLength, textEncoding, false); 149 | } 150 | -------------------------------------------------------------------------------- /CMPBlockBuffer+Text.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | OSStatus CMPBlockBufferCreateWithText(CFAllocatorRef allocator, CFStringRef text, CMBlockBufferRef* outBlockBuffer); 6 | 7 | CFStringRef CMPBlockBufferCopyText(CFAllocatorRef allocator, CMBlockBufferRef blockBuffer); 8 | -------------------------------------------------------------------------------- /CMPErrors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /* with iOS 8 the file doesn't exist on /usr/include anymore. */ 4 | 5 | enum { 6 | CMPParameterError = -50, /* same as Mac paramErr */ 7 | }; 8 | -------------------------------------------------------------------------------- /CMPFormatDescription+Text.c: -------------------------------------------------------------------------------- 1 | #import "CMPFormatDescription+Text.h" 2 | 3 | 4 | CFDictionaryRef CMPTextFormatExtensionsDictionaryCreate(CFAllocatorRef allocator) 5 | { 6 | #if 0 7 | // Obj-C extensions 8 | NSDictionary *extensions = @{ 9 | (id)kCMTextFormatDescriptionExtension_DisplayFlags : @(0), 10 | (id)kCMTextFormatDescriptionExtension_BackgroundColor : @{ 11 | (id)kCMTextFormatDescriptionColor_Red : @0, 12 | (id)kCMTextFormatDescriptionColor_Green : @0, 13 | (id)kCMTextFormatDescriptionColor_Blue : @0, 14 | (id)kCMTextFormatDescriptionColor_Alpha : @255 15 | }, 16 | (id)kCMTextFormatDescriptionExtension_DefaultTextBox : @{ 17 | (id)kCMTextFormatDescriptionRect_Top : @0, 18 | (id)kCMTextFormatDescriptionRect_Left : @0, 19 | (id)kCMTextFormatDescriptionRect_Bottom : @0, 20 | (id)kCMTextFormatDescriptionRect_Right : @0 21 | }, 22 | (id)kCMTextFormatDescriptionExtension_DefaultStyle : @{ 23 | (id)kCMTextFormatDescriptionStyle_StartChar : @0, 24 | (id)kCMTextFormatDescriptionStyle_EndChar : @0, 25 | (id)kCMTextFormatDescriptionStyle_Font : @1, 26 | (id)kCMTextFormatDescriptionStyle_FontFace : @0, 27 | (id)kCMTextFormatDescriptionStyle_ForegroundColor : @{ 28 | (id)kCMTextFormatDescriptionColor_Red : @255, 29 | (id)kCMTextFormatDescriptionColor_Green : @255, 30 | (id)kCMTextFormatDescriptionColor_Blue : @255, 31 | (id)kCMTextFormatDescriptionColor_Alpha : @255 32 | }, 33 | (id)kCMTextFormatDescriptionStyle_FontSize : @255 34 | }, 35 | (id)kCMTextFormatDescriptionExtension_HorizontalJustification : @0, 36 | (id)kCMTextFormatDescriptionExtension_VerticalJustification : @0, 37 | (id)kCMTextFormatDescriptionExtension_FontTable : @{ 38 | @"1" : @"Sans-Serif" 39 | } 40 | }; 41 | #endif 42 | 43 | const SInt8 value0 = 0; 44 | CFNumberRef number0 = CFNumberCreate(allocator, kCFNumberSInt8Type, &value0); 45 | 46 | const SInt8 value1 = 1; 47 | CFNumberRef number1 = CFNumberCreate(allocator, kCFNumberSInt8Type, &value1); 48 | 49 | const SInt16 value255 = 255; 50 | CFNumberRef number255 = CFNumberCreate(allocator, kCFNumberSInt16Type, &value255); 51 | 52 | // background color 53 | 54 | const void *backgroundColorKeys[4] = { 55 | kCMTextFormatDescriptionColor_Red, 56 | kCMTextFormatDescriptionColor_Green, 57 | kCMTextFormatDescriptionColor_Blue, 58 | kCMTextFormatDescriptionColor_Alpha, 59 | }; 60 | 61 | const void *backgroundColorValues[4] = { 62 | number0, 63 | number0, 64 | number0, 65 | number255, 66 | }; 67 | 68 | CFDictionaryRef backgroundColor = CFDictionaryCreate(allocator, backgroundColorKeys, backgroundColorValues, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 69 | 70 | // default text box 71 | 72 | const void *defaultTextBoxKeys[4] = { 73 | kCMTextFormatDescriptionRect_Top, 74 | kCMTextFormatDescriptionRect_Left, 75 | kCMTextFormatDescriptionRect_Bottom, 76 | kCMTextFormatDescriptionRect_Right, 77 | }; 78 | 79 | const void *defaultTextBoxValues[4] = { 80 | number0, 81 | number0, 82 | number0, 83 | number0, 84 | }; 85 | 86 | CFDictionaryRef defaultTextBox = CFDictionaryCreate(allocator, defaultTextBoxKeys, defaultTextBoxValues, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 87 | 88 | // foreground color 89 | 90 | const void *foregroundColorKeys[4] = { 91 | kCMTextFormatDescriptionColor_Red, 92 | kCMTextFormatDescriptionColor_Green, 93 | kCMTextFormatDescriptionColor_Blue, 94 | kCMTextFormatDescriptionColor_Alpha, 95 | }; 96 | 97 | const void *foregroundColorValues[4] = { 98 | number255, 99 | number255, 100 | number255, 101 | number255, 102 | }; 103 | 104 | CFDictionaryRef foregroundColor = CFDictionaryCreate(allocator, foregroundColorKeys, foregroundColorValues, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 105 | 106 | // default style 107 | 108 | const void *defaultStyleKeys[6] = { 109 | kCMTextFormatDescriptionStyle_StartChar, 110 | kCMTextFormatDescriptionStyle_EndChar, 111 | kCMTextFormatDescriptionStyle_Font, 112 | kCMTextFormatDescriptionStyle_FontFace, 113 | kCMTextFormatDescriptionStyle_FontSize, 114 | kCMTextFormatDescriptionStyle_ForegroundColor, 115 | }; 116 | 117 | const void *defaultStyleValues[6] = { 118 | number0, 119 | number0, 120 | number1, 121 | number0, 122 | number255, 123 | foregroundColor, 124 | }; 125 | 126 | CFDictionaryRef defaultStyle = CFDictionaryCreate(allocator, defaultStyleKeys, defaultStyleValues, 6, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 127 | 128 | // font table 129 | 130 | const void *fontTableKeys[1] = { 131 | CFSTR("1"), 132 | }; 133 | 134 | const void *fontTableValues[1] = { 135 | CFSTR("Sans-Serif"), 136 | }; 137 | 138 | CFDictionaryRef fontTable = CFDictionaryCreate(allocator, fontTableKeys, fontTableValues, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 139 | 140 | // extensions 141 | 142 | const void *extensionsKeys[7] = { 143 | kCMTextFormatDescriptionExtension_DisplayFlags, 144 | kCMTextFormatDescriptionExtension_BackgroundColor, 145 | kCMTextFormatDescriptionExtension_DefaultTextBox, 146 | kCMTextFormatDescriptionExtension_DefaultStyle, 147 | kCMTextFormatDescriptionExtension_HorizontalJustification, 148 | kCMTextFormatDescriptionExtension_VerticalJustification, 149 | kCMTextFormatDescriptionExtension_FontTable, 150 | }; 151 | 152 | const void *extensionsValues[7] = { 153 | number0, 154 | backgroundColor, 155 | defaultTextBox, 156 | defaultStyle, 157 | number0, 158 | number0, 159 | fontTable, 160 | }; 161 | 162 | CFDictionaryRef extensions = CFDictionaryCreate(allocator, extensionsKeys, extensionsValues, 7, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 163 | 164 | CFRelease(backgroundColor); 165 | CFRelease(defaultTextBox); 166 | CFRelease(foregroundColor); 167 | CFRelease(defaultStyle); 168 | CFRelease(fontTable); 169 | 170 | CFRelease(number0); 171 | CFRelease(number1); 172 | CFRelease(number255); 173 | 174 | return extensions; 175 | } 176 | 177 | OSStatus CMP3GTextFormatDescriptionCreate(CFAllocatorRef allocator, CMFormatDescriptionRef *outFormatDescription) 178 | { 179 | return CMPTextFormatDescriptionCreate(allocator, kCMTextFormatType_3GText, outFormatDescription); 180 | } 181 | 182 | OSStatus CMPQTTextFormatDescriptionCreate(CFAllocatorRef allocator, CMFormatDescriptionRef *outFormatDescription) 183 | { 184 | return CMPTextFormatDescriptionCreate(allocator, kCMTextFormatType_QTText, outFormatDescription); 185 | } 186 | 187 | OSStatus CMPTextFormatDescriptionCreate(CFAllocatorRef allocator, CMTextFormatType subtype, CMFormatDescriptionRef *outFormatDescription) 188 | { 189 | CFDictionaryRef extensions = CMPTextFormatExtensionsDictionaryCreate(allocator); 190 | 191 | OSStatus status = CMFormatDescriptionCreate(allocator, kCMMediaType_Text, subtype, extensions, outFormatDescription); 192 | 193 | if(extensions != NULL) 194 | { 195 | CFRelease(extensions); 196 | } 197 | 198 | return status; 199 | } 200 | 201 | -------------------------------------------------------------------------------- /CMPFormatDescription+Text.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | CFDictionaryRef CMPTextFormatExtensionsDictionaryCreate(CFAllocatorRef allocator); 6 | 7 | 8 | OSStatus CMP3GTextFormatDescriptionCreate(CFAllocatorRef allocator, CMFormatDescriptionRef *outFormatDescription); 9 | 10 | OSStatus CMPQTTextFormatDescriptionCreate(CFAllocatorRef allocator, CMFormatDescriptionRef *outFormatDescription); 11 | 12 | OSStatus CMPTextFormatDescriptionCreate(CFAllocatorRef allocator, CMTextFormatType subtype, CMFormatDescriptionRef *outFormatDescription); 13 | -------------------------------------------------------------------------------- /CMPSampleBuffer+Image.c: -------------------------------------------------------------------------------- 1 | #include "CMPSampleBuffer+Image.h" 2 | 3 | #include "CMPAtoms.h" 4 | #include "CMPBlockBuffer+Image.h" 5 | 6 | 7 | CGImageRef CMPSampleBufferCopyImage(CFAllocatorRef allocator, CMSampleBufferRef sampleBuffer) 8 | { 9 | if(sampleBuffer == NULL) 10 | { 11 | return NULL; 12 | } 13 | 14 | CMFormatDescriptionRef formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer); 15 | if(formatDescription == NULL) 16 | { 17 | return NULL; 18 | } 19 | 20 | CMMediaType mediaType = CMFormatDescriptionGetMediaType(formatDescription); 21 | if(mediaType != kCMMediaType_Video) 22 | { 23 | return NULL; 24 | } 25 | 26 | CMBlockBufferRef blockBuffer = CMSampleBufferGetDataBuffer(sampleBuffer); 27 | if(blockBuffer == NULL) 28 | { 29 | return NULL; 30 | } 31 | 32 | FourCharCode mediaSubType = CMFormatDescriptionGetMediaSubType(formatDescription); 33 | 34 | if(mediaSubType == kCMPImageTypeJpeg) 35 | { 36 | return CMPBlockBufferCopyJPEGImage(allocator, blockBuffer); 37 | } 38 | 39 | if(mediaSubType == kCMPImageTypePng) 40 | { 41 | return CMPBlockBufferCopyPNGImage(allocator, blockBuffer); 42 | } 43 | 44 | return NULL; 45 | } 46 | -------------------------------------------------------------------------------- /CMPSampleBuffer+Image.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | CGImageRef CMPSampleBufferCopyImage(CFAllocatorRef allocator, CMSampleBufferRef sampleBuffer); 8 | -------------------------------------------------------------------------------- /CMPSampleBuffer+Text.c: -------------------------------------------------------------------------------- 1 | #include "CMPSampleBuffer+Text.h" 2 | 3 | #include 4 | 5 | #include "CMPAtoms.h" 6 | #include "CMPBlockBuffer+Text.h" 7 | #include "CMPErrors.h" 8 | 9 | 10 | OSStatus CMPSampleBufferCreateWithText(CFAllocatorRef allocator, CFStringRef text, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, const CMSampleTimingInfo *sampleTiming, CMSampleBufferRef *outSampleBuffer) 11 | { 12 | if(text == NULL) 13 | { 14 | return CMPParameterError; 15 | } 16 | 17 | CMBlockBufferRef blockBuffer = NULL; 18 | OSStatus status = CMPBlockBufferCreateWithText(allocator, text, &blockBuffer); 19 | if(status != noErr) 20 | { 21 | return status; 22 | } 23 | 24 | size_t blockBufferLength = CMBlockBufferGetDataLength(blockBuffer); 25 | 26 | status = CMSampleBufferCreate(allocator, blockBuffer, dataReady, makeDataReadyCallback, makeDataReadyRefcon, formatDescription, 1, 1, sampleTiming, 1, &blockBufferLength, outSampleBuffer ); 27 | 28 | CFRelease( blockBuffer ); 29 | return status; 30 | } 31 | 32 | CFStringRef CMPSampleBufferCopyText(CFAllocatorRef allocator, CMSampleBufferRef sampleBuffer) 33 | { 34 | if(sampleBuffer == NULL) 35 | { 36 | return NULL; 37 | } 38 | 39 | CMFormatDescriptionRef formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer); 40 | if(formatDescription == NULL) 41 | { 42 | return NULL; 43 | } 44 | 45 | CMMediaType mediaType = CMFormatDescriptionGetMediaType(formatDescription); 46 | if(mediaType != kCMMediaType_Text) 47 | { 48 | return NULL; 49 | } 50 | 51 | FourCharCode mediaSubType = CMFormatDescriptionGetMediaSubType(formatDescription); 52 | if(mediaSubType != kCMTextFormatType_QTText && mediaSubType != kCMTextFormatType_3GText) 53 | { 54 | return NULL; 55 | } 56 | 57 | CMBlockBufferRef blockBuffer = CMSampleBufferGetDataBuffer(sampleBuffer); 58 | if(blockBuffer == NULL) 59 | { 60 | return NULL; 61 | } 62 | 63 | return CMPBlockBufferCopyText(allocator, blockBuffer); 64 | } 65 | -------------------------------------------------------------------------------- /CMPSampleBuffer+Text.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | OSStatus CMPSampleBufferCreateWithText(CFAllocatorRef allocator, CFStringRef text, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, const CMSampleTimingInfo *sampleTiming, CMSampleBufferRef *outSampleBuffer); 6 | 7 | CFStringRef CMPSampleBufferCopyText(CFAllocatorRef allocator, CMSampleBufferRef sampleBuffer); 8 | -------------------------------------------------------------------------------- /CMSampleBuffer+CMPDependsOnOthers.c: -------------------------------------------------------------------------------- 1 | #include "CMSampleBuffer+CMPDependsOnOthers.h" 2 | 3 | Boolean CMPSampleBufferDependsOnOthers(CMSampleBufferRef sampleBuffer) 4 | { 5 | Boolean dependsOnOthers = false; 6 | 7 | CFArrayRef sampleAttachements = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, false); 8 | if(sampleAttachements != nil && CFArrayGetCount(sampleAttachements) > 0) 9 | { 10 | CFDictionaryRef sampleAttachment = CFArrayGetValueAtIndex(sampleAttachements, 0); 11 | 12 | CFBooleanRef dependsOnOthersNumber = CFDictionaryGetValue(sampleAttachment, kCMSampleAttachmentKey_DependsOnOthers); 13 | 14 | dependsOnOthers = CFBooleanGetValue(dependsOnOthersNumber); 15 | } 16 | 17 | return dependsOnOthers; 18 | } 19 | 20 | Boolean CMPSampleBufferIsKeyframe(CMSampleBufferRef sampleBuffer) 21 | { 22 | return !CMPSampleBufferDependsOnOthers(sampleBuffer); 23 | } 24 | -------------------------------------------------------------------------------- /CMSampleBuffer+CMPDependsOnOthers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | Boolean CMPSampleBufferDependsOnOthers(CMSampleBufferRef sampleBuffer); 4 | 5 | Boolean CMPSampleBufferIsKeyframe(CMSampleBufferRef sampleBuffer); 6 | -------------------------------------------------------------------------------- /CMVideoFormatDescription+CMPExtradata.c: -------------------------------------------------------------------------------- 1 | #include "CMVideoFormatDescription+CMPExtradata.h" 2 | 3 | #include 4 | 5 | #include "CMPErrors.h" 6 | 7 | 8 | OSStatus CMPVideoFormatDescriptionCopyExtradata(CFAllocatorRef allocator, CMVideoFormatDescriptionRef formatDescription, CFDataRef *outExtradata) 9 | { 10 | const FourCharCode mediaSubType = CMFormatDescriptionGetMediaSubType(formatDescription); 11 | if(mediaSubType == kCMVideoCodecType_MPEG4Video || mediaSubType == kCMVideoCodecType_H264) 12 | { 13 | CFDictionaryRef atoms = CMFormatDescriptionGetExtension(formatDescription, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms); 14 | 15 | CFDataRef extradata = CFDictionaryGetValue(atoms, CFSTR("avcC")); 16 | if(extradata == nil) 17 | { 18 | return CMPParameterError; 19 | } 20 | 21 | *outExtradata = CFDataCreateCopy(allocator, extradata); 22 | return noErr; 23 | } 24 | else 25 | { 26 | *outExtradata = NULL; 27 | return noErr; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /CMVideoFormatDescription+CMPExtradata.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | OSStatus CMPVideoFormatDescriptionCopyExtradata(CFAllocatorRef allocator, CMVideoFormatDescriptionRef formatDescription, CFDataRef *outExtradata); 4 | -------------------------------------------------------------------------------- /CoreMediaPlus-OSX.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 502F9B601899233E00A762A1 /* CMPFormatDescription+Text.c in Sources */ = {isa = PBXBuildFile; fileRef = 502F9B5E1899233E00A762A1 /* CMPFormatDescription+Text.c */; }; 11 | 503BBD3C19E264F0002219B6 /* CMAudioFormatDescription+CMPExtradata.m in Sources */ = {isa = PBXBuildFile; fileRef = 503BBD3B19E264F0002219B6 /* CMAudioFormatDescription+CMPExtradata.m */; }; 12 | 503BBD3D19E264F0002219B6 /* libCoreMediaPlus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5060F47B188DAD6E00621460 /* libCoreMediaPlus.a */; }; 13 | 503BBD4419E26738002219B6 /* Baby.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 503BBD4319E26738002219B6 /* Baby.m4a */; }; 14 | 503BBD4619E26BD6002219B6 /* Baby.wav in Resources */ = {isa = PBXBuildFile; fileRef = 503BBD4519E26BD6002219B6 /* Baby.wav */; }; 15 | 5060B6D7188F117600979779 /* CMPAtoms+Iterate.c in Sources */ = {isa = PBXBuildFile; fileRef = 5060B6D6188F117600979779 /* CMPAtoms+Iterate.c */; }; 16 | 5060B6DE189011BD00979779 /* CMPAtoms.c in Sources */ = {isa = PBXBuildFile; fileRef = 5060B6DD189011BD00979779 /* CMPAtoms.c */; }; 17 | 5060B6E11890152900979779 /* CMPSampleBuffer+Image.c in Sources */ = {isa = PBXBuildFile; fileRef = 5060B6E01890152900979779 /* CMPSampleBuffer+Image.c */; }; 18 | 5060B6E41890153F00979779 /* CMPBlockBuffer+Image.c in Sources */ = {isa = PBXBuildFile; fileRef = 5060B6E31890153F00979779 /* CMPBlockBuffer+Image.c */; }; 19 | 5060F4B1188DAE0F00621460 /* CMPBlockBuffer+Text.c in Sources */ = {isa = PBXBuildFile; fileRef = 5060F4AD188DAE0F00621460 /* CMPBlockBuffer+Text.c */; }; 20 | 5060F4B3188DAE0F00621460 /* CMPSampleBuffer+Text.c in Sources */ = {isa = PBXBuildFile; fileRef = 5060F4AF188DAE0F00621460 /* CMPSampleBuffer+Text.c */; }; 21 | 509D918618DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.c in Sources */ = {isa = PBXBuildFile; fileRef = 509D918418DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.c */; }; 22 | 509D923118DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.c in Sources */ = {isa = PBXBuildFile; fileRef = 509D923018DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.c */; }; 23 | 509D923718E0093D00FC9A7A /* CMBlockBuffer+CMPData.c in Sources */ = {isa = PBXBuildFile; fileRef = 509D923618E0093D00FC9A7A /* CMBlockBuffer+CMPData.c */; }; 24 | 509D924018E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.c in Sources */ = {isa = PBXBuildFile; fileRef = 509D923F18E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.c */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 503BBD3E19E264F0002219B6 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 5060F473188DAD6E00621460 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 5060F47A188DAD6E00621460; 33 | remoteInfo = CoreMediaPlus; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 502F9B5D1899233E00A762A1 /* CMPFormatDescription+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPFormatDescription+Text.h"; sourceTree = ""; }; 39 | 502F9B5E1899233E00A762A1 /* CMPFormatDescription+Text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPFormatDescription+Text.c"; sourceTree = ""; }; 40 | 503BBD3719E264F0002219B6 /* CoreMediaPlusTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreMediaPlusTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 503BBD3A19E264F0002219B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 503BBD3B19E264F0002219B6 /* CMAudioFormatDescription+CMPExtradata.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CMAudioFormatDescription+CMPExtradata.m"; sourceTree = ""; }; 43 | 503BBD4319E26738002219B6 /* Baby.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = Baby.m4a; sourceTree = ""; }; 44 | 503BBD4519E26BD6002219B6 /* Baby.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Baby.wav; sourceTree = ""; }; 45 | 5060B6D2188F029400979779 /* CMPAtoms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CMPAtoms.h; sourceTree = ""; }; 46 | 5060B6D5188F116800979779 /* CMPAtoms+Iterate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CMPAtoms+Iterate.h"; sourceTree = ""; }; 47 | 5060B6D6188F117600979779 /* CMPAtoms+Iterate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPAtoms+Iterate.c"; sourceTree = ""; }; 48 | 5060B6DD189011BD00979779 /* CMPAtoms.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CMPAtoms.c; sourceTree = ""; }; 49 | 5060B6DF189014FE00979779 /* CMPSampleBuffer+Image.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CMPSampleBuffer+Image.h"; sourceTree = ""; }; 50 | 5060B6E01890152900979779 /* CMPSampleBuffer+Image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPSampleBuffer+Image.c"; sourceTree = ""; }; 51 | 5060B6E21890153700979779 /* CMPBlockBuffer+Image.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CMPBlockBuffer+Image.h"; sourceTree = ""; }; 52 | 5060B6E31890153F00979779 /* CMPBlockBuffer+Image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPBlockBuffer+Image.c"; sourceTree = ""; }; 53 | 5060F47B188DAD6E00621460 /* libCoreMediaPlus.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCoreMediaPlus.a; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 5060F481188DAD6E00621460 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 55 | 5060F486188DAD6E00621460 /* CoreMediaPlus-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CoreMediaPlus-Prefix.pch"; sourceTree = ""; }; 56 | 5060F487188DAD6E00621460 /* CoreMediaPlus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreMediaPlus.h; sourceTree = ""; }; 57 | 5060F4AD188DAE0F00621460 /* CMPBlockBuffer+Text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPBlockBuffer+Text.c"; sourceTree = ""; }; 58 | 5060F4AE188DAE0F00621460 /* CMPBlockBuffer+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPBlockBuffer+Text.h"; sourceTree = ""; }; 59 | 5060F4AF188DAE0F00621460 /* CMPSampleBuffer+Text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPSampleBuffer+Text.c"; sourceTree = ""; }; 60 | 5060F4B0188DAE0F00621460 /* CMPSampleBuffer+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPSampleBuffer+Text.h"; sourceTree = ""; }; 61 | 509D918418DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMAudioFormatDescription+CMPExtradata.c"; sourceTree = ""; }; 62 | 509D918518DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMAudioFormatDescription+CMPExtradata.h"; sourceTree = ""; }; 63 | 509D922F18DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMSampleBuffer+CMPDependsOnOthers.h"; sourceTree = ""; }; 64 | 509D923018DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMSampleBuffer+CMPDependsOnOthers.c"; sourceTree = ""; }; 65 | 509D923518E0093D00FC9A7A /* CMBlockBuffer+CMPData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMBlockBuffer+CMPData.h"; sourceTree = ""; }; 66 | 509D923618E0093D00FC9A7A /* CMBlockBuffer+CMPData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMBlockBuffer+CMPData.c"; sourceTree = ""; }; 67 | 509D923E18E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMVideoFormatDescription+CMPExtradata.h"; sourceTree = ""; }; 68 | 509D923F18E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMVideoFormatDescription+CMPExtradata.c"; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | 503BBD3419E264F0002219B6 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | 503BBD3D19E264F0002219B6 /* libCoreMediaPlus.a in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 503BBD3819E264F0002219B6 /* CoreMediaPlusTests */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 503BBD3B19E264F0002219B6 /* CMAudioFormatDescription+CMPExtradata.m */, 87 | 503BBD3A19E264F0002219B6 /* Info.plist */, 88 | 503BBD4319E26738002219B6 /* Baby.m4a */, 89 | 503BBD4519E26BD6002219B6 /* Baby.wav */, 90 | ); 91 | path = CoreMediaPlusTests; 92 | sourceTree = ""; 93 | }; 94 | 5060F472188DAD6E00621460 = { 95 | isa = PBXGroup; 96 | children = ( 97 | 5060F484188DAD6E00621460 /* CoreMediaPlus */, 98 | 503BBD3819E264F0002219B6 /* CoreMediaPlusTests */, 99 | 5060F47D188DAD6E00621460 /* Frameworks */, 100 | 5060F47C188DAD6E00621460 /* Products */, 101 | ); 102 | sourceTree = ""; 103 | }; 104 | 5060F47C188DAD6E00621460 /* Products */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 5060F47B188DAD6E00621460 /* libCoreMediaPlus.a */, 108 | 503BBD3719E264F0002219B6 /* CoreMediaPlusTests.xctest */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | 5060F47D188DAD6E00621460 /* Frameworks */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 5060F481188DAD6E00621460 /* Foundation.framework */, 117 | ); 118 | name = Frameworks; 119 | sourceTree = ""; 120 | }; 121 | 5060F484188DAD6E00621460 /* CoreMediaPlus */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 5060F487188DAD6E00621460 /* CoreMediaPlus.h */, 125 | 5060F486188DAD6E00621460 /* CoreMediaPlus-Prefix.pch */, 126 | 5060B6D2188F029400979779 /* CMPAtoms.h */, 127 | 5060B6DD189011BD00979779 /* CMPAtoms.c */, 128 | 5060B6D5188F116800979779 /* CMPAtoms+Iterate.h */, 129 | 5060B6D6188F117600979779 /* CMPAtoms+Iterate.c */, 130 | 509D924618E01BEB00FC9A7A /* CMPAudioFormatDescription */, 131 | 509D924218E01AF100FC9A7A /* CMBlockBuffer */, 132 | 509D924318E01B0700FC9A7A /* CMFormatDescription */, 133 | 509D924418E01B2900FC9A7A /* CMSampleBuffer */, 134 | 509D924718E01BFC00FC9A7A /* CMPVideoFormatDescription */, 135 | ); 136 | name = CoreMediaPlus; 137 | sourceTree = ""; 138 | }; 139 | 509D924218E01AF100FC9A7A /* CMBlockBuffer */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 509D923518E0093D00FC9A7A /* CMBlockBuffer+CMPData.h */, 143 | 509D923618E0093D00FC9A7A /* CMBlockBuffer+CMPData.c */, 144 | 5060B6E21890153700979779 /* CMPBlockBuffer+Image.h */, 145 | 5060B6E31890153F00979779 /* CMPBlockBuffer+Image.c */, 146 | 5060F4AE188DAE0F00621460 /* CMPBlockBuffer+Text.h */, 147 | 5060F4AD188DAE0F00621460 /* CMPBlockBuffer+Text.c */, 148 | ); 149 | name = CMBlockBuffer; 150 | sourceTree = ""; 151 | }; 152 | 509D924318E01B0700FC9A7A /* CMFormatDescription */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 502F9B5D1899233E00A762A1 /* CMPFormatDescription+Text.h */, 156 | 502F9B5E1899233E00A762A1 /* CMPFormatDescription+Text.c */, 157 | ); 158 | name = CMFormatDescription; 159 | sourceTree = ""; 160 | }; 161 | 509D924418E01B2900FC9A7A /* CMSampleBuffer */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 509D922F18DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.h */, 165 | 509D923018DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.c */, 166 | 5060F4B0188DAE0F00621460 /* CMPSampleBuffer+Text.h */, 167 | 5060F4AF188DAE0F00621460 /* CMPSampleBuffer+Text.c */, 168 | 5060B6DF189014FE00979779 /* CMPSampleBuffer+Image.h */, 169 | 5060B6E01890152900979779 /* CMPSampleBuffer+Image.c */, 170 | ); 171 | name = CMSampleBuffer; 172 | sourceTree = ""; 173 | }; 174 | 509D924618E01BEB00FC9A7A /* CMPAudioFormatDescription */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 509D918518DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.h */, 178 | 509D918418DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.c */, 179 | ); 180 | name = CMPAudioFormatDescription; 181 | sourceTree = ""; 182 | }; 183 | 509D924718E01BFC00FC9A7A /* CMPVideoFormatDescription */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 509D923E18E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.h */, 187 | 509D923F18E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.c */, 188 | ); 189 | name = CMPVideoFormatDescription; 190 | sourceTree = ""; 191 | }; 192 | /* End PBXGroup section */ 193 | 194 | /* Begin PBXNativeTarget section */ 195 | 503BBD3619E264F0002219B6 /* CoreMediaPlusTests */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = 503BBD4219E264F0002219B6 /* Build configuration list for PBXNativeTarget "CoreMediaPlusTests" */; 198 | buildPhases = ( 199 | 503BBD3319E264F0002219B6 /* Sources */, 200 | 503BBD3419E264F0002219B6 /* Frameworks */, 201 | 503BBD3519E264F0002219B6 /* Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | 503BBD3F19E264F0002219B6 /* PBXTargetDependency */, 207 | ); 208 | name = CoreMediaPlusTests; 209 | productName = CoreMediaPlusTests; 210 | productReference = 503BBD3719E264F0002219B6 /* CoreMediaPlusTests.xctest */; 211 | productType = "com.apple.product-type.bundle.unit-test"; 212 | }; 213 | 5060F47A188DAD6E00621460 /* CoreMediaPlus */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = 5060F49F188DAD6E00621460 /* Build configuration list for PBXNativeTarget "CoreMediaPlus" */; 216 | buildPhases = ( 217 | 5060F477188DAD6E00621460 /* Sources */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | ); 223 | name = CoreMediaPlus; 224 | productName = CoreMediaPlus; 225 | productReference = 5060F47B188DAD6E00621460 /* libCoreMediaPlus.a */; 226 | productType = "com.apple.product-type.library.static"; 227 | }; 228 | /* End PBXNativeTarget section */ 229 | 230 | /* Begin PBXProject section */ 231 | 5060F473188DAD6E00621460 /* Project object */ = { 232 | isa = PBXProject; 233 | attributes = { 234 | LastUpgradeCheck = 0700; 235 | ORGANIZATIONNAME = McZonk; 236 | TargetAttributes = { 237 | 503BBD3619E264F0002219B6 = { 238 | CreatedOnToolsVersion = 6.1; 239 | }; 240 | }; 241 | }; 242 | buildConfigurationList = 5060F476188DAD6E00621460 /* Build configuration list for PBXProject "CoreMediaPlus-OSX" */; 243 | compatibilityVersion = "Xcode 3.2"; 244 | developmentRegion = English; 245 | hasScannedForEncodings = 0; 246 | knownRegions = ( 247 | en, 248 | ); 249 | mainGroup = 5060F472188DAD6E00621460; 250 | productRefGroup = 5060F47C188DAD6E00621460 /* Products */; 251 | projectDirPath = ""; 252 | projectRoot = ""; 253 | targets = ( 254 | 5060F47A188DAD6E00621460 /* CoreMediaPlus */, 255 | 503BBD3619E264F0002219B6 /* CoreMediaPlusTests */, 256 | ); 257 | }; 258 | /* End PBXProject section */ 259 | 260 | /* Begin PBXResourcesBuildPhase section */ 261 | 503BBD3519E264F0002219B6 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 503BBD4619E26BD6002219B6 /* Baby.wav in Resources */, 266 | 503BBD4419E26738002219B6 /* Baby.m4a in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXSourcesBuildPhase section */ 273 | 503BBD3319E264F0002219B6 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 503BBD3C19E264F0002219B6 /* CMAudioFormatDescription+CMPExtradata.m in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | 5060F477188DAD6E00621460 /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | 509D923718E0093D00FC9A7A /* CMBlockBuffer+CMPData.c in Sources */, 286 | 509D918618DF5EA600FC9A7A /* CMAudioFormatDescription+CMPExtradata.c in Sources */, 287 | 509D924018E0187100FC9A7A /* CMVideoFormatDescription+CMPExtradata.c in Sources */, 288 | 5060B6D7188F117600979779 /* CMPAtoms+Iterate.c in Sources */, 289 | 5060F4B1188DAE0F00621460 /* CMPBlockBuffer+Text.c in Sources */, 290 | 5060B6E41890153F00979779 /* CMPBlockBuffer+Image.c in Sources */, 291 | 502F9B601899233E00A762A1 /* CMPFormatDescription+Text.c in Sources */, 292 | 5060F4B3188DAE0F00621460 /* CMPSampleBuffer+Text.c in Sources */, 293 | 5060B6DE189011BD00979779 /* CMPAtoms.c in Sources */, 294 | 5060B6E11890152900979779 /* CMPSampleBuffer+Image.c in Sources */, 295 | 509D923118DFF79B00FC9A7A /* CMSampleBuffer+CMPDependsOnOthers.c in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | /* End PBXSourcesBuildPhase section */ 300 | 301 | /* Begin PBXTargetDependency section */ 302 | 503BBD3F19E264F0002219B6 /* PBXTargetDependency */ = { 303 | isa = PBXTargetDependency; 304 | target = 5060F47A188DAD6E00621460 /* CoreMediaPlus */; 305 | targetProxy = 503BBD3E19E264F0002219B6 /* PBXContainerItemProxy */; 306 | }; 307 | /* End PBXTargetDependency section */ 308 | 309 | /* Begin XCBuildConfiguration section */ 310 | 503BBD4019E264F0002219B6 /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_UNREACHABLE_CODE = YES; 316 | COMBINE_HIDPI_IMAGES = YES; 317 | ENABLE_STRICT_OBJC_MSGSEND = YES; 318 | FRAMEWORK_SEARCH_PATHS = ( 319 | "$(DEVELOPER_FRAMEWORKS_DIR)", 320 | "$(inherited)", 321 | ); 322 | GCC_PREPROCESSOR_DEFINITIONS = ( 323 | "DEBUG=1", 324 | "$(inherited)", 325 | ); 326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 327 | INFOPLIST_FILE = CoreMediaPlusTests/Info.plist; 328 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 329 | MACOSX_DEPLOYMENT_TARGET = 10.10; 330 | MTL_ENABLE_DEBUG_INFO = YES; 331 | ONLY_ACTIVE_ARCH = YES; 332 | PRODUCT_BUNDLE_IDENTIFIER = "de.mczonk.$(PRODUCT_NAME:rfc1034identifier)"; 333 | PRODUCT_NAME = "$(TARGET_NAME)"; 334 | }; 335 | name = Debug; 336 | }; 337 | 503BBD4119E264F0002219B6 /* Release */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_UNREACHABLE_CODE = YES; 343 | COMBINE_HIDPI_IMAGES = YES; 344 | ENABLE_STRICT_OBJC_MSGSEND = YES; 345 | FRAMEWORK_SEARCH_PATHS = ( 346 | "$(DEVELOPER_FRAMEWORKS_DIR)", 347 | "$(inherited)", 348 | ); 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | INFOPLIST_FILE = CoreMediaPlusTests/Info.plist; 351 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 352 | MACOSX_DEPLOYMENT_TARGET = 10.10; 353 | MTL_ENABLE_DEBUG_INFO = NO; 354 | PRODUCT_BUNDLE_IDENTIFIER = "de.mczonk.$(PRODUCT_NAME:rfc1034identifier)"; 355 | PRODUCT_NAME = "$(TARGET_NAME)"; 356 | }; 357 | name = Release; 358 | }; 359 | 5060F49D188DAD6E00621460 /* Debug */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | ALWAYS_SEARCH_USER_PATHS = NO; 363 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 364 | CLANG_CXX_LIBRARY = "libc++"; 365 | CLANG_WARN_BOOL_CONVERSION = YES; 366 | CLANG_WARN_CONSTANT_CONVERSION = YES; 367 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 368 | CLANG_WARN_EMPTY_BODY = YES; 369 | CLANG_WARN_ENUM_CONVERSION = YES; 370 | CLANG_WARN_INT_CONVERSION = YES; 371 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 372 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 373 | COPY_PHASE_STRIP = NO; 374 | ENABLE_TESTABILITY = YES; 375 | GCC_C_LANGUAGE_STANDARD = gnu99; 376 | GCC_DYNAMIC_NO_PIC = NO; 377 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 378 | GCC_OPTIMIZATION_LEVEL = 0; 379 | GCC_PREPROCESSOR_DEFINITIONS = ( 380 | "DEBUG=1", 381 | "$(inherited)", 382 | ); 383 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | MACOSX_DEPLOYMENT_TARGET = 10.9; 391 | ONLY_ACTIVE_ARCH = YES; 392 | SDKROOT = macosx; 393 | SKIP_INSTALL = YES; 394 | }; 395 | name = Debug; 396 | }; 397 | 5060F49E188DAD6E00621460 /* Release */ = { 398 | isa = XCBuildConfiguration; 399 | buildSettings = { 400 | ALWAYS_SEARCH_USER_PATHS = NO; 401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 402 | CLANG_CXX_LIBRARY = "libc++"; 403 | CLANG_WARN_BOOL_CONVERSION = YES; 404 | CLANG_WARN_CONSTANT_CONVERSION = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_EMPTY_BODY = YES; 407 | CLANG_WARN_ENUM_CONVERSION = YES; 408 | CLANG_WARN_INT_CONVERSION = YES; 409 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 410 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 411 | COPY_PHASE_STRIP = YES; 412 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 413 | ENABLE_NS_ASSERTIONS = NO; 414 | GCC_C_LANGUAGE_STANDARD = gnu99; 415 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 416 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 417 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 418 | GCC_WARN_UNDECLARED_SELECTOR = YES; 419 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 420 | GCC_WARN_UNUSED_FUNCTION = YES; 421 | GCC_WARN_UNUSED_VARIABLE = YES; 422 | MACOSX_DEPLOYMENT_TARGET = 10.9; 423 | SDKROOT = macosx; 424 | SKIP_INSTALL = YES; 425 | }; 426 | name = Release; 427 | }; 428 | 5060F4A0188DAD6E00621460 /* Debug */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | COMBINE_HIDPI_IMAGES = YES; 432 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 433 | GCC_PREFIX_HEADER = "CoreMediaPlus-Prefix.pch"; 434 | PRODUCT_NAME = "$(TARGET_NAME)"; 435 | }; 436 | name = Debug; 437 | }; 438 | 5060F4A1188DAD6E00621460 /* Release */ = { 439 | isa = XCBuildConfiguration; 440 | buildSettings = { 441 | COMBINE_HIDPI_IMAGES = YES; 442 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 443 | GCC_PREFIX_HEADER = "CoreMediaPlus-Prefix.pch"; 444 | PRODUCT_NAME = "$(TARGET_NAME)"; 445 | }; 446 | name = Release; 447 | }; 448 | /* End XCBuildConfiguration section */ 449 | 450 | /* Begin XCConfigurationList section */ 451 | 503BBD4219E264F0002219B6 /* Build configuration list for PBXNativeTarget "CoreMediaPlusTests" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | 503BBD4019E264F0002219B6 /* Debug */, 455 | 503BBD4119E264F0002219B6 /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | 5060F476188DAD6E00621460 /* Build configuration list for PBXProject "CoreMediaPlus-OSX" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | 5060F49D188DAD6E00621460 /* Debug */, 464 | 5060F49E188DAD6E00621460 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | 5060F49F188DAD6E00621460 /* Build configuration list for PBXNativeTarget "CoreMediaPlus" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | 5060F4A0188DAD6E00621460 /* Debug */, 473 | 5060F4A1188DAD6E00621460 /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = 5060F473188DAD6E00621460 /* Project object */; 481 | } 482 | -------------------------------------------------------------------------------- /CoreMediaPlus-OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CoreMediaPlus-Prefix.pch: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /CoreMediaPlus-iOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 500C2592189A8E4E0062DB0E /* CMPAtoms.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C2584189A8E4E0062DB0E /* CMPAtoms.c */; }; 11 | 500C2593189A8E4E0062DB0E /* CMPAtoms+Iterate.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C2586189A8E4E0062DB0E /* CMPAtoms+Iterate.c */; }; 12 | 500C2594189A8E4E0062DB0E /* CMPBlockBuffer+Image.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C2588189A8E4E0062DB0E /* CMPBlockBuffer+Image.c */; }; 13 | 500C2595189A8E4E0062DB0E /* CMPBlockBuffer+Text.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C258A189A8E4E0062DB0E /* CMPBlockBuffer+Text.c */; }; 14 | 500C2596189A8E4E0062DB0E /* CMPFormatDescription+Text.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C258C189A8E4E0062DB0E /* CMPFormatDescription+Text.c */; }; 15 | 500C2597189A8E4E0062DB0E /* CMPSampleBuffer+Image.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C258E189A8E4E0062DB0E /* CMPSampleBuffer+Image.c */; }; 16 | 500C2598189A8E4E0062DB0E /* CMPSampleBuffer+Text.c in Sources */ = {isa = PBXBuildFile; fileRef = 500C2590189A8E4E0062DB0E /* CMPSampleBuffer+Text.c */; }; 17 | 503BBD4919E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.c in Sources */ = {isa = PBXBuildFile; fileRef = 503BBD4719E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.c */; }; 18 | 509D918C18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.c in Sources */ = {isa = PBXBuildFile; fileRef = 509D918A18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.c */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 500C2559189A8D870062DB0E /* libCoreMediaPlus.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCoreMediaPlus.a; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 500C255C189A8D870062DB0E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 24 | 500C2560189A8D870062DB0E /* CoreMediaPlus-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CoreMediaPlus-Prefix.pch"; sourceTree = ""; }; 25 | 500C2561189A8D870062DB0E /* CoreMediaPlus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreMediaPlus.h; sourceTree = ""; }; 26 | 500C256A189A8D870062DB0E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 27 | 500C256D189A8D870062DB0E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 28 | 500C2582189A8E230062DB0E /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 29 | 500C2584189A8E4E0062DB0E /* CMPAtoms.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CMPAtoms.c; sourceTree = ""; }; 30 | 500C2585189A8E4E0062DB0E /* CMPAtoms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMPAtoms.h; sourceTree = ""; }; 31 | 500C2586189A8E4E0062DB0E /* CMPAtoms+Iterate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPAtoms+Iterate.c"; sourceTree = ""; }; 32 | 500C2587189A8E4E0062DB0E /* CMPAtoms+Iterate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPAtoms+Iterate.h"; sourceTree = ""; }; 33 | 500C2588189A8E4E0062DB0E /* CMPBlockBuffer+Image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPBlockBuffer+Image.c"; sourceTree = ""; }; 34 | 500C2589189A8E4E0062DB0E /* CMPBlockBuffer+Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPBlockBuffer+Image.h"; sourceTree = ""; }; 35 | 500C258A189A8E4E0062DB0E /* CMPBlockBuffer+Text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPBlockBuffer+Text.c"; sourceTree = ""; }; 36 | 500C258B189A8E4E0062DB0E /* CMPBlockBuffer+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPBlockBuffer+Text.h"; sourceTree = ""; }; 37 | 500C258C189A8E4E0062DB0E /* CMPFormatDescription+Text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPFormatDescription+Text.c"; sourceTree = ""; }; 38 | 500C258D189A8E4E0062DB0E /* CMPFormatDescription+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPFormatDescription+Text.h"; sourceTree = ""; }; 39 | 500C258E189A8E4E0062DB0E /* CMPSampleBuffer+Image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPSampleBuffer+Image.c"; sourceTree = ""; }; 40 | 500C258F189A8E4E0062DB0E /* CMPSampleBuffer+Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPSampleBuffer+Image.h"; sourceTree = ""; }; 41 | 500C2590189A8E4E0062DB0E /* CMPSampleBuffer+Text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPSampleBuffer+Text.c"; sourceTree = ""; }; 42 | 500C2591189A8E4E0062DB0E /* CMPSampleBuffer+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPSampleBuffer+Text.h"; sourceTree = ""; }; 43 | 503BBD4719E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMVideoFormatDescription+CMPExtradata.c"; sourceTree = ""; }; 44 | 503BBD4819E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMVideoFormatDescription+CMPExtradata.h"; sourceTree = ""; }; 45 | 503BBD7C19E281E4002219B6 /* CMPErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMPErrors.h; sourceTree = ""; }; 46 | 509D918A18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "CMPAudioFormatDescription+Extradata.c"; sourceTree = ""; }; 47 | 509D918B18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CMPAudioFormatDescription+Extradata.h"; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXGroup section */ 51 | 500C2550189A8D870062DB0E = { 52 | isa = PBXGroup; 53 | children = ( 54 | 500C255E189A8D870062DB0E /* CoreMediaPlus */, 55 | 500C255B189A8D870062DB0E /* Frameworks */, 56 | 500C255A189A8D870062DB0E /* Products */, 57 | ); 58 | sourceTree = ""; 59 | }; 60 | 500C255A189A8D870062DB0E /* Products */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 500C2559189A8D870062DB0E /* libCoreMediaPlus.a */, 64 | ); 65 | name = Products; 66 | sourceTree = ""; 67 | }; 68 | 500C255B189A8D870062DB0E /* Frameworks */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 500C2582189A8E230062DB0E /* CoreMedia.framework */, 72 | 500C255C189A8D870062DB0E /* Foundation.framework */, 73 | 500C256A189A8D870062DB0E /* XCTest.framework */, 74 | 500C256D189A8D870062DB0E /* UIKit.framework */, 75 | ); 76 | name = Frameworks; 77 | sourceTree = ""; 78 | }; 79 | 500C255E189A8D870062DB0E /* CoreMediaPlus */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 500C2560189A8D870062DB0E /* CoreMediaPlus-Prefix.pch */, 83 | 500C2561189A8D870062DB0E /* CoreMediaPlus.h */, 84 | 500C2585189A8E4E0062DB0E /* CMPAtoms.h */, 85 | 500C2584189A8E4E0062DB0E /* CMPAtoms.c */, 86 | 500C2587189A8E4E0062DB0E /* CMPAtoms+Iterate.h */, 87 | 500C2586189A8E4E0062DB0E /* CMPAtoms+Iterate.c */, 88 | 509D918B18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.h */, 89 | 509D918A18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.c */, 90 | 500C2589189A8E4E0062DB0E /* CMPBlockBuffer+Image.h */, 91 | 500C2588189A8E4E0062DB0E /* CMPBlockBuffer+Image.c */, 92 | 500C258B189A8E4E0062DB0E /* CMPBlockBuffer+Text.h */, 93 | 500C258A189A8E4E0062DB0E /* CMPBlockBuffer+Text.c */, 94 | 503BBD7C19E281E4002219B6 /* CMPErrors.h */, 95 | 500C258D189A8E4E0062DB0E /* CMPFormatDescription+Text.h */, 96 | 500C258C189A8E4E0062DB0E /* CMPFormatDescription+Text.c */, 97 | 500C258F189A8E4E0062DB0E /* CMPSampleBuffer+Image.h */, 98 | 500C258E189A8E4E0062DB0E /* CMPSampleBuffer+Image.c */, 99 | 500C2591189A8E4E0062DB0E /* CMPSampleBuffer+Text.h */, 100 | 500C2590189A8E4E0062DB0E /* CMPSampleBuffer+Text.c */, 101 | 503BBD4819E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.h */, 102 | 503BBD4719E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.c */, 103 | ); 104 | name = CoreMediaPlus; 105 | sourceTree = SOURCE_ROOT; 106 | }; 107 | /* End PBXGroup section */ 108 | 109 | /* Begin PBXNativeTarget section */ 110 | 500C2558189A8D870062DB0E /* CoreMediaPlus */ = { 111 | isa = PBXNativeTarget; 112 | buildConfigurationList = 500C257C189A8D870062DB0E /* Build configuration list for PBXNativeTarget "CoreMediaPlus" */; 113 | buildPhases = ( 114 | 500C2555189A8D870062DB0E /* Sources */, 115 | ); 116 | buildRules = ( 117 | ); 118 | dependencies = ( 119 | ); 120 | name = CoreMediaPlus; 121 | productName = CoreMediaPlus; 122 | productReference = 500C2559189A8D870062DB0E /* libCoreMediaPlus.a */; 123 | productType = "com.apple.product-type.library.static"; 124 | }; 125 | /* End PBXNativeTarget section */ 126 | 127 | /* Begin PBXProject section */ 128 | 500C2551189A8D870062DB0E /* Project object */ = { 129 | isa = PBXProject; 130 | attributes = { 131 | LastUpgradeCheck = 0610; 132 | ORGANIZATIONNAME = McZonk; 133 | }; 134 | buildConfigurationList = 500C2554189A8D870062DB0E /* Build configuration list for PBXProject "CoreMediaPlus-iOS" */; 135 | compatibilityVersion = "Xcode 3.2"; 136 | developmentRegion = English; 137 | hasScannedForEncodings = 0; 138 | knownRegions = ( 139 | en, 140 | ); 141 | mainGroup = 500C2550189A8D870062DB0E; 142 | productRefGroup = 500C255A189A8D870062DB0E /* Products */; 143 | projectDirPath = ""; 144 | projectRoot = ""; 145 | targets = ( 146 | 500C2558189A8D870062DB0E /* CoreMediaPlus */, 147 | ); 148 | }; 149 | /* End PBXProject section */ 150 | 151 | /* Begin PBXSourcesBuildPhase section */ 152 | 500C2555189A8D870062DB0E /* Sources */ = { 153 | isa = PBXSourcesBuildPhase; 154 | buildActionMask = 2147483647; 155 | files = ( 156 | 500C2593189A8E4E0062DB0E /* CMPAtoms+Iterate.c in Sources */, 157 | 500C2596189A8E4E0062DB0E /* CMPFormatDescription+Text.c in Sources */, 158 | 500C2592189A8E4E0062DB0E /* CMPAtoms.c in Sources */, 159 | 500C2598189A8E4E0062DB0E /* CMPSampleBuffer+Text.c in Sources */, 160 | 500C2594189A8E4E0062DB0E /* CMPBlockBuffer+Image.c in Sources */, 161 | 500C2597189A8E4E0062DB0E /* CMPSampleBuffer+Image.c in Sources */, 162 | 509D918C18DF636900FC9A7A /* CMPAudioFormatDescription+Extradata.c in Sources */, 163 | 500C2595189A8E4E0062DB0E /* CMPBlockBuffer+Text.c in Sources */, 164 | 503BBD4919E26DC2002219B6 /* CMVideoFormatDescription+CMPExtradata.c in Sources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXSourcesBuildPhase section */ 169 | 170 | /* Begin XCBuildConfiguration section */ 171 | 500C257A189A8D870062DB0E /* Debug */ = { 172 | isa = XCBuildConfiguration; 173 | buildSettings = { 174 | ALWAYS_SEARCH_USER_PATHS = NO; 175 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 176 | CLANG_CXX_LIBRARY = "libc++"; 177 | CLANG_ENABLE_MODULES = YES; 178 | CLANG_ENABLE_OBJC_ARC = YES; 179 | CLANG_WARN_BOOL_CONVERSION = YES; 180 | CLANG_WARN_CONSTANT_CONVERSION = YES; 181 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 182 | CLANG_WARN_EMPTY_BODY = YES; 183 | CLANG_WARN_ENUM_CONVERSION = YES; 184 | CLANG_WARN_INT_CONVERSION = YES; 185 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 186 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 187 | COPY_PHASE_STRIP = NO; 188 | GCC_C_LANGUAGE_STANDARD = gnu99; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_OPTIMIZATION_LEVEL = 0; 191 | GCC_PREPROCESSOR_DEFINITIONS = ( 192 | "DEBUG=1", 193 | "$(inherited)", 194 | ); 195 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 203 | ONLY_ACTIVE_ARCH = YES; 204 | SDKROOT = iphoneos; 205 | SKIP_INSTALL = YES; 206 | }; 207 | name = Debug; 208 | }; 209 | 500C257B189A8D870062DB0E /* Release */ = { 210 | isa = XCBuildConfiguration; 211 | buildSettings = { 212 | ALWAYS_SEARCH_USER_PATHS = NO; 213 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 214 | CLANG_CXX_LIBRARY = "libc++"; 215 | CLANG_ENABLE_MODULES = YES; 216 | CLANG_ENABLE_OBJC_ARC = YES; 217 | CLANG_WARN_BOOL_CONVERSION = YES; 218 | CLANG_WARN_CONSTANT_CONVERSION = YES; 219 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 220 | CLANG_WARN_EMPTY_BODY = YES; 221 | CLANG_WARN_ENUM_CONVERSION = YES; 222 | CLANG_WARN_INT_CONVERSION = YES; 223 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 224 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 225 | COPY_PHASE_STRIP = YES; 226 | ENABLE_NS_ASSERTIONS = NO; 227 | GCC_C_LANGUAGE_STANDARD = gnu99; 228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 230 | GCC_WARN_UNDECLARED_SELECTOR = YES; 231 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 232 | GCC_WARN_UNUSED_FUNCTION = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 235 | SDKROOT = iphoneos; 236 | SKIP_INSTALL = YES; 237 | VALIDATE_PRODUCT = YES; 238 | }; 239 | name = Release; 240 | }; 241 | 500C257D189A8D870062DB0E /* Debug */ = { 242 | isa = XCBuildConfiguration; 243 | buildSettings = { 244 | DSTROOT = /tmp/CoreMediaPlus.dst; 245 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 246 | GCC_PREFIX_HEADER = "CoreMediaPlus-Prefix.pch"; 247 | OTHER_LDFLAGS = "-ObjC"; 248 | PRODUCT_NAME = "$(TARGET_NAME)"; 249 | }; 250 | name = Debug; 251 | }; 252 | 500C257E189A8D870062DB0E /* Release */ = { 253 | isa = XCBuildConfiguration; 254 | buildSettings = { 255 | DSTROOT = /tmp/CoreMediaPlus.dst; 256 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 257 | GCC_PREFIX_HEADER = "CoreMediaPlus-Prefix.pch"; 258 | OTHER_LDFLAGS = "-ObjC"; 259 | PRODUCT_NAME = "$(TARGET_NAME)"; 260 | }; 261 | name = Release; 262 | }; 263 | /* End XCBuildConfiguration section */ 264 | 265 | /* Begin XCConfigurationList section */ 266 | 500C2554189A8D870062DB0E /* Build configuration list for PBXProject "CoreMediaPlus-iOS" */ = { 267 | isa = XCConfigurationList; 268 | buildConfigurations = ( 269 | 500C257A189A8D870062DB0E /* Debug */, 270 | 500C257B189A8D870062DB0E /* Release */, 271 | ); 272 | defaultConfigurationIsVisible = 0; 273 | defaultConfigurationName = Release; 274 | }; 275 | 500C257C189A8D870062DB0E /* Build configuration list for PBXNativeTarget "CoreMediaPlus" */ = { 276 | isa = XCConfigurationList; 277 | buildConfigurations = ( 278 | 500C257D189A8D870062DB0E /* Debug */, 279 | 500C257E189A8D870062DB0E /* Release */, 280 | ); 281 | defaultConfigurationIsVisible = 0; 282 | defaultConfigurationName = Release; 283 | }; 284 | /* End XCConfigurationList section */ 285 | }; 286 | rootObject = 500C2551189A8D870062DB0E /* Project object */; 287 | } 288 | -------------------------------------------------------------------------------- /CoreMediaPlus-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CoreMediaPlus.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import 4 | 5 | #import 6 | 7 | #import 8 | #import 9 | #import 10 | 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #import 17 | 18 | #import 19 | -------------------------------------------------------------------------------- /CoreMediaPlusTests/Baby.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McZonk/CoreMediaPlus/4743fa519b864d7ea13b84f680ab07da9f7f4652/CoreMediaPlusTests/Baby.m4a -------------------------------------------------------------------------------- /CoreMediaPlusTests/Baby.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McZonk/CoreMediaPlus/4743fa519b864d7ea13b84f680ab07da9f7f4652/CoreMediaPlusTests/Baby.wav -------------------------------------------------------------------------------- /CoreMediaPlusTests/CMAudioFormatDescription+CMPExtradata.m: -------------------------------------------------------------------------------- 1 | // 2 | // CoreMediaPlusTests.m 3 | // CoreMediaPlusTests 4 | // 5 | // Created by Maximilian Christ on 06/10/14. 6 | // Copyright (c) 2014 McZonk. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | #import "CMAudioFormatDescription+CMPExtradata.h" 14 | 15 | 16 | @interface CMAudioFormatDescription_CMPExtradata : XCTestCase 17 | 18 | @end 19 | 20 | @implementation CMAudioFormatDescription_CMPExtradata 21 | 22 | - (void)setUp 23 | { 24 | [super setUp]; 25 | } 26 | 27 | - (void)tearDown 28 | { 29 | [super tearDown]; 30 | } 31 | 32 | - (void)testM4A 33 | { 34 | NSBundle *bundle = [NSBundle bundleForClass:self.class]; 35 | XCTAssert(bundle != nil); 36 | 37 | NSURL *URL = [bundle URLForResource:@"Baby" withExtension:@"m4a"]; 38 | XCTAssert(URL != nil); 39 | 40 | AVAsset *asset = [AVAsset assetWithURL:URL]; 41 | XCTAssert(asset != nil); 42 | 43 | AVAssetTrack *track = [asset tracksWithMediaType:AVMediaTypeAudio].firstObject; 44 | XCTAssert(track != nil); 45 | 46 | CMAudioFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)track.formatDescriptions.firstObject; 47 | XCTAssert(formatDescription != nil); 48 | 49 | CFDataRef cfdata = NULL; 50 | OSStatus status = CMPAudioFormatDescriptionCopyExtradata(NULL, formatDescription, &cfdata); 51 | NSData *actualData = CFBridgingRelease(cfdata); 52 | 53 | XCTAssert(status == noErr); 54 | XCTAssert(actualData != nil); 55 | 56 | const uint8_t expectedBytes[] = { 0x11, 0x90 }; 57 | NSData *expectedData = [NSData dataWithBytes:expectedBytes length:sizeof(expectedBytes)]; 58 | 59 | XCTAssertEqualObjects(actualData, expectedData); 60 | } 61 | 62 | - (void)testWAV 63 | { 64 | NSBundle *bundle = [NSBundle bundleForClass:self.class]; 65 | XCTAssert(bundle != nil); 66 | 67 | NSURL *URL = [bundle URLForResource:@"Baby" withExtension:@"wav"]; 68 | XCTAssert(URL != nil); 69 | 70 | AVAsset *asset = [AVAsset assetWithURL:URL]; 71 | XCTAssert(asset != nil); 72 | 73 | AVAssetTrack *track = [asset tracksWithMediaType:AVMediaTypeAudio].firstObject; 74 | XCTAssert(track != nil); 75 | 76 | CMAudioFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)track.formatDescriptions.firstObject; 77 | XCTAssert(formatDescription != nil); 78 | 79 | CFDataRef cfdata = NULL; 80 | OSStatus status = CMPAudioFormatDescriptionCopyExtradata(NULL, formatDescription, &cfdata); 81 | NSData *actualData = CFBridgingRelease(cfdata); 82 | 83 | XCTAssert(status == noErr); 84 | XCTAssert(actualData == nil); // wav doesn't have extra data 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /CoreMediaPlusTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | --------------------------------------------------------------------------------