1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #20942 from MaximMilashchenko:AudioPatch

Audio patch

* fixed microphone, audio position

* fixed docs

* changed AudioOpenCheck
This commit is contained in:
MaximMilashchenko
2021-10-26 17:33:53 +03:00
committed by GitHub
parent 017a4e7c30
commit 0a71063530
2 changed files with 104 additions and 75 deletions
+11
View File
@@ -270,4 +270,15 @@ TEST_P(Media, audio)
INSTANTIATE_TEST_CASE_P(/**/, Media, testing::ValuesIn(mediaParams));
TEST(AudioOpenCheck, bad_arg_invalid_audio_stream)
{
std::string fileName = "audio/test_audio.mp4";
std::vector<int> params { CAP_PROP_AUDIO_STREAM, 1,
CAP_PROP_VIDEO_STREAM, 0,
CAP_PROP_AUDIO_DATA_DEPTH, CV_16S };
VideoCapture cap;
cap.open(findDataFile(fileName), cv::CAP_MSMF, params);
ASSERT_FALSE(cap.isOpened());
}
}} //namespace