From 9efda8af8d13cadb8ad3683911a090c5aa0ec855 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 27 Sep 2019 16:29:01 +0200 Subject: [PATCH] ui/prores_aw_handler: Print profile to log --- source/ui/prores_aw_handler.cpp | 8 ++++++++ source/ui/prores_aw_handler.hpp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/source/ui/prores_aw_handler.cpp b/source/ui/prores_aw_handler.cpp index 65eba3d..eeffff6 100644 --- a/source/ui/prores_aw_handler.cpp +++ b/source/ui/prores_aw_handler.cpp @@ -104,3 +104,11 @@ void obsffmpeg::ui::prores_aw_handler::update(obs_data_t* settings, const AVCode { context->profile = static_cast(obs_data_get_int(settings, P_PRORES_PROFILE)); } + +void obsffmpeg::ui::prores_aw_handler::log_options(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) +{ + for (auto ptr = codec->profiles; ptr->profile != FF_PROFILE_UNKNOWN; ptr++) { + if (ptr->profile == static_cast(obs_data_get_int(settings, P_PRORES_PROFILE))) + PLOG_INFO("[%s] Profile: %s", codec->name, ptr->name); + } +} diff --git a/source/ui/prores_aw_handler.hpp b/source/ui/prores_aw_handler.hpp index 0652429..c75e7ec 100644 --- a/source/ui/prores_aw_handler.hpp +++ b/source/ui/prores_aw_handler.hpp @@ -45,6 +45,9 @@ namespace obsffmpeg { virtual void update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) override; + + virtual void log_options(obs_data_t* settings, const AVCodec* codec, + AVCodecContext* context) override; }; } // namespace ui } // namespace obsffmpeg