Commit ca338772 authored by Wieland Morgenstern's avatar Wieland Morgenstern Committed by jeremad

readerControllerTest: new load API with std::list

parent 02b52011
......@@ -113,7 +113,7 @@ void testAsyncLoading() {
ENSURE(preloadedFrames >= numReaders, "Controller init should start pre-loading at least one frame per reader");
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
Input::MetadataChunk metadata;
mtime_t date;
......
......@@ -117,7 +117,7 @@ void testLoadedDate() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
readerController->load(date, frames, audio, metadata);
......@@ -198,7 +198,7 @@ void testLoadedDateWithAudioReader() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
readerController->load(date, frames, audio, metadata);
......@@ -240,7 +240,7 @@ void testSeekWithImage() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
readerController->load(date, frames, audio, metadata);
......@@ -294,7 +294,7 @@ void testEOSAudio() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> status =
......@@ -326,7 +326,7 @@ void testTryAgainAudio() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> status =
......@@ -357,7 +357,7 @@ void testAudioVideoResync() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> status =
......@@ -378,7 +378,7 @@ void testAudioVideoResync() {
}
iBlk++;
}
ENSURE_EQ(date, audio[0][0][0].getTimestamp(), "audio and video should be synchro");
ENSURE_EQ(date, audio.front()[0][0].getTimestamp(), "audio and video should be synchro");
readerController->releaseBuffer(frames);
}
......@@ -421,7 +421,7 @@ void testInputGroups(int fps, ReaderClockResolution clockResolution) {
}
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
Input::MetadataChunk metadata;
......@@ -536,7 +536,7 @@ void testCurrentFrame() {
ENSURE(readerController.status());
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t date;
Input::MetadataChunk metadata;
......@@ -660,7 +660,7 @@ void testAudioVideoSynchro() {
auto readerController = Core::ReaderController::create(*panoDef, *audioPipe, readerFactory);
ENSURE(readerController.status());
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
std::list<Audio::audioBlockGroupMap_t> audio;
mtime_t videoDate;
Input::MetadataChunk metadata;
......@@ -675,11 +675,11 @@ void testAudioVideoSynchro() {
1.5);
ENSURE_EQ(nbAudioBlocksExpected, audio.size(), "Check number of audio blocks at the first load");
// Check that the first audio frame of the audio video group are well synchronized
ENSURE_EQ(videoDate, audio[0].at(audioVideoGrId).at(0).getTimestamp(),
ENSURE_EQ(videoDate, audio.front().at(audioVideoGrId).at(0).getTimestamp(),
"Check audio video synchronization of the audio video group");
ENSURE_EQ(videoDate, audio[0].at(audioVideoGrId).at(1).getTimestamp(),
ENSURE_EQ(videoDate, audio.front().at(audioVideoGrId).at(1).getTimestamp(),
"Check audio video synchronization of the audio video group");
ENSURE_EQ(videoDate, audio[0].at(audioOnlyGrId).at(2).getTimestamp(),
ENSURE_EQ(videoDate, audio.front().at(audioOnlyGrId).at(2).getTimestamp(),
"Check audio video synchronization of the audio video group");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment