summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-05-15 21:19:35 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-05-15 21:19:35 +0300
commita41db36b22053c2cf103899f3510f68ff5645662 (patch)
treee2e3d734a828caf8e1fbf1373d818f06c979e53d /libvo/vo_xv.c
parent267a3f4c9c00848f32c341595d2d831157a79bee (diff)
parent84fa3d69f360c87fce4efe6acb128ad78d3647e2 (diff)
downloadmpv-a41db36b22053c2cf103899f3510f68ff5645662.tar.bz2
mpv-a41db36b22053c2cf103899f3510f68ff5645662.tar.xz
Merge svn changes up to r26783
Conflicts: Makefile common.mak configure libmpcodecs/vd_ffmpeg.c libmpdemux/demux_mkv.c libvo/vo_xv.c mplayer.c
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r--libvo/vo_xv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 7d11feb510..286e04b301 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -736,11 +736,13 @@ static int preinit(struct vo *vo, const char *arg)
struct xvctx *ctx = talloc_zero(vo, struct xvctx);
vo->priv = ctx;
struct vo_x11_state *x11 = vo->x11;
+ int xv_adaptor = -1;
opt_t subopts[] =
{
/* name arg type arg var test */
{ "port", OPT_ARG_INT, &ctx->xv_port, (opt_test_f)int_pos },
+ { "adaptor", OPT_ARG_INT, &xv_adaptor, (opt_test_f)int_non_neg },
{ "ck", OPT_ARG_STR, &ck_src_arg, xv_test_ck },
{ "ck-method", OPT_ARG_STR, &ck_method_arg, xv_test_ckm },
{ NULL }
@@ -812,6 +814,10 @@ static int preinit(struct vo *vo, const char *arg)
for (i = 0; i < ctx->adaptors && x11->xv_port == 0; i++)
{
+ /* check if adaptor number has been specified */
+ if (xv_adaptor != -1 && xv_adaptor != i)
+ continue;
+
if ((ctx->ai[i].type & XvInputMask) && (ctx->ai[i].type & XvImageMask))
{
for (xv_p = ctx->ai[i].base_id;
@@ -819,6 +825,8 @@ static int preinit(struct vo *vo, const char *arg)
if (!XvGrabPort(x11->display, xv_p, CurrentTime))
{
x11->xv_port = xv_p;
+ mp_msg(MSGT_VO, MSGL_INFO,
+ MSGTR_LIBVO_XV_Adaptor, i, ctx->ai[i].name);
break;
} else
{