encoders/ffmpeg: Add support for settings migration

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-07-06 00:08:34 +02:00
parent 0c2d56a81a
commit c21f2c32a4
2 changed files with 7 additions and 1 deletions

View file

@ -180,7 +180,11 @@ void ffmpeg_instance::get_properties(obs_properties_t* props)
obs_property_set_enabled(obs_properties_get(props, KEY_FFMPEG_GPU), false);
}
void ffmpeg_instance::migrate(obs_data_t* settings, std::uint64_t version) {}
void ffmpeg_instance::migrate(obs_data_t* settings, std::uint64_t version)
{
if (_handler)
_handler->migrate(settings, version, _codec, _context);
}
bool ffmpeg_instance::update(obs_data_t* settings)
{

View file

@ -60,6 +60,8 @@ namespace streamfx::encoder::ffmpeg {
virtual void get_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context,
bool hw_encode){};
virtual void migrate(obs_data_t* settings, std::uint64_t version, const AVCodec* codec, AVCodecContext* context){};
virtual void update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context){};
virtual void override_update(ffmpeg_instance* instance, obs_data_t* settings){};