diff options
author | sfan5 <sfan5@live.de> | 2019-09-14 22:06:00 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-09-14 23:02:39 +0200 |
commit | 8925f10962d13d9c3cbcb2e198b892177366c09f (patch) | |
tree | c692f022cfc2693b4d3b36fd47892b7cb469952e /player/screenshot.h | |
parent | 7cf288ec77f838d3a2ca3134c164ddaaf2b6df55 (diff) | |
download | mpv-8925f10962d13d9c3cbcb2e198b892177366c09f.tar.bz2 mpv-8925f10962d13d9c3cbcb2e198b892177366c09f.tar.xz |
image_writer: move convert_image() to player/screenshot.c
Diffstat (limited to 'player/screenshot.h')
-rw-r--r-- | player/screenshot.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/player/screenshot.h b/player/screenshot.h index f479fca3f8..1ccee790d6 100644 --- a/player/screenshot.h +++ b/player/screenshot.h @@ -21,6 +21,8 @@ #include <stdbool.h> struct MPContext; +struct mp_image; +struct mp_log; // One time initialization at program start. void screenshot_init(struct MPContext *mpctx); @@ -28,6 +30,12 @@ void screenshot_init(struct MPContext *mpctx); // Called by the playback core code when a new frame is displayed. void screenshot_flip(struct MPContext *mpctx); +/* Return the image converted to the given format. If the pixel aspect ratio is + * not 1:1, the image is scaled as well. Returns NULL on failure. + */ +struct mp_image *convert_image(struct mp_image *image, int destfmt, + struct mp_log *log); + // Handlers for the user-facing commands. void cmd_screenshot(void *p); void cmd_screenshot_to_file(void *p); |