Skip to content

Commit

Permalink
Promote cv::VideoCapture properties in VideoReader.
Browse files Browse the repository at this point in the history
  • Loading branch information
asmorkalov committed Apr 27, 2023
1 parent 960b3f6 commit 5efb784
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions modules/cudacodec/src/ffmpeg_video_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,8 @@ void cv::cudacodec::detail::FFmpegVideoSource::updateFormat(const FormatInfo& vi

bool cv::cudacodec::detail::FFmpegVideoSource::get(const int propertyId, double& propertyVal) const
{
CV_Assert(videoCaptureParams.size() % 2 == 0);
for (std::size_t i = 0; i < videoCaptureParams.size(); i += 2) {
if (videoCaptureParams.at(i) == propertyId) {
propertyVal = videoCaptureParams.at(i + 1);
return true;
}
}
return false;
propertyVal = cap.get(propertyId);
return propertyVal != 0.;
}

bool cv::cudacodec::detail::FFmpegVideoSource::getNextPacket(unsigned char** data, size_t* size)
Expand Down
1 change: 1 addition & 0 deletions modules/cudacodec/test/test_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ CUDA_TEST_P(TransCode, H264ToH265)
}

INSTANTIATE_TEST_CASE_P(CUDA_Codec, TransCode, ALL_DEVICES);

#endif

#if defined(HAVE_NVCUVENC)
Expand Down

0 comments on commit 5efb784

Please sign in to comment.