MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / JsonValue

Method JsonValue

src/FFmpegReader.cpp:3019–3040  ·  view source on GitHub ↗

Generate Json::Value for this object

Source from the content-addressed store, hash-verified

3017
3018// Generate Json::Value for this object
3019Json::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
3043void FFmpegReader::SetJson(const std::string value) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected