mirror of
https://github.com/zakk4223/CocoaSplit.git
synced 2026-05-15 14:15:50 -06:00
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.
22 lines
745 B
Objective-C
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
|