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); DLOG_INFO("[%s] Video:", _codec->name);
if (_hwinst) { if (_hwinst) {
DLOG_INFO("[%s] Texture: %" PRId32 "x%" PRId32 " %s %s %s", _codec->name, _context->width, _context->height, DLOG_INFO("[%s] Texture: %" PRId32 "x%" PRId32 " %s %s %s", _codec->name, _context->width,
::ffmpeg::tools::get_pixel_format_name(_context->sw_pix_fmt), _context->height, ::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 {
@ -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), _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) {
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; return false;
} }
} }
@ -701,7 +702,8 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
sent_frame = true; sent_frame = true;
break; break;
default: 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; return false;
} }
} }
@ -726,7 +728,8 @@ bool ffmpeg_instance::encode_avframe(std::shared_ptr<AVFrame> frame, encoder_pac
} }
break; break;
default: 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; return false;
} }
} }

View file

@ -118,8 +118,8 @@ void debug_handler::get_properties(obs_properties_t*, const AVCodec* codec, AVCo
} 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()) {
DLOG_INFO(" [%s] Flag '%s' and help text '%s' with value '%" PRId64 "'.", opt->unit, opt->name, opt->help, DLOG_INFO(" [%s] Flag '%s' and help text '%s' with value '%" PRId64 "'.", opt->unit, opt->name,
opt->default_val.i64); opt->help, opt->default_val.i64);
} else { } else {
std::string out; std::string out;
switch (unit_type->second) { 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(); auto prof = _profile_capture_realloc->track();
gs::debug_marker marker{gs::debug_color_allocate, "Reallocate GPU Buffer"}; gs::debug_marker marker{gs::debug_color_allocate, "Reallocate GPU Buffer"};
#endif #endif
_ar_texture = _ar_texture = std::make_shared<gs::texture>(_size.first, _size.second, GS_RGBA, uint32_t(1), nullptr,
std::make_shared<gs::texture>(_size.first, _size.second, GS_RGBA, uint32_t(1), nullptr, gs::texture::flags::None); gs::texture::flags::None);
_ar_texture_cuda_fresh = false; _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++) { for (std::size_t idx = 0; idx < get_size(); idx++) {
snprintf(string_buffer, sizeof(string_buffer), "[%" PRId32 "]", static_cast<int32_t>(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))); _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))); _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; using namespace streamfx::transition::shader;
shader_instance::shader_instance(obs_data_t* data, obs_source_t* self) shader_instance::shader_instance(obs_data_t* data, obs_source_t* self) : obs::source_instance(data, self)
: obs::source_instance(data, self)
{ {
_fx = std::make_shared<gfx::shader::shader>(self, gfx::shader::shader_mode::Transition); _fx = std::make_shared<gfx::shader::shader>(self, gfx::shader::shader_mode::Transition);