diff options
author | cloud11665 <cloud11665@gmail.com> | 2023-04-01 22:03:49 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-07-01 02:05:23 +0000 |
commit | 695172f63e9a8e440d41f50f08af89aa69c602e6 (patch) | |
tree | 071fccabf1cdb1d27a31b693028f5b3b5ea80847 /player/screenshot.c | |
parent | de7f4fb1ee0d7344d6ca91e5c9f52773e5aac778 (diff) | |
download | mpv-695172f63e9a8e440d41f50f08af89aa69c602e6.tar.bz2 mpv-695172f63e9a8e440d41f50f08af89aa69c602e6.tar.xz |
player/screenshot: add "screenshot" logger
Diffstat (limited to 'player/screenshot.c')
-rw-r--r-- | player/screenshot.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/player/screenshot.c b/player/screenshot.c index c6c089b052..1feeba2133 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -21,6 +21,7 @@ #include <libavcodec/avcodec.h> +#include "common/global.h" #include "osdep/io.h" #include "mpv_talloc.h" @@ -48,6 +49,7 @@ typedef struct screenshot_ctx { struct MPContext *mpctx; + struct mp_log *log; // Command to repeat in each-frame mode. struct mp_cmd *each_frame; @@ -62,6 +64,7 @@ void screenshot_init(struct MPContext *mpctx) *mpctx->screenshot_ctx = (screenshot_ctx) { .mpctx = mpctx, .frameno = 1, + .log = mp_log_new(mpctx, mpctx->log, "screenshot") }; } @@ -85,7 +88,7 @@ static bool write_screenshot(struct mp_cmd_ctx *cmd, struct mp_image *img, mp_core_unlock(mpctx); bool ok = img && write_image(img, &opts_copy, filename, mpctx->global, - mpctx->log); + mpctx->screenshot_ctx->log); mp_core_lock(mpctx); |