CocoaSplit/AVCaptureDeviceFormat+CocoaSplitAdditions.m
Zakk c59095d0e5 Added format and framerate selectors for AVFoundation capture devices. This is mostly so Blackmagic devices work without resorting to the QTCapture type.
Did some changing of how capture types/devices are handled internally, and how settings are changed.
Moved to an event driven model instead of a timer. Frames are now processed as soon as the capture device/API provides them.
2013-02-01 03:02:23 -05:00

22 lines
745 B
Objective-C

//
// AVCaptureDeviceFormat+CocoaSplitAdditions.m
// CocoaSplit
//
// Created by Zakk on 1/19/13.
// Copyright (c) 2013 Zakk. All rights reserved.
//
#import "AVCaptureDeviceFormat+CocoaSplitAdditions.h"
@implementation AVCaptureDeviceFormat (CocoaSplitAdditions)
-(NSString *)localizedName
{
NSString *localizedName = nil;
CFStringRef formatName = CMFormatDescriptionGetExtension([self formatDescription], kCMFormatDescriptionExtension_FormatName);
CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions((CMVideoFormatDescriptionRef)[self formatDescription]);
localizedName = [NSString stringWithFormat:@"%@, %d x %d", formatName, dimensions.width, dimensions.height];
return localizedName;
}
@end