You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
- 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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user