You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user