- Clip reader init should consider paths with a % to use FFmpegReader by default (i.e. image sequences)

- FFmpegReader info struct should not be initialized during Open() after it is initially populated - so our SetJson() method can properly override it's values
- FrameMapper Json() method should include it's mapped Reader JSON - even though it is not yet possible to read it back in yet
- New unit tests for Timeline ApplyJsonDiff, and verification that we can override FFmpegReader info struct (i.e. updating FPS, time bases, etc...)
- Some whitespace fixes
This commit is contained in:
Jonathan Thomas
2023-02-13 16:42:21 -06:00
parent 2f08ac0c1c
commit 52a9e3be5d
4 changed files with 158 additions and 63 deletions

View File

@@ -727,6 +727,9 @@ Json::Value FrameMapper::JsonValue() const {
// Create root json object
Json::Value root = ReaderBase::JsonValue(); // get parent properties
root["type"] = "FrameMapper";
if (reader) {
root["reader"] = reader->JsonValue();
}
// return JsonValue
return root;
@@ -741,6 +744,12 @@ void FrameMapper::SetJson(const std::string value) {
const Json::Value root = openshot::stringToJson(value);
// Set all values that match
SetJsonValue(root);
if (!root["reader"].isNull()) // does Json contain a reader?
{
// Placeholder to load reader
// TODO: need a createReader method for this and Clip JSON methods
}
}
catch (const std::exception& e)
{