これは、O'ReillyLearningOpencvのコードスニペットです。
cvNamedWindow("Example3", CV_WINDOW_AUTOSIZE);
g_capture = cvCreateFileCapture(argv[1]);
int frames = (int) cvGetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_COUNT);
if (frames != 0) {
cvCreateTrackbar("Position", "Example3", &g_slider_postion, frames, onTrackbarSlide);
}
しかし残念ながら、cvGetCapturePropertyは常に0を返します。Yahooでopencvグループを検索したところ、同じ問題が見つかりました。