summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_screenshot.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-17 03:50:08 +0100
committerwm4 <wm4@mplayer2.org>2012-02-29 03:41:14 +0100
commit8b69d8a366df590c2160b36269dae424f93eabb7 (patch)
tree584dceea98ff8bb34cf98a279f510d0334edf9cb /libmpcodecs/vf_screenshot.c
parent5fcd29eb4010835d2879304e7a404d575206fcbf (diff)
downloadmpv-8b69d8a366df590c2160b36269dae424f93eabb7.tar.bz2
mpv-8b69d8a366df590c2160b36269dae424f93eabb7.tar.xz
screenshot: allow forcing taking screenshots with the video filter
If the screenshot_force video filter is inserted, taking screenshots will always use the video filter, and skip the VO specific screenshot code. This can be useful if the VO code causes problems, or if it's intended to take screenshots from a specific location in the filter chain. The 'screenshot' filter is intended as fallback, it's not used if possible.
Diffstat (limited to 'libmpcodecs/vf_screenshot.c')
-rw-r--r--libmpcodecs/vf_screenshot.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
index 7f9a45c879..eb961d8118 100644
--- a/libmpcodecs/vf_screenshot.c
+++ b/libmpcodecs/vf_screenshot.c
@@ -197,7 +197,6 @@ static int vf_open(vf_instance_t *vf, char *args)
return 1;
}
-
const vf_info_t vf_info_screenshot = {
"screenshot to file",
"screenshot",
@@ -207,4 +206,15 @@ const vf_info_t vf_info_screenshot = {
NULL
};
+// screenshot.c will look for a filter named "screenshot_force", and not use
+// the VO based screenshot code if it's in the filter chain.
+const vf_info_t vf_info_screenshot_force = {
+ "screenshot to file (override VO based screenshot code)",
+ "screenshot_force",
+ "A'rpi, Jindrich Makovicka",
+ "",
+ vf_open,
+ NULL
+};
+
//===========================================================================//