Not all video connections support deinterlacing?
| Originator: | dgatwood42 | ||
| Number: | rdar://16792266 | Date Originated: | 01-May-2014 |
| Status: | Open | Resolved: | |
| Product: | OS X | Product Version: | 10.9.2/13C1021 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
In using AVCaptureConnection with AVVideoPreviewLayer, I've noticed something peculiar. Connections associated with preview layers return NO from the supportsVideoFieldMode method, even though they are decidedly video-based connections.
I'm seeing this using code derived trivially from your sample code (AVRecorder), so I'm assuming that this is a bug in the implementation rather than a problem in the way I'm using the API.
Steps to Reproduce:
1. Modify AVRecorderDocument.m in the AVRecorder sample code project as shown:
[super windowControllerDidLoadNib:aController];
// Attach preview to session
CALayer *previewViewLayer = [[self previewView] layer];
[previewViewLayer setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
AVCaptureVideoPreviewLayer *newPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:[self session]];
[newPreviewLayer setFrame:[previewViewLayer bounds]];
[newPreviewLayer setAutoresizingMask:kCALayerWidthSizable | kCALayerHeightSizable];
[previewViewLayer addSublayer:newPreviewLayer];
[self setPreviewLayer:newPreviewLayer];
[newPreviewLayer release];
AVCaptureConnection *connection = self.previewLayer.connection;
if (connection.supportsVideoFieldMode) {
NSLog(@"Enabled deinterlacing\n");
[connection setVideoFieldMode:AVVideoFieldModeDeinterlace];
} else {
NSLog(@"Deinterlacing not supported\n");
}
// Start the session
[[self session] startRunning];
// Start updating the audio level meter
[self setAudioLevelTimer:[NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(updateAudioLevels:) userInfo:nil repeats:YES]];
Expected Results:
I expected to find support for deinterlacing during preview.
Actual Results:
Instead, it returns "NO", and won't deinterlace the incoming video.
Version:
10.9.2/13C1021
Notes:
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!