avfvideosrc: check if low preset is available

This commit is contained in:
Matthieu Bouron 2013-10-29 15:36:06 +00:00 committed by Andoni Morales Alastruey
parent 7f807270fa
commit fae79751ad

View file

@ -295,7 +295,8 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
continue;
}
gst_caps_append (result, GST_AVF_CAPS_NEW (gstformat, 192, 144));
if ([session canSetSessionPreset:AVCaptureSessionPresetLow])
gst_caps_append (result, GST_AVF_CAPS_NEW (gstformat, 192, 144));
if ([session canSetSessionPreset:AVCaptureSessionPreset352x288])
gst_caps_append (result, GST_AVF_CAPS_NEW (gstformat, 352, 288));
if ([session canSetSessionPreset:AVCaptureSessionPresetMedium])