You can use the get method of your capture object, as shown below:
capture.get(CV_CAP_PROP_POS_FRAMES);
and:
capture.get(CV_CAP_PROP_FRAME_COUNT);
Btw, these methods return a double value.
You can also use the cvGetCaptureProperty method.
cvGetCaptureProperty (CvCapture * capture, int property_id);
Property_id parameters below with definitions:
CV_CAP_PROP_POS_MSEC 0
CV_CAP_PROP_POS_FRAME 1
CV_CAP_PROP_POS_AVI_RATIO 2
CV_CAP_PROP_FRAME_WIDTH 3
CV_CAP_PROP_FRAME_HEIGHT 4
CV_CAP_PROP_FPS 5
CV_CAP_PROP_FOURCC 6
CV_CAP_PROP_FRAME_COUNT 7
POS_MSEC - , .
POS_FRAME - .
POS_AVI_RATIO - , 0 1 ( , -, ).
FRAME_WIDTH FRAME_HEIGHT -
( ).
FPS , ;
,
.
FOURCC - , , .
FRAME_COUNT , .
( OpenCV)