Generate Json::Value for this object
| 3017 | |
| 3018 | // Generate Json::Value for this object |
| 3019 | Json::Value FFmpegReader::JsonValue() const { |
| 3020 | |
| 3021 | // Create root json object |
| 3022 | Json::Value root = ReaderBase::JsonValue(); // get parent properties |
| 3023 | root["type"] = "FFmpegReader"; |
| 3024 | root["path"] = path; |
| 3025 | switch (duration_strategy) { |
| 3026 | case DurationStrategy::VideoPreferred: |
| 3027 | root["duration_strategy"] = "VideoPreferred"; |
| 3028 | break; |
| 3029 | case DurationStrategy::AudioPreferred: |
| 3030 | root["duration_strategy"] = "AudioPreferred"; |
| 3031 | break; |
| 3032 | case DurationStrategy::LongestStream: |
| 3033 | default: |
| 3034 | root["duration_strategy"] = "LongestStream"; |
| 3035 | break; |
| 3036 | } |
| 3037 | |
| 3038 | // return JsonValue |
| 3039 | return root; |
| 3040 | } |
| 3041 | |
| 3042 | // Load JSON string into this object |
| 3043 | void FFmpegReader::SetJson(const std::string value) { |
nothing calls this directly
no outgoing calls
no test coverage detected