mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user