Load Json::Value into this object
| 3056 | |
| 3057 | // Load Json::Value into this object |
| 3058 | void FFmpegReader::SetJsonValue(const Json::Value root) { |
| 3059 | |
| 3060 | // Set parent data |
| 3061 | ReaderBase::SetJsonValue(root); |
| 3062 | |
| 3063 | // Set data from Json (if key is found) |
| 3064 | if (!root["path"].isNull()) |
| 3065 | path = root["path"].asString(); |
| 3066 | if (!root["duration_strategy"].isNull()) { |
| 3067 | const std::string strategy = root["duration_strategy"].asString(); |
| 3068 | if (strategy == "VideoPreferred") { |
| 3069 | duration_strategy = DurationStrategy::VideoPreferred; |
| 3070 | } else if (strategy == "AudioPreferred") { |
| 3071 | duration_strategy = DurationStrategy::AudioPreferred; |
| 3072 | } else { |
| 3073 | duration_strategy = DurationStrategy::LongestStream; |
| 3074 | } |
| 3075 | } |
| 3076 | } |
nothing calls this directly
no outgoing calls
no test coverage detected