- Timestamp:
- Aug 19, 2014 1:37:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-videodev/ios_dev.m
r4853 r4891 568 568 } 569 569 570 AVCaptureDevice *dev = qf->dev_info[param->cap_id].dev; 571 570 572 /* Find the closest supported size */ 571 for(i = 0; i < PJ_ARRAY_SIZE(supported_size)-1; ++i) { 572 if (supported_size[i] >= requested_size) 573 for(i = PJ_ARRAY_SIZE(supported_size)-1; i > 0; --i) { 574 if (![dev supportsAVCaptureSessionPreset: size_preset_str[i]]) 575 continue; 576 if (supported_size[i-1] < requested_size) 573 577 break; 574 578 } … … 584 588 585 589 /* Set frame rate, this may only work on iOS 7 or later */ 586 AVCaptureDevice *dev = qf->dev_info[param->cap_id].dev;587 590 if ([dev respondsToSelector:@selector(activeVideoMinFrameDuration)] && 588 591 [dev lockForConfiguration:NULL])
Note: See TracChangeset
for help on using the changeset viewer.