Verbose error reporting on setting custom field values #16

Merged
kryztoval merged 2 commits from v0.4-custom-field-reporting into v0.4 2019-11-11 19:48:13 +01:00
+3 -2
View File
@@ -1003,8 +1003,9 @@ bool obsffmpeg::encoder::update(obs_data_t* settings)
if ((ret = av_opt_set(_context, key.c_str(), value.c_str(),
Xaymar commented 2019-11-10 08:16:44 +01:00 (Migrated from github.com)
Review

No need to log setting options as a warning, we only need to know when things haven't been set. Remove this part.

No need to log setting options as a warning, we only need to know when things haven't been set. Remove this part.
kryztoval commented 2019-11-10 08:35:47 +01:00 (Migrated from github.com)
Review

I kinda like when it shows what was actually applied from the list that was passed, because it may get stick together. What if I leave it commented out (the whole else) so if needed for debugging it can be enabled. No?

I kinda like when it shows what was actually applied from the list that was passed, because it may get stick together. What if I leave it commented out (the whole else) so if needed for debugging it can be enabled. No?
Xaymar commented 2019-11-10 11:34:52 +01:00 (Migrated from github.com)
Review

No, if you were debugging you would already have knowledge about it anyway (FFmpeg logs to the debug output if enabled). For an end user, only the failed options need to be known.

No, if you were debugging you would already have knowledge about it anyway (FFmpeg logs to the debug output if enabled). For an end user, only the failed options need to be known.
AV_OPT_SEARCH_CHILDREN))
< 0) {
PLOG_WARNING("Option '%s' could not be set to '%s'.",
key.c_str(), value.c_str());
char sterror[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(sterror, AV_ERROR_MAX_STRING_SIZE, ret);
PLOG_WARNING("Option '%s' could not be set to '%s'. (%s)", key.c_str(), value.c_str(), sterror);
}
have_param = false;
have_key = false;