fixed building avfoundation on MacOSX with iOS targets
This commit is contained in:
parent
8a5b6ced1a
commit
f620f1ce57
@ -382,7 +382,10 @@ int CvCaptureCAM::startCaptureDevice(int cameraNum) {
|
|||||||
//TODO: add new interface for setting fps and capturing resolution.
|
//TODO: add new interface for setting fps and capturing resolution.
|
||||||
[mCaptureDecompressedVideoOutput setVideoSettings:pixelBufferOptions];
|
[mCaptureDecompressedVideoOutput setVideoSettings:pixelBufferOptions];
|
||||||
mCaptureDecompressedVideoOutput.alwaysDiscardsLateVideoFrames = YES;
|
mCaptureDecompressedVideoOutput.alwaysDiscardsLateVideoFrames = YES;
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
|
||||||
mCaptureDecompressedVideoOutput.minFrameDuration = CMTimeMake(1, 30);
|
mCaptureDecompressedVideoOutput.minFrameDuration = CMTimeMake(1, 30);
|
||||||
|
#endif
|
||||||
|
|
||||||
//Slow. 1280*720 for iPhone4, iPod back camera. 640*480 for front camera
|
//Slow. 1280*720 for iPhone4, iPod back camera. 640*480 for front camera
|
||||||
//mCaptureSession.sessionPreset = AVCaptureSessionPresetHigh; // fps ~= 5 slow for OpenCV
|
//mCaptureSession.sessionPreset = AVCaptureSessionPresetHigh; // fps ~= 5 slow for OpenCV
|
||||||
@ -1150,8 +1153,10 @@ CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(const char* filename, int
|
|||||||
fileType = [AVFileTypeMPEG4 copy];
|
fileType = [AVFileTypeMPEG4 copy];
|
||||||
}else if ([fileExt isEqualToString:@"m4v"]){
|
}else if ([fileExt isEqualToString:@"m4v"]){
|
||||||
fileType = [AVFileTypeAppleM4V copy];
|
fileType = [AVFileTypeAppleM4V copy];
|
||||||
|
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
|
||||||
}else if ([fileExt isEqualToString:@"3gp"] || [fileExt isEqualToString:@"3gpp"] || [fileExt isEqualToString:@"sdv"] ){
|
}else if ([fileExt isEqualToString:@"3gp"] || [fileExt isEqualToString:@"3gpp"] || [fileExt isEqualToString:@"sdv"] ){
|
||||||
fileType = [AVFileType3GPP copy];
|
fileType = [AVFileType3GPP copy];
|
||||||
|
#endif
|
||||||
} else{
|
} else{
|
||||||
fileType = [AVFileTypeMPEG4 copy]; //default mp4
|
fileType = [AVFileTypeMPEG4 copy]; //default mp4
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user