65455c27be
This saves scenes/sources from json on exit, and properly loads it back up when starting up the program again, as well as the currently active scene. I had to add a 'load' and 'save' callback to the source interface structure because I realizes that certain sources (such as scenes) operate different with their saved data; scenes for example would have to keep track of their settings information constantly, and that was somewhat unacceptable to make it functional. The optional 'load' callback will be called only after having loaded setttings specifically from file/imported data, and the 'save' function will be called only specifically when data actually needs to be saved. I also had to adjust the obs_scene code so that it's a regular input source type now, and I also modified it so that it doesn't have some strange custom creation code anymore. The obs_scene_create function is now simply just a wrapper for obs_source_create. You could even create a scene with obs_source_create manually as well.