summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-31 13:22:32 +0200
committerwm4 <wm4@nowhere>2016-08-31 13:38:14 +0200
commit7614f2b3a6789c43e2fee1a2bbc0bdbcc72148f0 (patch)
treee4ea242b6e442fd9cd096e38b0c4b9fbdb794b55
parent4d755143216e4d8dec22b4918c1dd290a5efe814 (diff)
downloadmpv-7614f2b3a6789c43e2fee1a2bbc0bdbcc72148f0.tar.bz2
mpv-7614f2b3a6789c43e2fee1a2bbc0bdbcc72148f0.tar.xz
vo_xv: remove an aliased option
Trying to get rid of them, and no-colorkey is an instance of it. Kill it.
-rw-r--r--DOCS/man/vo.rst7
-rw-r--r--video/out/vo_xv.c11
2 files changed, 10 insertions, 8 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst
index c775f6dde7..dda3ea61cd 100644
--- a/DOCS/man/vo.rst
+++ b/DOCS/man/vo.rst
@@ -49,9 +49,11 @@ Available video output drivers are:
set
Same as use but also sets the supplied color key.
- ``ck-method=<man|bg|auto>``
+ ``ck-method=<none|man|bg|auto>``
Sets the color key drawing method (default: man).
+ none
+ Disables color-keying.
man
Draw the color key manually (reduces flicker in some cases).
bg
@@ -63,9 +65,6 @@ Available video output drivers are:
Changes the color key to an RGB value of your choice. ``0x000000`` is
black and ``0xffffff`` is white.
- ``no-colorkey``
- Disables color-keying.
-
``buffers=<number>``
Number of image buffers to use for the internal ringbuffer (default: 2).
Increasing this will use more memory, but might help with the X server
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index e15c12b3b6..b51a57e38c 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -317,7 +317,7 @@ static int xv_init_colorkey(struct vo *vo)
/* check if colorkeying is needed */
xv_atom = xv_intern_atom_if_exists(vo, "XV_COLORKEY");
- if (xv_atom != None && !(ctx->colorkey & 0xFF000000)) {
+ if (xv_atom != None && ctx->xv_ck_info.method != CK_METHOD_NONE) {
if (ctx->xv_ck_info.source == CK_SRC_CUR) {
int colorkey_ret;
@@ -362,8 +362,10 @@ static int xv_init_colorkey(struct vo *vo)
if (xv_atom != None)
XvSetPortAttribute(display, ctx->xv_port, xv_atom, 0);
}
- } else // do no colorkey drawing at all
+ } else { // do no colorkey drawing at all
ctx->xv_ck_info.method = CK_METHOD_NONE;
+ ctx->colorkey = 0xFF000000;
+ }
xv_print_ck_info(vo);
@@ -924,12 +926,13 @@ const struct vo_driver video_out_xv = {
{"set", CK_SRC_SET},
{"cur", CK_SRC_CUR})),
OPT_CHOICE("ck-method", xv_ck_info.method, 0,
- ({"bg", CK_METHOD_BACKGROUND},
+ ({"none", CK_METHOD_NONE},
+ {"bg", CK_METHOD_BACKGROUND},
{"man", CK_METHOD_MANUALFILL},
{"auto", CK_METHOD_AUTOPAINT})),
OPT_INT("colorkey", colorkey, 0),
- OPT_FLAG_STORE("no-colorkey", colorkey, 0, 0x1000000),
OPT_INTRANGE("buffers", cfg_buffers, 0, 1, MAX_BUFFERS),
+ OPT_REMOVED("no-colorkey", "use ck-method=none instead"),
{0}
},
};