Windows now passes most unit tests. Added header macro to assist on passing correct test media paths to unit tests. Also added a new info parameter has_single_image, which is used to optomize the frame mapper class for images with long durations.

This commit is contained in:
Jonathan Thomas
2015-09-28 22:05:50 -05:00
parent 32d41e780d
commit 66c5ced902
17 changed files with 201 additions and 70 deletions

View File

@@ -35,6 +35,7 @@ ReaderBase::ReaderBase()
// Initialize info struct
info.has_video = false;
info.has_audio = false;
info.has_single_image = false;
info.duration = 0.0;
info.file_size = 0;
info.height = 0;
@@ -140,6 +141,7 @@ void ReaderBase::DisplayInfo() {
cout << "----------------------------" << endl;
cout << "--> Has Video: " << info.has_video << endl;
cout << "--> Has Audio: " << info.has_audio << endl;
cout << "--> Has Single Image: " << info.has_single_image << endl;
cout << "--> Duration: " << info.duration << " Seconds" << endl;
cout << "--> File Size: " << double(info.file_size) / 1024 / 1024 << " MB" << endl;
cout << "----------------------------" << endl;
@@ -178,6 +180,7 @@ Json::Value ReaderBase::JsonValue() {
Json::Value root;
root["has_video"] = info.has_video;
root["has_audio"] = info.has_audio;
root["has_single_image"] = info.has_single_image;
root["duration"] = info.duration;
stringstream filesize_stream;
filesize_stream << info.file_size;
@@ -227,6 +230,8 @@ void ReaderBase::SetJsonValue(Json::Value root) {
info.has_video = root["has_video"].asBool();
if (!root["has_audio"].isNull())
info.has_audio = root["has_audio"].asBool();
if (!root["has_single_image"].isNull())
info.has_single_image = root["has_single_image"].asBool();
if (!root["duration"].isNull())
info.duration = root["duration"].asDouble();
if (!root["file_size"].isNull())