[Enhancement, Request for information] Project Bin redesign and the Yaml format
Hello kdenlive developers,
At this moment I am working on a project bin rewrite/enhancement. And it's going to be quite a rewrite... I already did some work on it, namely, extension of the available column types with a new column selection dialog and making sub clips and folders accept descriptions as well to make it all more uniform. One thing I had to do is to get rid of the hard coded column type constants scattered around in the code, so I replaced those with a new enum type, ColumnType, and to register descriptions for sub clips and folders I needed to extend the kdenlive file format a bit. But that's not the main reason for this message.
What I want to do next, is to allow sub clips to be referenced at in folders. In this way you can build any (sub) clip collection you want, store the bin/folder content in a file and use it as a shared resource between projects as well which introduces a new way of dealing with libraries, all integrated in the bin. The functionality is already there to have multiple bins display different folders so there you go.
I have been thinking how to implement the sub clip references in folders. And I think what would probably work best, is to introduce a new project item type the ProjectLinkItem, besides the ProjectClip, ProjectSubClip and ProjectFolder items. This link item is actually very simple and will contain a reference to the original ProjectClip/SubClip/Folder. In this way you can delegate most of the functionality, such as painting and dragging onto the timeline to the original items. For example, a sub clip will show up under a folder in exactly the same way as it shows up under it's master clip, because it delegates to the same painter, and dragging such a link item onto the timeline will be exactly the same as dragging the original sub clip onto the timeline because it delegates to the same drag and drop function. This will give it all a uniform look and feel which I think is a good thing.
Now, concerning storing and loading bin/folder content to files I want to move away from the mlt/xml format because I think the Json format is much easier to work with. Also, to introduce an easier way for these bin/folder files to be generated by external software after which you can read them in into kdenlive for further processing. (Let me add that this could also work for timelines but that is for later)
However, there is one disadvantage with Json and that is that it lacks language support for type information. Although you can always encode that as an additional key/value entry.
However, the new YAML format offers all that Json has to offer, and more, and does have language support for type information. And so I am thinking about using the Yaml format for this.
However, while there appears to be a good Yaml library support for Linux, I have actually no idea how that's going to work out on Windows/Mac platforms...
Which brings me to my question: in which way will the Yaml format work for kdenlive outside linux? Although I can imagine that a fallback json format could solve this?
Thanks, Ondrej