0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

modules/media/magick: Stub the progress monitor handler.

This commit is contained in:
Jason Volk 2019-05-29 04:55:09 -07:00
parent c1433402c0
commit 0fd7dd998f

View file

@ -17,6 +17,7 @@ namespace ircd::magick
static void handle_error(const ::ExceptionType, const char *, const char *) noexcept;
static void handle_warning(const ::ExceptionType, const char *, const char *) noexcept;
static void handle_log(const ::ExceptionType, const char *) noexcept;
static uint handle_monitor(const char *, const int64_t, const uint64_t, ExceptionInfo *) noexcept;
template<class R, class F, class... A> static R call(F&&, A&&...);
template<class R, class F, class... A> static R callex(F&&, A&&...);
@ -76,6 +77,7 @@ ircd::magick::init()
::SetWarningHandler(handle_warning);
::SetErrorHandler(handle_error);
::SetFatalErrorHandler(handle_fatal);
::SetMonitorHandler(handle_monitor);
::SetMagickResourceLimit(ThreadsResource, 1UL);
log::debug
@ -222,6 +224,24 @@ ircd::magick::call(function&& f,
return f(std::forward<args>(a)...);
}
uint
ircd::magick::handle_monitor(const char *text,
const int64_t quantum,
const uint64_t span,
ExceptionInfo *ei)
noexcept
{
log::debug
{
log, "progress [%s] %ld:%ld",
text,
quantum,
span
};
return true; // return false to interrupt
}
void
ircd::magick::handle_log(const ::ExceptionType type,
const char *const message)