1

Based on a lot of online references, the way to change resolution is using the following code.

NSDictionary * pixelBufferAttr = [NSDictionary dictionaryWithObjectsAndKeys:
     [NSNumber numberWithInt:320], kCVPixelBufferWidthKey,
     [NSNumber numberWithInt:240], kCVPixelBufferHeightKey,
     [NSNumbernumberWithBool:YES], 
                  (id)kCVPixelBufferOpenGLCompatibilityKey,
     [NSNumber 
        numberWithUnsignedInt:kCVPixelFormatType_422YpCbCr8],
                  (id)kCVPixelBufferPixelFormatTypeKey,
                                        nil];

NSArray *outputsConnected = [mCaptureSession outputs];

QTCaptureVideoPreviewOutput * previewOutput = [outputsConnected objectAtIndex:1];

[previewOutput setDelegate:self];

[previewOutput setPixelBufferAttributes:pixelBufferAttr];

But after changing the resolution, the captureView can see the different, but using code to check the resolution is incorrect.

Does anyone know how to change the device resolution?

Thanks ALL!

jscs
  • 63,694
  • 13
  • 151
  • 195
rocksing
  • 21
  • 1
  • 3
  • Wait a minute: Are you saying that you try to change the attributes of the previewOutput of a `QTCaptureView`? – danyowdee Mar 20 '11 at 19:22
  • Do you know how to change the device resolution, on the internet is only found the method to change the preview output and decompress output, but no actual device. Plx help. – rocksing Mar 25 '11 at 08:40

0 Answers0