mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #21145 from MaximMilashchenko:AudioUpdate
Audio MSMF: added the ability to set sample per second * Audio MSMF: added the ability to set sample per second * changed the valid sampling rate check * fixed docs * add test * fixed warning * fixed error * fixed error
This commit is contained in:
committed by
GitHub
parent
d2f87ca76c
commit
cb08c15616
@@ -281,4 +281,15 @@ TEST(AudioOpenCheck, bad_arg_invalid_audio_stream)
|
||||
ASSERT_FALSE(cap.isOpened());
|
||||
}
|
||||
|
||||
TEST(AudioOpenCheck, bad_arg_invalid_audio_sample_per_second)
|
||||
{
|
||||
std::string fileName = "audio/test_audio.mp4";
|
||||
std::vector<int> params { CAP_PROP_AUDIO_STREAM, 0,
|
||||
CAP_PROP_VIDEO_STREAM, -1,
|
||||
CAP_PROP_AUDIO_SAMPLES_PER_SECOND, (int)1e9 };
|
||||
VideoCapture cap;
|
||||
cap.open(findDataFile(fileName), cv::CAP_MSMF, params);
|
||||
ASSERT_FALSE(cap.isOpened());
|
||||
}
|
||||
|
||||
}} //namespace
|
||||
|
||||
Reference in New Issue
Block a user