refactored VideoReader (convert it to abstract interface)

also refactored VideoSource interface (made it simplier, now it has only 2 abstract methods)
This commit is contained in:
Vladislav Vinogradov
2013-06-11 13:05:02 +04:00
parent e9a74c17f8
commit 76211709a3
23 changed files with 616 additions and 728 deletions

View File

@@ -30,8 +30,7 @@ int main(int argc, const char* argv[])
cv::VideoCapture reader(fname);
cv::gpu::GpuMat d_frame;
cv::gpu::VideoReader_GPU d_reader(fname);
d_reader.dumpFormat(std::cout);
cv::Ptr<cv::gpucodec::VideoReader> d_reader = cv::gpucodec::createVideoReader(fname);
cv::TickMeter tm;
std::vector<double> cpu_times;
@@ -46,7 +45,7 @@ int main(int argc, const char* argv[])
cpu_times.push_back(tm.getTimeMilli());
tm.reset(); tm.start();
if (!d_reader.read(d_frame))
if (!d_reader->nextFrame(d_frame))
break;
tm.stop();
gpu_times.push_back(tm.getTimeMilli());