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:
|
case CV_CAP_PROP_FPS:
|
||||||
//etval = currentFPS;
|
//etval = currentFPS;
|
||||||
break;
|
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:
|
case CV_CAP_PROP_FOURCC:
|
||||||
default:
|
default:
|
||||||
retval = false;
|
retval = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user