Merge branch 'develop' into std-prefixes

This commit is contained in:
Frank Dana
2019-10-22 21:00:27 -04:00
committed by GitHub
62 changed files with 719 additions and 756 deletions

View File

@@ -94,7 +94,7 @@ void ChunkReader::load_json()
info.has_video = root["has_video"].asBool();
info.has_audio = root["has_audio"].asBool();
info.duration = root["duration"].asDouble();
info.file_size = atoll(root["file_size"].asString().c_str());
info.file_size = std::stoll(root["file_size"].asString());
info.height = root["height"].asInt();
info.width = root["width"].asInt();
info.pixel_format = root["pixel_format"].asInt();
@@ -106,7 +106,7 @@ void ChunkReader::load_json()
info.display_ratio.num = root["display_ratio"]["num"].asInt();
info.display_ratio.den = root["display_ratio"]["den"].asInt();
info.vcodec = root["vcodec"].asString();
info.video_length = atoll(root["video_length"].asString().c_str());
info.video_length = std::stoll(root["video_length"].asString());
info.video_stream_index = root["video_stream_index"].asInt();
info.video_timebase.num = root["video_timebase"]["num"].asInt();
info.video_timebase.den = root["video_timebase"]["den"].asInt();
@@ -292,7 +292,7 @@ void ChunkReader::SetJson(std::string value) {
delete reader;
if (!success)
// Raise exception
throw InvalidJSON("JSON could not be parsed (or is invalid)", "");
throw InvalidJSON("JSON could not be parsed (or is invalid)");
try
{
@@ -302,7 +302,7 @@ void ChunkReader::SetJson(std::string value) {
catch (const std::exception& e)
{
// Error parsing JSON (or missing keys)
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)", "");
throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
}
}
@@ -316,7 +316,7 @@ void ChunkReader::SetJsonValue(Json::Value root) {
if (!root["path"].isNull())
path = root["path"].asString();
if (!root["chunk_size"].isNull())
chunk_size = atoll(root["chunk_size"].asString().c_str());
chunk_size = std::stoll(root["chunk_size"].asString());
if (!root["chunk_version"].isNull())
version = (ChunkVersion) root["chunk_version"].asInt();