| 1 | // AVFoundation and Core Media names the app's recording and playback import, which |
| 2 | // arrived in 10.7. 10.6 has none of their classes, so the app never reaches these: it |
| 3 | // opens recordings in the system's player and says recording needs 10.7. |
| 4 | #include <CoreFoundation/CoreFoundation.h> |
| 5 | #include <stddef.h> |
| 6 | |
| 7 | const CFStringRef AVFormatIDKey = CFSTR("AVFormatIDKey"); |
| 8 | const CFStringRef AVSampleRateKey = CFSTR("AVSampleRateKey"); |
| 9 | const CFStringRef AVNumberOfChannelsKey = CFSTR("AVNumberOfChannelsKey"); |
| 10 | const CFStringRef AVLinearPCMBitDepthKey = CFSTR("AVLinearPCMBitDepthKey"); |
| 11 | const CFStringRef AVLinearPCMIsFloatKey = CFSTR("AVLinearPCMIsFloatKey"); |
| 12 | const CFStringRef AVLinearPCMIsBigEndianKey = CFSTR("AVLinearPCMIsBigEndianKey"); |
| 13 | const CFStringRef AVLinearPCMIsNonInterleaved = CFSTR("AVLinearPCMIsNonInterleaved"); |
| 14 | const CFStringRef AVMediaTypeAudio = CFSTR("soun"); |
| 15 | const CFStringRef AVMediaTypeVideo = CFSTR("vide"); |
| 16 | const CFStringRef AVCaptureSessionPreset320x240 = CFSTR("AVCaptureSessionPreset320x240"); |
| 17 | |
| 18 | typedef struct { |
| 19 | long long value; |
| 20 | int timescale; |
| 21 | unsigned flags; |
| 22 | long long epoch; |
| 23 | } CMTime; |
| 24 | |
| 25 | void *CMSampleBufferGetImageBuffer(void *sample) { return NULL; } |
| 26 | void *CMSampleBufferGetDataBuffer(void *sample) { return NULL; } |
| 27 | size_t CMBlockBufferGetDataLength(void *buffer) { return 0; } |
| 28 | int CMBlockBufferCopyDataBytes(void *buffer, size_t offset, size_t length, void *destination) { |
| 29 | return -1; |
| 30 | } |
| 31 | CMTime CMSampleBufferGetPresentationTimeStamp(void *sample) { |
| 32 | CMTime invalid = {0, 0, 0, 0}; |
| 33 | return invalid; |
| 34 | } |