Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone AVCaptureVideoDataOutput和设置kCVPixelBufferWidthKey&;kCVPixelBufferHeightKey_Iphone_Ios_Video Capture_Avcapturesession - Fatal编程技术网

Iphone AVCaptureVideoDataOutput和设置kCVPixelBufferWidthKey&;kCVPixelBufferHeightKey

Iphone AVCaptureVideoDataOutput和设置kCVPixelBufferWidthKey&;kCVPixelBufferHeightKey,iphone,ios,video-capture,avcapturesession,Iphone,Ios,Video Capture,Avcapturesession,我试图通过设置kCVPixelBufferWidthKey&kCVPixelBufferHeightKey从AVCaptureVideoDataOutput捕获特定大小的帧 问题是缓冲区的宽度和高度从未改变,它们总是返回852x640 这是我的密码: // Add the video frame output self.videoOutput = [[AVCaptureVideoDataOutput alloc] init]; [videoOutput setAlwaysD

我试图通过设置
kCVPixelBufferWidthKey
&
kCVPixelBufferHeightKey
AVCaptureVideoDataOutput
捕获特定大小的帧 问题是缓冲区的宽度和高度从未改变,它们总是返回852x640

这是我的密码:

// Add the video frame output   
    self.videoOutput = [[AVCaptureVideoDataOutput alloc] init];
    [videoOutput setAlwaysDiscardsLateVideoFrames:YES];
// Use RGB frames instead of YUV to ease color processing
[videoOutput setVideoSettings:[NSDictionary dictionaryWithObjectsAndKeys:
                               [NSNumber numberWithFloat:320.0], (id)kCVPixelBufferWidthKey,
                               [NSNumber numberWithFloat:320.0], (id)kCVPixelBufferHeightKey,
                               [NSNumber numberWithInt:kCVPixelFormatType_32BGRA],(id)kCVPixelBufferPixelFormatTypeKey,
                                                              nil]];
 [videoOutput setSampleBufferDelegate:self queue:dispatch_get_main_queue()];   
编辑:来自iOS AVCaptureOutput。h:当前,唯一支持的密钥是kCVPixelBufferPixelFormatTypeKey


有人知道设置输出缓冲区宽度/高度的工作方法吗

从iOS AVCaptureOutput.h:
当前,唯一支持的密钥是kCVPixelBufferPixelFormatTypeKey。


总而言之。

我希望它能工作——我也可以用它。:-)您好,那么我如何强制视频输出大小?谢谢