mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-15 08:15:06 +00:00
common: Rename LOG_ to DLOG_ to avoid macro confusion
This commit is contained in:
parent
c9c6f1803d
commit
fd22746c98
26 changed files with 249 additions and 249 deletions
|
@ -85,11 +85,11 @@ extern "C" {
|
||||||
|
|
||||||
// Common Global defines
|
// Common Global defines
|
||||||
/// Logging
|
/// Logging
|
||||||
#define LOG_(level, ...) blog(level, "[" PLUGIN_NAME "] " __VA_ARGS__)
|
#define DLOG_(level, ...) blog(level, "[" PLUGIN_NAME "] " __VA_ARGS__)
|
||||||
#define LOG_ERROR(...) LOG_(LOG_ERROR, __VA_ARGS__)
|
#define DLOG_ERROR(...) DLOG_(LOG_ERROR, __VA_ARGS__)
|
||||||
#define LOG_WARNING(...) LOG_(LOG_WARNING, __VA_ARGS__)
|
#define DLOG_WARNING(...) DLOG_(LOG_WARNING, __VA_ARGS__)
|
||||||
#define LOG_INFO(...) LOG_(LOG_INFO, __VA_ARGS__)
|
#define DLOG_INFO(...) DLOG_(LOG_INFO, __VA_ARGS__)
|
||||||
#define LOG_DEBUG(...) LOG_(LOG_DEBUG, __VA_ARGS__)
|
#define DLOG_DEBUG(...) DLOG_(LOG_DEBUG, __VA_ARGS__)
|
||||||
/// Currrent function name (as const char*)
|
/// Currrent function name (as const char*)
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Microsoft Visual Studio
|
// Microsoft Visual Studio
|
||||||
|
|
|
@ -37,7 +37,7 @@ streamfx::configuration::~configuration()
|
||||||
throw std::exception();
|
throw std::exception();
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Failed to save configuration, next start will be using defaults or backed up configuration.");
|
DLOG_ERROR("Failed to save configuration, next start will be using defaults or backed up configuration.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ ffmpeg_instance::ffmpeg_instance(obs_data_t* settings, obs_encoder_t* self)
|
||||||
// Initialize context.
|
// Initialize context.
|
||||||
_context = avcodec_alloc_context3(_codec);
|
_context = avcodec_alloc_context3(_codec);
|
||||||
if (!_context) {
|
if (!_context) {
|
||||||
LOG_ERROR("Failed to create context for encoder '%s'.", _codec->name);
|
DLOG_ERROR("Failed to create context for encoder '%s'.", _codec->name);
|
||||||
throw std::runtime_error("Failed to create encoder context.");
|
throw std::runtime_error("Failed to create encoder context.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,42 +259,42 @@ bool ffmpeg_instance::update(obs_data_t* settings)
|
||||||
|
|
||||||
// Handler Logging
|
// Handler Logging
|
||||||
if (_handler) {
|
if (_handler) {
|
||||||
LOG_INFO("[%s] Initializing...", _codec->name);
|
DLOG_INFO("[%s] Initializing...", _codec->name);
|
||||||
LOG_INFO("[%s] FFmpeg:", _codec->name);
|
DLOG_INFO("[%s] FFmpeg:", _codec->name);
|
||||||
LOG_INFO("[%s] Custom Settings: %s", _codec->name,
|
DLOG_INFO("[%s] Custom Settings: %s", _codec->name,
|
||||||
obs_data_get_string(settings, KEY_FFMPEG_CUSTOMSETTINGS));
|
obs_data_get_string(settings, KEY_FFMPEG_CUSTOMSETTINGS));
|
||||||
LOG_INFO("[%s] Standard Compliance: %s", _codec->name,
|
DLOG_INFO("[%s] Standard Compliance: %s", _codec->name,
|
||||||
::ffmpeg::tools::get_std_compliance_name(_context->strict_std_compliance));
|
::ffmpeg::tools::get_std_compliance_name(_context->strict_std_compliance));
|
||||||
LOG_INFO("[%s] Threading: %s (with %i threads)", _codec->name,
|
DLOG_INFO("[%s] Threading: %s (with %i threads)", _codec->name,
|
||||||
::ffmpeg::tools::get_thread_type_name(_context->thread_type), _context->thread_count);
|
::ffmpeg::tools::get_thread_type_name(_context->thread_type), _context->thread_count);
|
||||||
|
|
||||||
LOG_INFO("[%s] Video:", _codec->name);
|
DLOG_INFO("[%s] Video:", _codec->name);
|
||||||
if (_hwinst) {
|
if (_hwinst) {
|
||||||
LOG_INFO("[%s] Texture: %ldx%ld %s %s %s", _codec->name, _context->width, _context->height,
|
DLOG_INFO("[%s] Texture: %ldx%ld %s %s %s", _codec->name, _context->width, _context->height,
|
||||||
::ffmpeg::tools::get_pixel_format_name(_context->sw_pix_fmt),
|
::ffmpeg::tools::get_pixel_format_name(_context->sw_pix_fmt),
|
||||||
::ffmpeg::tools::get_color_space_name(_context->colorspace),
|
::ffmpeg::tools::get_color_space_name(_context->colorspace),
|
||||||
av_color_range_name(_context->color_range));
|
av_color_range_name(_context->color_range));
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("[%s] Input: %ldx%ld %s %s %s", _codec->name, _scaler.get_source_width(),
|
DLOG_INFO("[%s] Input: %ldx%ld %s %s %s", _codec->name, _scaler.get_source_width(),
|
||||||
_scaler.get_source_height(), ::ffmpeg::tools::get_pixel_format_name(_scaler.get_source_format()),
|
_scaler.get_source_height(), ::ffmpeg::tools::get_pixel_format_name(_scaler.get_source_format()),
|
||||||
::ffmpeg::tools::get_color_space_name(_scaler.get_source_colorspace()),
|
::ffmpeg::tools::get_color_space_name(_scaler.get_source_colorspace()),
|
||||||
_scaler.is_source_full_range() ? "Full" : "Partial");
|
_scaler.is_source_full_range() ? "Full" : "Partial");
|
||||||
LOG_INFO("[%s] Output: %ldx%ld %s %s %s", _codec->name, _scaler.get_target_width(),
|
DLOG_INFO("[%s] Output: %ldx%ld %s %s %s", _codec->name, _scaler.get_target_width(),
|
||||||
_scaler.get_target_height(), ::ffmpeg::tools::get_pixel_format_name(_scaler.get_target_format()),
|
_scaler.get_target_height(), ::ffmpeg::tools::get_pixel_format_name(_scaler.get_target_format()),
|
||||||
::ffmpeg::tools::get_color_space_name(_scaler.get_target_colorspace()),
|
::ffmpeg::tools::get_color_space_name(_scaler.get_target_colorspace()),
|
||||||
_scaler.is_target_full_range() ? "Full" : "Partial");
|
_scaler.is_target_full_range() ? "Full" : "Partial");
|
||||||
if (!_hwinst)
|
if (!_hwinst)
|
||||||
LOG_INFO("[%s] On GPU Index: %lli", _codec->name, obs_data_get_int(settings, KEY_FFMPEG_GPU));
|
DLOG_INFO("[%s] On GPU Index: %lli", _codec->name, obs_data_get_int(settings, KEY_FFMPEG_GPU));
|
||||||
}
|
}
|
||||||
LOG_INFO("[%s] Framerate: %ld/%ld (%f FPS)", _codec->name, _context->time_base.den, _context->time_base.num,
|
DLOG_INFO("[%s] Framerate: %ld/%ld (%f FPS)", _codec->name, _context->time_base.den, _context->time_base.num,
|
||||||
static_cast<double_t>(_context->time_base.den) / static_cast<double_t>(_context->time_base.num));
|
static_cast<double_t>(_context->time_base.den) / static_cast<double_t>(_context->time_base.num));
|
||||||
|
|
||||||
LOG_INFO("[%s] Keyframes: ", _codec->name);
|
DLOG_INFO("[%s] Keyframes: ", _codec->name);
|
||||||
if (_context->keyint_min != _context->gop_size) {
|
if (_context->keyint_min != _context->gop_size) {
|
||||||
LOG_INFO("[%s] Minimum: %i frames", _codec->name, _context->keyint_min);
|
DLOG_INFO("[%s] Minimum: %i frames", _codec->name, _context->keyint_min);
|
||||||
LOG_INFO("[%s] Maximum: %i frames", _codec->name, _context->gop_size);
|
DLOG_INFO("[%s] Maximum: %i frames", _codec->name, _context->gop_size);
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("[%s] Distance: %i frames", _codec->name, _context->gop_size);
|
DLOG_INFO("[%s] Distance: %i frames", _codec->name, _context->gop_size);
|
||||||
}
|
}
|
||||||
_handler->log_options(settings, _codec, _context);
|
_handler->log_options(settings, _codec, _context);
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ bool ffmpeg_instance::encode_video(struct encoder_frame* frame, struct encoder_p
|
||||||
_scaler.convert(reinterpret_cast<std::uint8_t**>(frame->data), reinterpret_cast<int*>(frame->linesize),
|
_scaler.convert(reinterpret_cast<std::uint8_t**>(frame->data), reinterpret_cast<int*>(frame->linesize),
|
||||||
0, _context->height, vframe->data, vframe->linesize);
|
0, _context->height, vframe->data, vframe->linesize);
|
||||||
if (res <= 0) {
|
if (res <= 0) {
|
||||||
LOG_ERROR("Failed to convert frame: %s (%ld).", ::ffmpeg::tools::get_error_description(res), res);
|
DLOG_ERROR("Failed to convert frame: %s (%ld).", ::ffmpeg::tools::get_error_description(res), res);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,7 +376,7 @@ bool ffmpeg_instance::encode_video(uint32_t handle, int64_t pts, uint64_t lock_k
|
||||||
struct encoder_packet* packet, bool* received_packet)
|
struct encoder_packet* packet, bool* received_packet)
|
||||||
{
|
{
|
||||||
if (handle == GS_INVALID_HANDLE) {
|
if (handle == GS_INVALID_HANDLE) {
|
||||||
LOG_ERROR("Received invalid handle.");
|
DLOG_ERROR("Received invalid handle.");
|
||||||
*next_key = lock_key;
|
*next_key = lock_key;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -690,17 +690,17 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
|
||||||
// This means we should call receive_packet again, but what do we do with that data?
|
// This means we should call receive_packet again, but what do we do with that data?
|
||||||
// Why can't we queue on both? Do I really have to implement threading for this stuff?
|
// Why can't we queue on both? Do I really have to implement threading for this stuff?
|
||||||
if (*received_packet == true) {
|
if (*received_packet == true) {
|
||||||
LOG_WARNING("Skipped frame due to EAGAIN when a packet was already returned.");
|
DLOG_WARNING("Skipped frame due to EAGAIN when a packet was already returned.");
|
||||||
sent_frame = true;
|
sent_frame = true;
|
||||||
}
|
}
|
||||||
eagain_is_stupid = true;
|
eagain_is_stupid = true;
|
||||||
break;
|
break;
|
||||||
case AVERROR(EOF):
|
case AVERROR(EOF):
|
||||||
LOG_ERROR("Skipped frame due to end of stream.");
|
DLOG_ERROR("Skipped frame due to end of stream.");
|
||||||
sent_frame = true;
|
sent_frame = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Failed to encode frame: %s (%ld).", ::ffmpeg::tools::get_error_description(res), res);
|
DLOG_ERROR("Failed to encode frame: %s (%ld).", ::ffmpeg::tools::get_error_description(res), res);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -712,7 +712,7 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
|
||||||
recv_packet = true;
|
recv_packet = true;
|
||||||
break;
|
break;
|
||||||
case AVERROR(EOF):
|
case AVERROR(EOF):
|
||||||
LOG_ERROR("Received end of file.");
|
DLOG_ERROR("Received end of file.");
|
||||||
recv_packet = true;
|
recv_packet = true;
|
||||||
break;
|
break;
|
||||||
case AVERROR(EAGAIN):
|
case AVERROR(EAGAIN):
|
||||||
|
@ -720,12 +720,12 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
|
||||||
recv_packet = true;
|
recv_packet = true;
|
||||||
}
|
}
|
||||||
if (eagain_is_stupid) {
|
if (eagain_is_stupid) {
|
||||||
LOG_ERROR("Both send and recieve returned EAGAIN, encoder is broken.");
|
DLOG_ERROR("Both send and recieve returned EAGAIN, encoder is broken.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Failed to receive packet: %s (%ld).", ::ffmpeg::tools::get_error_description(res), res);
|
DLOG_ERROR("Failed to receive packet: %s (%ld).", ::ffmpeg::tools::get_error_description(res), res);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -854,7 +854,7 @@ void ffmpeg_instance::parse_ffmpeg_commandline(std::string text)
|
||||||
|
|
||||||
// Skip options that don't start with a '-'.
|
// Skip options that don't start with a '-'.
|
||||||
if (opt.at(0) != '-') {
|
if (opt.at(0) != '-') {
|
||||||
LOG_WARNING("Option '%s' is malformed, must start with a '-'.", opt.c_str());
|
DLOG_WARNING("Option '%s' is malformed, must start with a '-'.", opt.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +862,7 @@ void ffmpeg_instance::parse_ffmpeg_commandline(std::string text)
|
||||||
const char* cstr = opt.c_str();
|
const char* cstr = opt.c_str();
|
||||||
const char* eq_at = strchr(cstr, '=');
|
const char* eq_at = strchr(cstr, '=');
|
||||||
if (eq_at == nullptr) {
|
if (eq_at == nullptr) {
|
||||||
LOG_WARNING("Option '%s' is malformed, must contain a '='.", opt.c_str());
|
DLOG_WARNING("Option '%s' is malformed, must contain a '='.", opt.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,11 +872,11 @@ void ffmpeg_instance::parse_ffmpeg_commandline(std::string text)
|
||||||
|
|
||||||
int res = av_opt_set(_context, key.c_str(), value.c_str(), AV_OPT_SEARCH_CHILDREN);
|
int res = av_opt_set(_context, key.c_str(), value.c_str(), AV_OPT_SEARCH_CHILDREN);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
LOG_WARNING("Option '%s' (key: '%s', value: '%s') encountered error: %s", opt.c_str(), key.c_str(),
|
DLOG_WARNING("Option '%s' (key: '%s', value: '%s') encountered error: %s", opt.c_str(), key.c_str(),
|
||||||
value.c_str(), ::ffmpeg::tools::get_error_description(res));
|
value.c_str(), ::ffmpeg::tools::get_error_description(res));
|
||||||
}
|
}
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Option '%s' encountered exception: %s", opt.c_str(), ex.what());
|
DLOG_ERROR("Option '%s' encountered exception: %s", opt.c_str(), ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -973,10 +973,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, KEY_KEYFRAMES_INTERVAL_SECONDS), is_seconds);
|
obs_property_set_visible(obs_properties_get(props, KEY_KEYFRAMES_INTERVAL_SECONDS), is_seconds);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1108,7 +1108,7 @@ void ffmpeg_manager::register_encoders()
|
||||||
try {
|
try {
|
||||||
_factories.emplace(codec, std::make_shared<ffmpeg_factory>(codec));
|
_factories.emplace(codec, std::make_shared<ffmpeg_factory>(codec));
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Failed to register encoder '%s': %s", codec->id, ex.what());
|
DLOG_ERROR("Failed to register encoder '%s': %s", codec->id, ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ void debug_handler::get_properties(obs_properties_t*, const AVCodec* codec, AVCo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("Options for '%s':", codec->name);
|
DLOG_INFO("Options for '%s':", codec->name);
|
||||||
|
|
||||||
std::pair<AVOptionType, std::string> opt_type_name[] = {
|
std::pair<AVOptionType, std::string> opt_type_name[] = {
|
||||||
{AV_OPT_TYPE_FLAGS, "Flags"},
|
{AV_OPT_TYPE_FLAGS, "Flags"},
|
||||||
|
@ -115,11 +115,11 @@ void debug_handler::get_properties(obs_properties_t*, const AVCodec* codec, AVCo
|
||||||
|
|
||||||
if (opt->type == AV_OPT_TYPE_CONST) {
|
if (opt->type == AV_OPT_TYPE_CONST) {
|
||||||
if (opt->unit == nullptr) {
|
if (opt->unit == nullptr) {
|
||||||
LOG_INFO(" Constant '%s' and help text '%s' with unknown settings.", opt->name, opt->help);
|
DLOG_INFO(" Constant '%s' and help text '%s' with unknown settings.", opt->name, opt->help);
|
||||||
} else {
|
} else {
|
||||||
auto unit_type = unit_types.find(opt->unit);
|
auto unit_type = unit_types.find(opt->unit);
|
||||||
if (unit_type == unit_types.end()) {
|
if (unit_type == unit_types.end()) {
|
||||||
LOG_INFO(" [%s] Flag '%s' and help text '%s' with value '%lld'.", opt->unit, opt->name, opt->help,
|
DLOG_INFO(" [%s] Flag '%s' and help text '%s' with value '%lld'.", opt->unit, opt->name, opt->help,
|
||||||
opt->default_val.i64);
|
opt->default_val.i64);
|
||||||
} else {
|
} else {
|
||||||
std::string out;
|
std::string out;
|
||||||
|
@ -147,7 +147,7 @@ void debug_handler::get_properties(obs_properties_t*, const AVCodec* codec, AVCo
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO(" [%s] Constant '%s' and help text '%s' with value '%s'.", opt->unit, opt->name,
|
DLOG_INFO(" [%s] Constant '%s' and help text '%s' with value '%s'.", opt->unit, opt->name,
|
||||||
opt->help, out.c_str());
|
opt->help, out.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ void debug_handler::get_properties(obs_properties_t*, const AVCodec* codec, AVCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO(
|
DLOG_INFO(
|
||||||
" Option '%s'%s%s%s with help '%s' of type '%s' with default value '%s', minimum '%s' and maximum "
|
" Option '%s'%s%s%s with help '%s' of type '%s' with default value '%s', minimum '%s' and maximum "
|
||||||
"'%s'.",
|
"'%s'.",
|
||||||
opt->name, opt->unit ? " with unit (" : "", opt->unit ? opt->unit : "", opt->unit ? ")" : "", opt->help,
|
opt->name, opt->unit ? " with unit (" : "", opt->unit ? opt->unit : "", opt->unit ? ")" : "", opt->help,
|
||||||
|
|
|
@ -132,7 +132,7 @@ void nvenc_h264_handler::log_options(obs_data_t* settings, const AVCodec* codec,
|
||||||
{
|
{
|
||||||
nvenc::log_options(settings, codec, context);
|
nvenc::log_options(settings, codec, context);
|
||||||
|
|
||||||
LOG_INFO("[%s] H.264/AVC:", codec->name);
|
DLOG_INFO("[%s] H.264/AVC:", codec->name);
|
||||||
::ffmpeg::tools::print_av_option_string(context, "profile", " Profile", [](int64_t v) {
|
::ffmpeg::tools::print_av_option_string(context, "profile", " Profile", [](int64_t v) {
|
||||||
profile val = static_cast<profile>(v);
|
profile val = static_cast<profile>(v);
|
||||||
auto index = profiles.find(val);
|
auto index = profiles.find(val);
|
||||||
|
|
|
@ -138,7 +138,7 @@ void nvenc_hevc_handler::log_options(obs_data_t* settings, const AVCodec* codec,
|
||||||
{
|
{
|
||||||
nvenc::log_options(settings, codec, context);
|
nvenc::log_options(settings, codec, context);
|
||||||
|
|
||||||
LOG_INFO("[%s] H.265/HEVC:", codec->name);
|
DLOG_INFO("[%s] H.265/HEVC:", codec->name);
|
||||||
::ffmpeg::tools::print_av_option_string(context, "profile", " Profile", [](int64_t v) {
|
::ffmpeg::tools::print_av_option_string(context, "profile", " Profile", [](int64_t v) {
|
||||||
profile val = static_cast<profile>(v);
|
profile val = static_cast<profile>(v);
|
||||||
auto index = profiles.find(val);
|
auto index = profiles.find(val);
|
||||||
|
|
|
@ -680,7 +680,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c
|
||||||
|
|
||||||
int64_t wp = obs_data_get_int(settings, KEY_OTHER_WEIGHTEDPREDICTION);
|
int64_t wp = obs_data_get_int(settings, KEY_OTHER_WEIGHTEDPREDICTION);
|
||||||
if ((context->max_b_frames > 0) && util::is_tristate_enabled(wp)) {
|
if ((context->max_b_frames > 0) && util::is_tristate_enabled(wp)) {
|
||||||
LOG_WARNING("[%s] Weighted Prediction disabled because of B-Frames being used.", codec->name);
|
DLOG_WARNING("[%s] Weighted Prediction disabled because of B-Frames being used.", codec->name);
|
||||||
av_opt_set_int(context->priv_data, "weighted_pred", 0, AV_OPT_SEARCH_CHILDREN);
|
av_opt_set_int(context->priv_data, "weighted_pred", 0, AV_OPT_SEARCH_CHILDREN);
|
||||||
} else if (!util::is_tristate_default(wp)) {
|
} else if (!util::is_tristate_default(wp)) {
|
||||||
av_opt_set_int(context->priv_data, "weighted_pred", wp, AV_OPT_SEARCH_CHILDREN);
|
av_opt_set_int(context->priv_data, "weighted_pred", wp, AV_OPT_SEARCH_CHILDREN);
|
||||||
|
@ -700,7 +700,7 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte
|
||||||
{
|
{
|
||||||
using namespace ::ffmpeg;
|
using namespace ::ffmpeg;
|
||||||
|
|
||||||
LOG_INFO("[%s] Nvidia NVENC:", codec->name);
|
DLOG_INFO("[%s] Nvidia NVENC:", codec->name);
|
||||||
tools::print_av_option_string(context, "preset", " Preset", [](int64_t v) {
|
tools::print_av_option_string(context, "preset", " Preset", [](int64_t v) {
|
||||||
preset val = static_cast<preset>(v);
|
preset val = static_cast<preset>(v);
|
||||||
std::string name = "<Default>";
|
std::string name = "<Default>";
|
||||||
|
@ -723,16 +723,16 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte
|
||||||
if (strcmp(codec->name, "h264_nvenc") == 0)
|
if (strcmp(codec->name, "h264_nvenc") == 0)
|
||||||
tools::print_av_option_bool(context, "b_adapt", " Adaptive B-Frames");
|
tools::print_av_option_bool(context, "b_adapt", " Adaptive B-Frames");
|
||||||
|
|
||||||
LOG_INFO("[%s] Bitrate:", codec->name);
|
DLOG_INFO("[%s] Bitrate:", codec->name);
|
||||||
tools::print_av_option_int(context, "b", " Target", "bits/sec");
|
tools::print_av_option_int(context, "b", " Target", "bits/sec");
|
||||||
tools::print_av_option_int(context, "minrate", " Minimum", "bits/sec");
|
tools::print_av_option_int(context, "minrate", " Minimum", "bits/sec");
|
||||||
tools::print_av_option_int(context, "maxrate", " Maximum", "bits/sec");
|
tools::print_av_option_int(context, "maxrate", " Maximum", "bits/sec");
|
||||||
tools::print_av_option_int(context, "bufsize", " Buffer", "bits");
|
tools::print_av_option_int(context, "bufsize", " Buffer", "bits");
|
||||||
LOG_INFO("[%s] Quality:", codec->name);
|
DLOG_INFO("[%s] Quality:", codec->name);
|
||||||
tools::print_av_option_int(context, "cq", " Target", "");
|
tools::print_av_option_int(context, "cq", " Target", "");
|
||||||
tools::print_av_option_int(context, "qmin", " Minimum", "");
|
tools::print_av_option_int(context, "qmin", " Minimum", "");
|
||||||
tools::print_av_option_int(context, "qmax", " Maximum", "");
|
tools::print_av_option_int(context, "qmax", " Maximum", "");
|
||||||
LOG_INFO("[%s] Quantization Parameters:", codec->name);
|
DLOG_INFO("[%s] Quantization Parameters:", codec->name);
|
||||||
tools::print_av_option_int(context, "init_qpI", " I-Frame", "");
|
tools::print_av_option_int(context, "init_qpI", " I-Frame", "");
|
||||||
tools::print_av_option_int(context, "init_qpP", " P-Frame", "");
|
tools::print_av_option_int(context, "init_qpP", " P-Frame", "");
|
||||||
tools::print_av_option_int(context, "init_qpB", " B-Frame", "");
|
tools::print_av_option_int(context, "init_qpB", " B-Frame", "");
|
||||||
|
@ -747,7 +747,7 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte
|
||||||
return name;
|
return name;
|
||||||
});
|
});
|
||||||
|
|
||||||
LOG_INFO("[%s] Adaptive Quantization:", codec->name);
|
DLOG_INFO("[%s] Adaptive Quantization:", codec->name);
|
||||||
if (strcmp(codec->name, "h264_nvenc") == 0) {
|
if (strcmp(codec->name, "h264_nvenc") == 0) {
|
||||||
tools::print_av_option_bool(context, "spatial-aq", " Spatial AQ");
|
tools::print_av_option_bool(context, "spatial-aq", " Spatial AQ");
|
||||||
tools::print_av_option_int(context, "aq-strength", " Strength", "");
|
tools::print_av_option_int(context, "aq-strength", " Strength", "");
|
||||||
|
@ -758,7 +758,7 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte
|
||||||
tools::print_av_option_bool(context, "temporal_aq", " Temporal AQ");
|
tools::print_av_option_bool(context, "temporal_aq", " Temporal AQ");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("[%s] Other:", codec->name);
|
DLOG_INFO("[%s] Other:", codec->name);
|
||||||
tools::print_av_option_bool(context, "zerolatency", " Zero Latency");
|
tools::print_av_option_bool(context, "zerolatency", " Zero Latency");
|
||||||
tools::print_av_option_bool(context, "weighted_pred", " Weighted Prediction");
|
tools::print_av_option_bool(context, "weighted_pred", " Weighted Prediction");
|
||||||
tools::print_av_option_bool(context, "nonref_p", " Non-reference P-Frames");
|
tools::print_av_option_bool(context, "nonref_p", " Non-reference P-Frames");
|
||||||
|
|
|
@ -103,7 +103,7 @@ void prores_aw_handler::update(obs_data_t* settings, const AVCodec*, AVCodecCont
|
||||||
|
|
||||||
void prores_aw_handler::log_options(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context)
|
void prores_aw_handler::log_options(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context)
|
||||||
{
|
{
|
||||||
LOG_INFO("[%s] Apple ProRes:", codec->name);
|
DLOG_INFO("[%s] Apple ProRes:", codec->name);
|
||||||
::ffmpeg::tools::print_av_option_string(context, "profile", " Profile", [&codec](int64_t v) {
|
::ffmpeg::tools::print_av_option_string(context, "profile", " Profile", [&codec](int64_t v) {
|
||||||
int val = static_cast<int>(v);
|
int val = static_cast<int>(v);
|
||||||
for (auto ptr = codec->profiles; (ptr->profile != FF_PROFILE_UNKNOWN) && (ptr != nullptr); ptr++) {
|
for (auto ptr = codec->profiles; (ptr->profile != FF_PROFILE_UNKNOWN) && (ptr != nullptr); ptr++) {
|
||||||
|
|
|
@ -326,10 +326,10 @@ void ffmpeg::tools::print_av_option_bool(AVCodecContext* ctx_codec, void* ctx_op
|
||||||
{
|
{
|
||||||
int64_t v = 0;
|
int64_t v = 0;
|
||||||
if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) {
|
if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) {
|
||||||
LOG_INFO("[%s] %s: <Error: %s>", ctx_codec->codec->name, text.c_str(),
|
DLOG_INFO("[%s] %s: <Error: %s>", ctx_codec->codec->name, text.c_str(),
|
||||||
ffmpeg::tools::get_error_description(err));
|
ffmpeg::tools::get_error_description(err));
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.c_str(),
|
DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.c_str(),
|
||||||
(inverse ? v != 0 : v == 0) ? "Disabled" : "Enabled",
|
(inverse ? v != 0 : v == 0) ? "Disabled" : "Enabled",
|
||||||
av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " <Default>" : "");
|
av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " <Default>" : "");
|
||||||
}
|
}
|
||||||
|
@ -347,13 +347,13 @@ void ffmpeg::tools::print_av_option_int(AVCodecContext* ctx_codec, void* ctx_opt
|
||||||
bool is_default = av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0;
|
bool is_default = av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0;
|
||||||
if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) {
|
if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) {
|
||||||
if (is_default) {
|
if (is_default) {
|
||||||
LOG_INFO("[%s] %s: <Default>", ctx_codec->codec->name, text.c_str());
|
DLOG_INFO("[%s] %s: <Default>", ctx_codec->codec->name, text.c_str());
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("[%s] %s: <Error: %s>", ctx_codec->codec->name, text.c_str(),
|
DLOG_INFO("[%s] %s: <Error: %s>", ctx_codec->codec->name, text.c_str(),
|
||||||
ffmpeg::tools::get_error_description(err));
|
ffmpeg::tools::get_error_description(err));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("[%s] %s: %lld %s%s", ctx_codec->codec->name, text.c_str(), v, suffix.c_str(),
|
DLOG_INFO("[%s] %s: %lld %s%s", ctx_codec->codec->name, text.c_str(), v, suffix.c_str(),
|
||||||
is_default ? " <Default>" : "");
|
is_default ? " <Default>" : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,13 +369,13 @@ void ffmpeg::tools::print_av_option_string(AVCodecContext* ctx_codec, void* ctx_
|
||||||
{
|
{
|
||||||
int64_t v = 0;
|
int64_t v = 0;
|
||||||
if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) {
|
if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) {
|
||||||
LOG_INFO("[%s] %s: <Error: %s>", ctx_codec->codec->name, text.c_str(),
|
DLOG_INFO("[%s] %s: <Error: %s>", ctx_codec->codec->name, text.c_str(),
|
||||||
ffmpeg::tools::get_error_description(err));
|
ffmpeg::tools::get_error_description(err));
|
||||||
} else {
|
} else {
|
||||||
std::string name = "<Unknown>";
|
std::string name = "<Unknown>";
|
||||||
if (decoder)
|
if (decoder)
|
||||||
name = decoder(v);
|
name = decoder(v);
|
||||||
LOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.c_str(), name.c_str(),
|
DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.c_str(), name.c_str(),
|
||||||
av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " <Default>" : "");
|
av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " <Default>" : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ blur_instance::blur_instance(obs_data_t* settings, obs_source_t* self)
|
||||||
try {
|
try {
|
||||||
_effect_mask = gs::effect::create(file);
|
_effect_mask = gs::effect::create(file);
|
||||||
} catch (std::runtime_error& ex) {
|
} catch (std::runtime_error& ex) {
|
||||||
LOG_ERROR("<filter-blur> Loading _effect '%s' failed with error(s): %s", file, ex.what());
|
DLOG_ERROR("<filter-blur> Loading _effect '%s' failed with error(s): %s", file, ex.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
bfree(file);
|
bfree(file);
|
||||||
|
@ -332,7 +332,7 @@ void blur_instance::video_tick(float)
|
||||||
_mask.image.texture = std::make_shared<gs::texture>(_mask.image.path);
|
_mask.image.texture = std::make_shared<gs::texture>(_mask.image.path);
|
||||||
_mask.image.path_old = _mask.image.path;
|
_mask.image.path_old = _mask.image.path;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("<filter-blur> Instance '%s' failed to load image '%s'.", obs_source_get_name(_self),
|
DLOG_ERROR("<filter-blur> Instance '%s' failed to load image '%s'.", obs_source_get_name(_self),
|
||||||
_mask.image.path.c_str());
|
_mask.image.path.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ void blur_instance::video_tick(float)
|
||||||
_mask.source.is_scene = (obs_scene_from_source(_mask.source.source_texture->get_object()) != nullptr);
|
_mask.source.is_scene = (obs_scene_from_source(_mask.source.source_texture->get_object()) != nullptr);
|
||||||
_mask.source.name_old = _mask.source.name;
|
_mask.source.name_old = _mask.source.name;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("<filter-blur> Instance '%s' failed to grab source '%s'.", obs_source_get_name(_self),
|
DLOG_ERROR("<filter-blur> Instance '%s' failed to grab source '%s'.", obs_source_get_name(_self),
|
||||||
_mask.source.name.c_str());
|
_mask.source.name.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ void blur_instance::video_render(gs_effect_t* effect)
|
||||||
|
|
||||||
gs_eparam_t* param = gs_effect_get_param_by_name(finalEffect, "image");
|
gs_eparam_t* param = gs_effect_get_param_by_name(finalEffect, "image");
|
||||||
if (!param) {
|
if (!param) {
|
||||||
LOG_ERROR("<filter-blur:%s> Failed to set image param.", obs_source_get_name(this->_self));
|
DLOG_ERROR("<filter-blur:%s> Failed to set image param.", obs_source_get_name(this->_self));
|
||||||
obs_source_skip_video_filter(_self);
|
obs_source_skip_video_filter(_self);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -773,7 +773,7 @@ try {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in modified_properties callback.");
|
DLOG_ERROR("Unexpected exception in modified_properties callback.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ color_grade_instance::color_grade_instance(obs_data_t* data, obs_source_t* self)
|
||||||
_effect = gs::effect::create(file);
|
_effect = gs::effect::create(file);
|
||||||
bfree(file);
|
bfree(file);
|
||||||
} catch (std::runtime_error& ex) {
|
} catch (std::runtime_error& ex) {
|
||||||
LOG_ERROR("<filter-color-grade> Loading _effect '%s' failed with error(s): %s", file, ex.what());
|
DLOG_ERROR("<filter-color-grade> Loading _effect '%s' failed with error(s): %s", file, ex.what());
|
||||||
bfree(file);
|
bfree(file);
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ dynamic_mask_instance::dynamic_mask_instance(obs_data_t* settings, obs_source_t*
|
||||||
try {
|
try {
|
||||||
_effect = gs::effect::create(file);
|
_effect = gs::effect::create(file);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Loading channel mask effect failed with error(s):\n%s", ex.what());
|
DLOG_ERROR("Loading channel mask effect failed with error(s):\n%s", ex.what());
|
||||||
}
|
}
|
||||||
assert(_effect != nullptr);
|
assert(_effect != nullptr);
|
||||||
bfree(file);
|
bfree(file);
|
||||||
|
@ -332,7 +332,7 @@ void dynamic_mask_instance::video_render(gs_effect_t* in_effect)
|
||||||
gs_effect_t* final_effect = in_effect ? in_effect : default_effect;
|
gs_effect_t* final_effect = in_effect ? in_effect : default_effect;
|
||||||
gs_eparam_t* param = gs_effect_get_param_by_name(final_effect, "image");
|
gs_eparam_t* param = gs_effect_get_param_by_name(final_effect, "image");
|
||||||
if (!param) {
|
if (!param) {
|
||||||
LOG_ERROR("<filter-dynamic-mask:%s> Failed to set image param.", obs_source_get_name(_self));
|
DLOG_ERROR("<filter-dynamic-mask:%s> Failed to set image param.", obs_source_get_name(_self));
|
||||||
obs_source_skip_video_filter(_self);
|
obs_source_skip_video_filter(_self);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -168,7 +168,7 @@ void face_tracking_instance::async_initialize(std::shared_ptr<void> ptr)
|
||||||
// Finally enable Temporal tracking if possible.
|
// Finally enable Temporal tracking if possible.
|
||||||
if (NvCV_Status res = _ar_library->set_uint32(_ar_feature.get(), NvAR_Parameter_Config(Temporal), 1);
|
if (NvCV_Status res = _ar_library->set_uint32(_ar_feature.get(), NvAR_Parameter_Config(Temporal), 1);
|
||||||
res != NVCV_SUCCESS) {
|
res != NVCV_SUCCESS) {
|
||||||
LOG_WARNING("<%s> Unable to enable Temporal tracking mode.", obs_source_get_name(remote_work.get()));
|
DLOG_WARNING("<%s> Unable to enable Temporal tracking mode.", obs_source_get_name(remote_work.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Bounding Boxes Data
|
// Create Bounding Boxes Data
|
||||||
|
@ -191,7 +191,7 @@ void face_tracking_instance::async_initialize(std::shared_ptr<void> ptr)
|
||||||
|
|
||||||
// And finally, load the feature (takes long).
|
// And finally, load the feature (takes long).
|
||||||
if (NvCV_Status res = _ar_library->load(_ar_feature.get()); res != NVCV_SUCCESS) {
|
if (NvCV_Status res = _ar_library->load(_ar_feature.get()); res != NVCV_SUCCESS) {
|
||||||
LOG_ERROR("<%s> Failed to load Face Tracking feature.", obs_source_get_name(_self));
|
DLOG_ERROR("<%s> Failed to load Face Tracking feature.", obs_source_get_name(_self));
|
||||||
_ar_loaded = false;
|
_ar_loaded = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -299,7 +299,7 @@ void face_tracking_instance::async_track(std::shared_ptr<void> ptr)
|
||||||
if (NvCV_Status res = _ar_library->set_object(_ar_feature.get(), NvAR_Parameter_Input(Image),
|
if (NvCV_Status res = _ar_library->set_object(_ar_feature.get(), NvAR_Parameter_Input(Image),
|
||||||
&_ar_image_bgr, sizeof(NvCVImage));
|
&_ar_image_bgr, sizeof(NvCVImage));
|
||||||
res != NVCV_SUCCESS) {
|
res != NVCV_SUCCESS) {
|
||||||
LOG_ERROR("<%s> Failed to update input image for tracking.", obs_source_get_name(_self));
|
DLOG_ERROR("<%s> Failed to update input image for tracking.", obs_source_get_name(_self));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ void face_tracking_instance::async_track(std::shared_ptr<void> ptr)
|
||||||
|
|
||||||
if (::nvidia::cuda::result res = _cuda->cuMemcpy2DAsync(&mc, _cuda_stream->get());
|
if (::nvidia::cuda::result res = _cuda->cuMemcpy2DAsync(&mc, _cuda_stream->get());
|
||||||
res != ::nvidia::cuda::result::SUCCESS) {
|
res != ::nvidia::cuda::result::SUCCESS) {
|
||||||
LOG_ERROR("<%s> Failed to prepare buffers for tracking.", obs_source_get_name(_self));
|
DLOG_ERROR("<%s> Failed to prepare buffers for tracking.", obs_source_get_name(_self));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ void face_tracking_instance::async_track(std::shared_ptr<void> ptr)
|
||||||
_ar_library->image_transfer(&_ar_image, &_ar_image_bgr, 1.0,
|
_ar_library->image_transfer(&_ar_image, &_ar_image_bgr, 1.0,
|
||||||
reinterpret_cast<CUstream_st*>(_cuda_stream->get()), &_ar_image_temp);
|
reinterpret_cast<CUstream_st*>(_cuda_stream->get()), &_ar_image_temp);
|
||||||
res != NVCV_SUCCESS) {
|
res != NVCV_SUCCESS) {
|
||||||
LOG_ERROR("<%s> Failed to convert from RGBX 32-bit to BGR 24-bit.", obs_source_get_name(_self));
|
DLOG_ERROR("<%s> Failed to convert from RGBX 32-bit to BGR 24-bit.", obs_source_get_name(_self));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ void face_tracking_instance::async_track(std::shared_ptr<void> ptr)
|
||||||
auto prof = _profile_ar_run->track();
|
auto prof = _profile_ar_run->track();
|
||||||
#endif
|
#endif
|
||||||
if (NvCV_Status res = _ar_library->run(_ar_feature.get()); res != NVCV_SUCCESS) {
|
if (NvCV_Status res = _ar_library->run(_ar_feature.get()); res != NVCV_SUCCESS) {
|
||||||
LOG_ERROR("<%s> Failed to run tracking.", obs_source_get_name(_self));
|
DLOG_ERROR("<%s> Failed to run tracking.", obs_source_get_name(_self));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -583,7 +583,7 @@ void face_tracking_instance::video_render(gs_effect_t* effect)
|
||||||
#ifdef ENABLE_PROFILING
|
#ifdef ENABLE_PROFILING
|
||||||
bool face_tracking_instance::button_profile(obs_properties_t* props, obs_property_t* property)
|
bool face_tracking_instance::button_profile(obs_properties_t* props, obs_property_t* property)
|
||||||
{
|
{
|
||||||
LOG_INFO("%-22s: %-10s %-10s %-10s %-10s %-10s", "Task", "Total", "Count", "Average", "99.9%ile", "95.0%ile");
|
DLOG_INFO("%-22s: %-10s %-10s %-10s %-10s %-10s", "Task", "Total", "Count", "Average", "99.9%ile", "95.0%ile");
|
||||||
|
|
||||||
std::pair<std::string, std::shared_ptr<util::profiler>> profilers[]{
|
std::pair<std::string, std::shared_ptr<util::profiler>> profilers[]{
|
||||||
{"Capture", _profile_capture}, {"Reallocate", _profile_capture_realloc},
|
{"Capture", _profile_capture}, {"Reallocate", _profile_capture_realloc},
|
||||||
|
@ -592,7 +592,7 @@ bool face_tracking_instance::button_profile(obs_properties_t* props, obs_propert
|
||||||
{"AR Run", _profile_ar_run}, {"AR Calculate", _profile_ar_calc},
|
{"AR Run", _profile_ar_run}, {"AR Calculate", _profile_ar_calc},
|
||||||
};
|
};
|
||||||
for (auto& kv : profilers) {
|
for (auto& kv : profilers) {
|
||||||
LOG_INFO(" %-20s: %8lldµs %10lld %8lldµs %8lldµs %8lldµs", kv.first.c_str(),
|
DLOG_INFO(" %-20s: %8lldµs %10lld %8lldµs %8lldµs %8lldµs", kv.first.c_str(),
|
||||||
std::chrono::duration_cast<std::chrono::microseconds>(kv.second->total_duration()).count(),
|
std::chrono::duration_cast<std::chrono::microseconds>(kv.second->total_duration()).count(),
|
||||||
kv.second->count(), static_cast<std::int64_t>(kv.second->average_duration() / 1000.0),
|
kv.second->count(), static_cast<std::int64_t>(kv.second->average_duration() / 1000.0),
|
||||||
std::chrono::duration_cast<std::chrono::microseconds>(kv.second->percentile(0.999)).count(),
|
std::chrono::duration_cast<std::chrono::microseconds>(kv.second->percentile(0.999)).count(),
|
||||||
|
@ -722,7 +722,7 @@ void streamfx::filter::nvidia::face_tracking_factory::initialize()
|
||||||
try {
|
try {
|
||||||
_filter_nvidia_face_tracking_factory_instance = std::make_shared<filter::nvidia::face_tracking_factory>();
|
_filter_nvidia_face_tracking_factory_instance = std::make_shared<filter::nvidia::face_tracking_factory>();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("<NVIDIA Face Tracking Filter> %s", ex.what());
|
DLOG_ERROR("<NVIDIA Face Tracking Filter> %s", ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,13 +99,13 @@ sdf_effects_instance::sdf_effects_instance(obs_data_t* settings, obs_source_t* s
|
||||||
for (auto& kv : load_arr) {
|
for (auto& kv : load_arr) {
|
||||||
char* path = obs_module_file(kv.first);
|
char* path = obs_module_file(kv.first);
|
||||||
if (!path) {
|
if (!path) {
|
||||||
LOG_ERROR(LOG_PREFIX "Unable to load _effect '%s' as file is missing or locked.", kv.first);
|
DLOG_ERROR(LOG_PREFIX "Unable to load _effect '%s' as file is missing or locked.", kv.first);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
kv.second = gs::effect::create(path);
|
kv.second = gs::effect::create(path);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR(LOG_PREFIX "Failed to load _effect '%s' (located at '%s') with error(s): %s", kv.first, path,
|
DLOG_ERROR(LOG_PREFIX "Failed to load _effect '%s' (located at '%s') with error(s): %s", kv.first, path,
|
||||||
ex.what());
|
ex.what());
|
||||||
}
|
}
|
||||||
bfree(path);
|
bfree(path);
|
||||||
|
@ -589,10 +589,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, ST_SHADOW_INNER_ALPHA), v);
|
obs_property_set_visible(obs_properties_get(props, ST_SHADOW_INNER_ALPHA), v);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,10 +607,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, ST_SHADOW_OUTER_ALPHA), v);
|
obs_property_set_visible(obs_properties_get(props, ST_SHADOW_OUTER_ALPHA), v);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,10 +623,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, ST_GLOW_INNER_SHARPNESS), v);
|
obs_property_set_visible(obs_properties_get(props, ST_GLOW_INNER_SHARPNESS), v);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -639,10 +639,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, ST_GLOW_OUTER_SHARPNESS), v);
|
obs_property_set_visible(obs_properties_get(props, ST_GLOW_OUTER_SHARPNESS), v);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -656,10 +656,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, ST_OUTLINE_SHARPNESS), v);
|
obs_property_set_visible(obs_properties_get(props, ST_OUTLINE_SHARPNESS), v);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,10 +670,10 @@ try {
|
||||||
obs_property_set_visible(obs_properties_get(props, ST_SDF_THRESHOLD), show_advanced);
|
obs_property_set_visible(obs_properties_get(props, ST_SDF_THRESHOLD), show_advanced);
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -488,10 +488,10 @@ try {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ gfx::blur::box_linear_data::box_linear_data()
|
||||||
_effect = gs::effect::create(file);
|
_effect = gs::effect::create(file);
|
||||||
bfree(file);
|
bfree(file);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
DLOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ gfx::blur::box_data::box_data()
|
||||||
_effect = gs::effect::create(file);
|
_effect = gs::effect::create(file);
|
||||||
bfree(file);
|
bfree(file);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("<gfx::blur::box> Failed to load _effect.");
|
DLOG_ERROR("<gfx::blur::box> Failed to load _effect.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ gfx::blur::dual_filtering_data::dual_filtering_data()
|
||||||
_effect = gs::effect::create(file);
|
_effect = gs::effect::create(file);
|
||||||
bfree(file);
|
bfree(file);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
DLOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ try {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what());
|
DLOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ try {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what());
|
DLOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -96,10 +96,10 @@ namespace obs {
|
||||||
return reinterpret_cast<factory_t*>(type_data)->get_name();
|
return reinterpret_cast<factory_t*>(type_data)->get_name();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,10 +116,10 @@ namespace obs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,9 +128,9 @@ namespace obs {
|
||||||
if (type_data)
|
if (type_data)
|
||||||
reinterpret_cast<factory_t*>(type_data)->get_defaults2(settings);
|
reinterpret_cast<factory_t*>(type_data)->get_defaults2(settings);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static obs_properties_t* _get_properties2(void* data, void* type_data) noexcept
|
static obs_properties_t* _get_properties2(void* data, void* type_data) noexcept
|
||||||
|
@ -139,10 +139,10 @@ namespace obs {
|
||||||
return reinterpret_cast<factory_t*>(type_data)->get_properties2(reinterpret_cast<instance_t*>(data));
|
return reinterpret_cast<factory_t*>(type_data)->get_properties2(reinterpret_cast<instance_t*>(data));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,9 +152,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
delete reinterpret_cast<instance_t*>(data);
|
delete reinterpret_cast<instance_t*>(data);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _update(void* data, obs_data_t* settings) noexcept
|
static bool _update(void* data, obs_data_t* settings) noexcept
|
||||||
|
@ -169,10 +169,10 @@ namespace obs {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,10 +183,10 @@ namespace obs {
|
||||||
return reinterpret_cast<instance_t*>(data)->encode(frame, packet, received_packet);
|
return reinterpret_cast<instance_t*>(data)->encode(frame, packet, received_packet);
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,10 +198,10 @@ namespace obs {
|
||||||
received_packet);
|
received_packet);
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,10 +211,10 @@ namespace obs {
|
||||||
return reinterpret_cast<instance_t*>(data)->get_frame_size();
|
return reinterpret_cast<instance_t*>(data)->get_frame_size();
|
||||||
return 0;
|
return 0;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return 0;
|
return 0;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,10 +224,10 @@ namespace obs {
|
||||||
return reinterpret_cast<instance_t*>(data)->get_extra_data(extra_data, size);
|
return reinterpret_cast<instance_t*>(data)->get_extra_data(extra_data, size);
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,10 +237,10 @@ namespace obs {
|
||||||
return reinterpret_cast<instance_t*>(data)->get_sei_data(sei_data, size);
|
return reinterpret_cast<instance_t*>(data)->get_sei_data(sei_data, size);
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,9 +249,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<instance_t*>(data)->get_audio_info(info);
|
reinterpret_cast<instance_t*>(data)->get_audio_info(info);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _get_video_info(void* data, struct video_scale_info* info) noexcept
|
static void _get_video_info(void* data, struct video_scale_info* info) noexcept
|
||||||
|
@ -259,9 +259,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<instance_t*>(data)->get_video_info(info);
|
reinterpret_cast<instance_t*>(data)->get_video_info(info);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -189,10 +189,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_factory*>(type_data)->get_name();
|
return reinterpret_cast<_factory*>(type_data)->get_name();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,10 +200,10 @@ namespace obs {
|
||||||
try {
|
try {
|
||||||
return reinterpret_cast<_factory*>(obs_source_get_type_data(source))->create(settings, source);
|
return reinterpret_cast<_factory*>(obs_source_get_type_data(source))->create(settings, source);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,9 +212,9 @@ namespace obs {
|
||||||
if (type_data)
|
if (type_data)
|
||||||
reinterpret_cast<_factory*>(type_data)->get_defaults2(settings);
|
reinterpret_cast<_factory*>(type_data)->get_defaults2(settings);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static obs_properties_t* _get_properties2(void* data, void* type_data) noexcept
|
static obs_properties_t* _get_properties2(void* data, void* type_data) noexcept
|
||||||
|
@ -223,10 +223,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_factory*>(type_data)->get_properties2(reinterpret_cast<_instance*>(data));
|
return reinterpret_cast<_factory*>(type_data)->get_properties2(reinterpret_cast<_instance*>(data));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,9 +236,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
delete reinterpret_cast<_instance*>(data);
|
delete reinterpret_cast<_instance*>(data);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::uint32_t _get_width(void* data) noexcept
|
static std::uint32_t _get_width(void* data) noexcept
|
||||||
|
@ -247,10 +247,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_instance*>(data)->get_width();
|
return reinterpret_cast<_instance*>(data)->get_width();
|
||||||
return 0;
|
return 0;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return 0;
|
return 0;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,10 +260,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_instance*>(data)->get_height();
|
return reinterpret_cast<_instance*>(data)->get_height();
|
||||||
return 0;
|
return 0;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return 0;
|
return 0;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,9 +272,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->activate();
|
reinterpret_cast<_instance*>(data)->activate();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _deactivate(void* data) noexcept
|
static void _deactivate(void* data) noexcept
|
||||||
|
@ -282,9 +282,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->deactivate();
|
reinterpret_cast<_instance*>(data)->deactivate();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _show(void* data) noexcept
|
static void _show(void* data) noexcept
|
||||||
|
@ -292,9 +292,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->show();
|
reinterpret_cast<_instance*>(data)->show();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _hide(void* data) noexcept
|
static void _hide(void* data) noexcept
|
||||||
|
@ -302,9 +302,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->hide();
|
reinterpret_cast<_instance*>(data)->hide();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _video_tick(void* data, float seconds) noexcept
|
static void _video_tick(void* data, float seconds) noexcept
|
||||||
|
@ -312,9 +312,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->video_tick(seconds);
|
reinterpret_cast<_instance*>(data)->video_tick(seconds);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _video_render(void* data, gs_effect_t* effect) noexcept
|
static void _video_render(void* data, gs_effect_t* effect) noexcept
|
||||||
|
@ -322,9 +322,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->video_render(effect);
|
reinterpret_cast<_instance*>(data)->video_render(effect);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct obs_source_frame* _filter_video(void* data, struct obs_source_frame* frame) noexcept
|
static struct obs_source_frame* _filter_video(void* data, struct obs_source_frame* frame) noexcept
|
||||||
|
@ -333,10 +333,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_instance*>(data)->filter_video(frame);
|
return reinterpret_cast<_instance*>(data)->filter_video(frame);
|
||||||
return frame;
|
return frame;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return frame;
|
return frame;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,10 +346,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_instance*>(data)->filter_audio(frame);
|
return reinterpret_cast<_instance*>(data)->filter_audio(frame);
|
||||||
return frame;
|
return frame;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return frame;
|
return frame;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,9 +358,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->enum_active_sources(enum_callback, param);
|
reinterpret_cast<_instance*>(data)->enum_active_sources(enum_callback, param);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _load(void* data, obs_data_t* settings) noexcept
|
static void _load(void* data, obs_data_t* settings) noexcept
|
||||||
|
@ -374,9 +374,9 @@ namespace obs {
|
||||||
priv->load(settings);
|
priv->load(settings);
|
||||||
}
|
}
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _update(void* data, obs_data_t* settings) noexcept
|
static void _update(void* data, obs_data_t* settings) noexcept
|
||||||
|
@ -384,9 +384,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->update(settings);
|
reinterpret_cast<_instance*>(data)->update(settings);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _save(void* data, obs_data_t* settings) noexcept
|
static void _save(void* data, obs_data_t* settings) noexcept
|
||||||
|
@ -397,9 +397,9 @@ namespace obs {
|
||||||
obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT);
|
obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT);
|
||||||
}
|
}
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _mouse_click(void* data, const struct obs_mouse_event* event, int32_t type, bool mouse_up,
|
static void _mouse_click(void* data, const struct obs_mouse_event* event, int32_t type, bool mouse_up,
|
||||||
|
@ -408,9 +408,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->mouse_click(event, type, mouse_up, click_count);
|
reinterpret_cast<_instance*>(data)->mouse_click(event, type, mouse_up, click_count);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _mouse_move(void* data, const struct obs_mouse_event* event, bool mouse_leave) noexcept
|
static void _mouse_move(void* data, const struct obs_mouse_event* event, bool mouse_leave) noexcept
|
||||||
|
@ -418,9 +418,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->mouse_move(event, mouse_leave);
|
reinterpret_cast<_instance*>(data)->mouse_move(event, mouse_leave);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _mouse_wheel(void* data, const struct obs_mouse_event* event, int x_delta, int y_delta) noexcept
|
static void _mouse_wheel(void* data, const struct obs_mouse_event* event, int x_delta, int y_delta) noexcept
|
||||||
|
@ -428,9 +428,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->mouse_wheel(event, x_delta, y_delta);
|
reinterpret_cast<_instance*>(data)->mouse_wheel(event, x_delta, y_delta);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _focus(void* data, bool focus) noexcept
|
static void _focus(void* data, bool focus) noexcept
|
||||||
|
@ -438,9 +438,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->focus(focus);
|
reinterpret_cast<_instance*>(data)->focus(focus);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _key_click(void* data, const struct obs_key_event* event, bool key_up) noexcept
|
static void _key_click(void* data, const struct obs_key_event* event, bool key_up) noexcept
|
||||||
|
@ -448,9 +448,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->key_click(event, key_up);
|
reinterpret_cast<_instance*>(data)->key_click(event, key_up);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _filter_remove(void* data, obs_source_t* source) noexcept
|
static void _filter_remove(void* data, obs_source_t* source) noexcept
|
||||||
|
@ -458,9 +458,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->filter_remove(source);
|
reinterpret_cast<_instance*>(data)->filter_remove(source);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _audio_render(void* data, uint64_t* ts_out, struct obs_source_audio_mix* audio_output,
|
static bool _audio_render(void* data, uint64_t* ts_out, struct obs_source_audio_mix* audio_output,
|
||||||
|
@ -471,10 +471,10 @@ namespace obs {
|
||||||
sample_rate);
|
sample_rate);
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,9 +483,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->enum_all_sources(enum_callback, param);
|
reinterpret_cast<_instance*>(data)->enum_all_sources(enum_callback, param);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _transition_start(void* data) noexcept
|
static void _transition_start(void* data) noexcept
|
||||||
|
@ -493,9 +493,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->transition_start();
|
reinterpret_cast<_instance*>(data)->transition_start();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _transition_stop(void* data) noexcept
|
static void _transition_stop(void* data) noexcept
|
||||||
|
@ -503,9 +503,9 @@ namespace obs {
|
||||||
if (data)
|
if (data)
|
||||||
reinterpret_cast<_instance*>(data)->transition_stop();
|
reinterpret_cast<_instance*>(data)->transition_stop();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _audio_mix(void* data, uint64_t* ts_out, struct audio_output_data* audio_output,
|
static bool _audio_mix(void* data, uint64_t* ts_out, struct audio_output_data* audio_output,
|
||||||
|
@ -515,10 +515,10 @@ namespace obs {
|
||||||
return reinterpret_cast<_instance*>(data)->audio_mix(ts_out, audio_output, channels, sample_rate);
|
return reinterpret_cast<_instance*>(data)->audio_mix(ts_out, audio_output, channels, sample_rate);
|
||||||
return false;
|
return false;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
return false;
|
return false;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ try {
|
||||||
self->_sources.insert({std::string(name), {weak, obs::obs_weak_source_deleter}});
|
self->_sources.insert({std::string(name), {weak, obs::obs_weak_source_deleter}});
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept
|
void obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept
|
||||||
|
@ -78,7 +78,7 @@ try {
|
||||||
self->_sources.erase(found);
|
self->_sources.erase(found);
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept
|
void obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept
|
||||||
|
@ -115,7 +115,7 @@ try {
|
||||||
self->_sources.erase(found);
|
self->_sources.erase(found);
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::source_tracker::initialize()
|
void obs::source_tracker::initialize()
|
||||||
|
|
|
@ -39,9 +39,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.destroy(self);
|
self->events.destroy(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_remove(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_remove(void* p, calldata_t*) noexcept
|
||||||
|
@ -52,9 +52,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.remove(self);
|
self->events.remove(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_save(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_save(void* p, calldata_t*) noexcept
|
||||||
|
@ -65,9 +65,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.save(self);
|
self->events.save(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_load(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_load(void* p, calldata_t*) noexcept
|
||||||
|
@ -78,9 +78,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.load(self);
|
self->events.load(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_activate(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_activate(void* p, calldata_t*) noexcept
|
||||||
|
@ -91,9 +91,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.activate(self);
|
self->events.activate(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_deactivate(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_deactivate(void* p, calldata_t*) noexcept
|
||||||
|
@ -104,9 +104,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.deactivate(self);
|
self->events.deactivate(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_show(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_show(void* p, calldata_t*) noexcept
|
||||||
|
@ -117,9 +117,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.show(self);
|
self->events.show(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_hide(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_hide(void* p, calldata_t*) noexcept
|
||||||
|
@ -130,9 +130,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.hide(self);
|
self->events.hide(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_enable(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_enable(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -149,9 +149,9 @@ try {
|
||||||
|
|
||||||
self->events.enable(self, enabled);
|
self->events.enable(self, enabled);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_push_to_mute_changed(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_push_to_mute_changed(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -168,9 +168,9 @@ try {
|
||||||
|
|
||||||
self->events.push_to_mute_changed(self, enabled);
|
self->events.push_to_mute_changed(self, enabled);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_push_to_mute_delay(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_push_to_mute_delay(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -187,9 +187,9 @@ try {
|
||||||
|
|
||||||
self->events.push_to_mute_delay(self, delay);
|
self->events.push_to_mute_delay(self, delay);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_push_to_talk_changed(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_push_to_talk_changed(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -206,9 +206,9 @@ try {
|
||||||
|
|
||||||
self->events.push_to_talk_changed(self, enabled);
|
self->events.push_to_talk_changed(self, enabled);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_push_to_talk_delay(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_push_to_talk_delay(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -225,9 +225,9 @@ try {
|
||||||
|
|
||||||
self->events.push_to_talk_delay(self, delay);
|
self->events.push_to_talk_delay(self, delay);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_rename(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_rename(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -249,9 +249,9 @@ try {
|
||||||
|
|
||||||
self->events.rename(self, std::string(new_name ? new_name : ""), std::string(prev_name ? prev_name : ""));
|
self->events.rename(self, std::string(new_name ? new_name : ""), std::string(prev_name ? prev_name : ""));
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_update_properties(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_update_properties(void* p, calldata_t*) noexcept
|
||||||
|
@ -262,9 +262,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.update_properties(self);
|
self->events.update_properties(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_update_flags(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_update_flags(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -281,9 +281,9 @@ try {
|
||||||
|
|
||||||
self->events.update_flags(self, flags);
|
self->events.update_flags(self, flags);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_mute(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_mute(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -300,9 +300,9 @@ try {
|
||||||
|
|
||||||
self->events.mute(self, muted);
|
self->events.mute(self, muted);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_volume(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_volume(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -321,9 +321,9 @@ try {
|
||||||
|
|
||||||
calldata_set_float(calldata, "volume", volume);
|
calldata_set_float(calldata, "volume", volume);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_audio_sync(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_audio_sync(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -342,9 +342,9 @@ try {
|
||||||
|
|
||||||
calldata_set_int(calldata, "offset", mixers);
|
calldata_set_int(calldata, "offset", mixers);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_audio_mixers(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_audio_mixers(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -363,9 +363,9 @@ try {
|
||||||
|
|
||||||
calldata_set_int(calldata, "mixers", mixers);
|
calldata_set_int(calldata, "mixers", mixers);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_audio_data(void* p, obs_source_t*, const audio_data* audio, bool muted) noexcept
|
void obs::deprecated_source::handle_audio_data(void* p, obs_source_t*, const audio_data* audio, bool muted) noexcept
|
||||||
|
@ -377,9 +377,9 @@ try {
|
||||||
|
|
||||||
self->events.audio(self, audio, muted);
|
self->events.audio(self, audio, muted);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_filter_add(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_filter_add(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -396,9 +396,9 @@ try {
|
||||||
|
|
||||||
self->events.filter_add(self, filter);
|
self->events.filter_add(self, filter);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_filter_remove(void* p, calldata_t* calldata) noexcept
|
void obs::deprecated_source::handle_filter_remove(void* p, calldata_t* calldata) noexcept
|
||||||
|
@ -415,9 +415,9 @@ try {
|
||||||
|
|
||||||
self->events.filter_remove(self, filter);
|
self->events.filter_remove(self, filter);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_reorder_filters(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_reorder_filters(void* p, calldata_t*) noexcept
|
||||||
|
@ -428,9 +428,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.reorder_filters(self);
|
self->events.reorder_filters(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_transition_start(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_transition_start(void* p, calldata_t*) noexcept
|
||||||
|
@ -441,9 +441,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.transition_start(self);
|
self->events.transition_start(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_transition_video_stop(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_transition_video_stop(void* p, calldata_t*) noexcept
|
||||||
|
@ -454,9 +454,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.transition_video_stop(self);
|
self->events.transition_video_stop(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::deprecated_source::handle_transition_stop(void* p, calldata_t*) noexcept
|
void obs::deprecated_source::handle_transition_stop(void* p, calldata_t*) noexcept
|
||||||
|
@ -467,9 +467,9 @@ try {
|
||||||
}
|
}
|
||||||
self->events.transition_stop(self);
|
self->events.transition_stop(self);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
obs::deprecated_source::~deprecated_source()
|
obs::deprecated_source::~deprecated_source()
|
||||||
|
|
|
@ -35,7 +35,7 @@ try {
|
||||||
scs_searchdata& sd = reinterpret_cast<scs_searchdata&>(*reinterpret_cast<scs_searchdata*>(searchdata));
|
scs_searchdata& sd = reinterpret_cast<scs_searchdata&>(*reinterpret_cast<scs_searchdata*>(searchdata));
|
||||||
scs_contains(sd, child);
|
scs_contains(sd, child);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool scs_enum_items_cb(obs_scene_t*, obs_sceneitem_t* item, void* searchdata) noexcept
|
static bool scs_enum_items_cb(obs_scene_t*, obs_sceneitem_t* item, void* searchdata) noexcept
|
||||||
|
@ -44,7 +44,7 @@ try {
|
||||||
obs_source_t* source = obs_sceneitem_get_source(item);
|
obs_source_t* source = obs_sceneitem_get_source(item);
|
||||||
return scs_contains(sd, source);
|
return scs_contains(sd, source);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ static std::shared_ptr<gs::vertex_buffer> _gs_fstri_vb;
|
||||||
|
|
||||||
MODULE_EXPORT bool obs_module_load(void)
|
MODULE_EXPORT bool obs_module_load(void)
|
||||||
try {
|
try {
|
||||||
LOG_INFO("Loading Version %s", STREAMFX_VERSION_STRING);
|
DLOG_INFO("Loading Version %s", STREAMFX_VERSION_STRING);
|
||||||
|
|
||||||
// Initialize global configuration.
|
// Initialize global configuration.
|
||||||
streamfx::configuration::initialize();
|
streamfx::configuration::initialize();
|
||||||
|
@ -162,16 +162,16 @@ try {
|
||||||
streamfx::ui::handler::initialize();
|
streamfx::ui::handler::initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_INFO("Loaded Version %s", STREAMFX_VERSION_STRING);
|
DLOG_INFO("Loaded Version %s", STREAMFX_VERSION_STRING);
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE_EXPORT void obs_module_unload(void)
|
MODULE_EXPORT void obs_module_unload(void)
|
||||||
try {
|
try {
|
||||||
LOG_INFO("Unloading Version %s", STREAMFX_VERSION_STRING);
|
DLOG_INFO("Unloading Version %s", STREAMFX_VERSION_STRING);
|
||||||
|
|
||||||
// Frontend
|
// Frontend
|
||||||
#ifdef ENABLE_FRONTEND
|
#ifdef ENABLE_FRONTEND
|
||||||
|
@ -244,9 +244,9 @@ try {
|
||||||
// Finalize Configuration
|
// Finalize Configuration
|
||||||
streamfx::configuration::finalize();
|
streamfx::configuration::finalize();
|
||||||
|
|
||||||
LOG_INFO("Unloaded Version %s", STREAMFX_VERSION_STRING);
|
DLOG_INFO("Unloaded Version %s", STREAMFX_VERSION_STRING);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<util::threadpool> streamfx::threadpool()
|
std::shared_ptr<util::threadpool> streamfx::threadpool()
|
||||||
|
|
|
@ -44,7 +44,7 @@ constexpr std::string_view _cfg_have_shown_about = "UI.HaveShownAboutStreamFX";
|
||||||
constexpr std::string_view _url_report_issue = "https://github.com/Xaymar/obs-StreamFX/issues/new?template=issue.md";
|
constexpr std::string_view _url_report_issue = "https://github.com/Xaymar/obs-StreamFX/issues/new?template=issue.md";
|
||||||
constexpr std::string_view _url_request_help = "https://github.com/Xaymar/obs-StreamFX/issues/new?template=help.md";
|
constexpr std::string_view _url_request_help = "https://github.com/Xaymar/obs-StreamFX/issues/new?template=help.md";
|
||||||
constexpr std::string_view _url_website = "https://streamfx.xaymar.com";
|
constexpr std::string_view _url_website = "https://streamfx.xaymar.com";
|
||||||
constexpr std::string_view _url_discord = "https://discordapp.com/invite/DaeJg7M";
|
constexpr std::string_view _url_discord = "https://discord.gg/rjkxERs";
|
||||||
constexpr std::string_view _url_github = "https://github.com/Xaymar/obs-StreamFX";
|
constexpr std::string_view _url_github = "https://github.com/Xaymar/obs-StreamFX";
|
||||||
|
|
||||||
inline void qt_init_resource()
|
inline void qt_init_resource()
|
||||||
|
|
Loading…
Reference in a new issue