client API: add a screenshot_raw command

Requested.

The wild code for setting up the mpv_node probably deserves to be
cleaned up later.

Fixes #1800.
This commit is contained in:
wm4
2015-04-20 23:11:03 +02:00
parent ccfe4d6418
commit a3680d1b2d
6 changed files with 67 additions and 0 deletions

View File

@@ -357,6 +357,16 @@ static struct mp_image *screenshot_get(struct MPContext *mpctx, int mode)
return image;
}
struct mp_image *screenshot_get_rgb(struct MPContext *mpctx, int mode)
{
struct mp_image *mpi = screenshot_get(mpctx, mode);
if (!mpi)
return NULL;
struct mp_image *res = convert_image(mpi, IMGFMT_BGR0, mpctx->log);
talloc_free(mpi);
return res;
}
void screenshot_to_file(struct MPContext *mpctx, const char *filename, int mode,
bool osd)
{