mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
added video stream positioning in QTKit-based VideoCapture backend (patch #1420)
This commit is contained in:
parent
a4f5216d52
commit
38f686252c
@ -864,6 +864,17 @@ bool CvCaptureFile::setProperty(int property_id, double value) {
|
||||
case CV_CAP_PROP_FPS:
|
||||
//etval = currentFPS;
|
||||
break;
|
||||
case CV_CAP_PROP_FRAME_COUNT:
|
||||
{
|
||||
NSArray *videoTracks = [mCaptureSession tracksOfMediaType:QTMediaTypeVideo];
|
||||
if ([videoTracks count] > 0) {
|
||||
QTMedia *media = [[videoTracks objectAtIndex:0] media];
|
||||
retval = [[media attributeForKey:QTMediaSampleCountAttribute] longValue];
|
||||
} else {
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CV_CAP_PROP_FOURCC:
|
||||
default:
|
||||
retval = false;
|
||||
|
Loading…
Reference in New Issue
Block a user