mirror of
https://github.com/matrix-construct/construct
synced 2025-03-16 22:41:46 +01:00
modules/media/magick: Stub the progress monitor handler.
This commit is contained in:
parent
c1433402c0
commit
0fd7dd998f
1 changed files with 20 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue