project: Apply formatting

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-07-30 07:25:41 +02:00
parent 298f8e69e0
commit dbb9db596e
5 changed files with 15 additions and 12 deletions

View file

@ -270,8 +270,8 @@ bool ffmpeg_instance::update(obs_data_t* settings)
DLOG_INFO("[%s] Video:", _codec->name);
if (_hwinst) {
DLOG_INFO("[%s] Texture: %" PRId32 "x%" PRId32 " %s %s %s", _codec->name, _context->width, _context->height,
::ffmpeg::tools::get_pixel_format_name(_context->sw_pix_fmt),
DLOG_INFO("[%s] Texture: %" PRId32 "x%" PRId32 " %s %s %s", _codec->name, _context->width,
_context->height, ::ffmpeg::tools::get_pixel_format_name(_context->sw_pix_fmt),
::ffmpeg::tools::get_color_space_name(_context->colorspace),
av_color_range_name(_context->color_range));
} else {
@ -361,7 +361,8 @@ 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),
0, _context->height, vframe->data, vframe->linesize);
if (res <= 0) {
DLOG_ERROR("Failed to convert frame: %s (%" PRId32 ").", ::ffmpeg::tools::get_error_description(res), res);
DLOG_ERROR("Failed to convert frame: %s (%" PRId32 ").", ::ffmpeg::tools::get_error_description(res),
res);
return false;
}
}
@ -701,7 +702,8 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
sent_frame = true;
break;
default:
DLOG_ERROR("Failed to encode frame: %s (%" PRId32 ").", ::ffmpeg::tools::get_error_description(res), res);
DLOG_ERROR("Failed to encode frame: %s (%" PRId32 ").", ::ffmpeg::tools::get_error_description(res),
res);
return false;
}
}
@ -726,7 +728,8 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
}
break;
default:
DLOG_ERROR("Failed to receive packet: %s (%" PRId32 ").", ::ffmpeg::tools::get_error_description(res), res);
DLOG_ERROR("Failed to receive packet: %s (%" PRId32 ").", ::ffmpeg::tools::get_error_description(res),
res);
return false;
}
}

View file

@ -118,8 +118,8 @@ void debug_handler::get_properties(obs_properties_t*, const AVCodec* codec, AVCo
} else {
auto unit_type = unit_types.find(opt->unit);
if (unit_type == unit_types.end()) {
DLOG_INFO(" [%s] Flag '%s' and help text '%s' with value '%" PRId64 "'.", opt->unit, opt->name, opt->help,
opt->default_val.i64);
DLOG_INFO(" [%s] Flag '%s' and help text '%s' with value '%" PRId64 "'.", opt->unit, opt->name,
opt->help, opt->default_val.i64);
} else {
std::string out;
switch (unit_type->second) {

View file

@ -232,8 +232,8 @@ void face_tracking_instance::async_track(std::shared_ptr<void> ptr)
auto prof = _profile_capture_realloc->track();
gs::debug_marker marker{gs::debug_color_allocate, "Reallocate GPU Buffer"};
#endif
_ar_texture =
std::make_shared<gs::texture>(_size.first, _size.second, GS_RGBA, uint32_t(1), nullptr, gs::texture::flags::None);
_ar_texture = std::make_shared<gs::texture>(_size.first, _size.second, GS_RGBA, uint32_t(1), nullptr,
gs::texture::flags::None);
_ar_texture_cuda_fresh = false;
}

View file

@ -98,7 +98,8 @@ gfx::shader::basic_parameter::basic_parameter(gs::effect_parameter param, std::s
for (std::size_t idx = 0; idx < get_size(); idx++) {
snprintf(string_buffer, sizeof(string_buffer), "[%" PRId32 "]", static_cast<int32_t>(idx));
_names[idx] = std::string(string_buffer, string_buffer + strnlen(string_buffer, sizeof(string_buffer)));
snprintf(string_buffer, sizeof(string_buffer), "%s[%" PRId32 "]", get_key().data(), static_cast<int32_t>(idx));
snprintf(string_buffer, sizeof(string_buffer), "%s[%" PRId32 "]", get_key().data(),
static_cast<int32_t>(idx));
_keys[idx] = std::string(string_buffer, string_buffer + strnlen(string_buffer, sizeof(string_buffer)));
}
}

View file

@ -26,8 +26,7 @@
using namespace streamfx::transition::shader;
shader_instance::shader_instance(obs_data_t* data, obs_source_t* self)
: obs::source_instance(data, self)
shader_instance::shader_instance(obs_data_t* data, obs_source_t* self) : obs::source_instance(data, self)
{
_fx = std::make_shared<gfx::shader::shader>(self, gfx::shader::shader_mode::Transition);