cocoa_common: create window in the correct screen
[mplayer.git] / screenshot.h
blobc57778c0b36eb858a67306fac4d9b19cc593b18b
1 /*
2 * This file is part of mplayer2.
4 * mplayer2 is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * mplayer2 is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with mplayer2; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_SCREENSHOT_H
20 #define MPLAYER_SCREENSHOT_H
22 #include <stdbool.h>
24 struct MPContext;
25 struct mp_image;
27 // Request a taking & saving a screenshot of the currently displayed frame.
28 // each_frame: If set, this toggles per-frame screenshots, exactly like the
29 // screenshot slave command (MP_CMD_SCREENSHOT).
30 // full_window: If set, save the actual output window contents.
31 void screenshot_request(struct MPContext *mpctx, bool each_frame,
32 bool full_window);
34 // Save the screenshot contained in the image to disk.
35 // The image can be in any format supported by libswscale.
36 void screenshot_save(struct MPContext *mpctx, struct mp_image *image);
38 // Called by the playback core code when a new frame is displayed.
39 void screenshot_flip(struct MPContext *mpctx);
41 #endif /* MPLAYER_SCREENSHOT_H */