diff options
-rw-r--r-- | DOCS/man/en/mplayer.1 | 4 | ||||
-rw-r--r-- | DOCS/man/fr/mplayer.1 | 4 | ||||
-rw-r--r-- | help/help_mp-en.h | 1 | ||||
-rw-r--r-- | libvo/vo_xv.c | 8 | ||||
-rw-r--r-- | libvo/vo_xvmc.c | 6 |
5 files changed, 23 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 9186734729..0b24510041 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3341,6 +3341,8 @@ with \-v option and look out for the lines tagged with [xv common] at the beginning. .PD 0 .RSs +.IPs adaptor=<number> +Select a specific XVideo adaptor (check xvinfo results). .IPs port=<number> Select a specific XVideo port. .IPs ck=<cur|use|set> @@ -3389,6 +3391,8 @@ Video output driver that uses the XvMC (X Video Motion Compensation) extension of XFree86 4.x to speed up MPEG-1/2 and VCR2 decoding. .PD 0 .RSs +.IPs adaptor=<number> +Select a specific XVideo adaptor (check xvinfo results). .IPs port=<number> Select a specific XVideo port. .IPs (no)benchmark diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1 index 473940f6ae..da32704db7 100644 --- a/DOCS/man/fr/mplayer.1 +++ b/DOCS/man/fr/mplayer.1 @@ -3527,6 +3527,8 @@ est utilisée, et comment elle est affichée, lancez MPlayer avec l'option \-v puis regardez les lignes commençant par [xv common]. .PD 0 .RSs +.IPs adaptor=<nombre> +Sélectionne un adaptateur XVideo particulier (cf. xvinfo). .IPs port=<nombre> Sélectionne un port XVideo particulier. .IPs ck=<cur|use|set> @@ -3578,6 +3580,8 @@ Ce pilote emploie l'extension XvMC (X Video Motion Compensation) de XFree86 4.x pour accélérer les lectures de médias MPEG-1/\:2 et VCR2. .PD 0 .RSs +.IPs adaptor=<nombre> +Sélectionne un adaptateur XVideo particulier (cf. xvinfo). .IPs port=<nombre> Sélectionne un port XVideo particulier. .IPs (no)benchmark diff --git a/help/help_mp-en.h b/help/help_mp-en.h index a97938e8c2..fbd39ef7b4 100644 --- a/help/help_mp-en.h +++ b/help/help_mp-en.h @@ -1954,6 +1954,7 @@ static char help_text[]= "[VO_XV] DOCS/HTML/en/video.html#xv!\n"\ "[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.\n"\ "[VO_XV] Try -vo x11.\n" +#define MSGTR_LIBVO_XV_Adaptor "[VO_XV] Using Xv Adaptor #%d (%s)\n" // loader/ldt_keeper.c diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 2a3898889c..aaa9332a43 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -724,11 +724,13 @@ static int preinit(const char *arg) unsigned int i; strarg_t ck_src_arg = { 0, NULL }; strarg_t ck_method_arg = { 0, NULL }; + int xv_adaptor = -1; opt_t subopts[] = { /* name arg type arg var test */ { "port", OPT_ARG_INT, &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 } @@ -799,6 +801,10 @@ static int preinit(const char *arg) for (i = 0; i < adaptors && xv_port == 0; i++) { + /* check if adaptor number has been specified */ + if (xv_adaptor != -1 && xv_adaptor != i) + continue; + if ((ai[i].type & XvInputMask) && (ai[i].type & XvImageMask)) { for (xv_p = ai[i].base_id; @@ -806,6 +812,8 @@ static int preinit(const char *arg) if (!XvGrabPort(mDisplay, xv_p, CurrentTime)) { xv_port = xv_p; + mp_msg(MSGT_VO, MSGL_INFO, + MSGTR_LIBVO_XV_Adaptor, i, ai[i].name); break; } else { diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index e04fbd1332..8fb227eb55 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -57,6 +57,7 @@ static int use_sleep; static int first_frame;//draw colorkey on first frame static int use_queue; static int xv_port_request = 0; +static int xv_adaptor = -1; static int bob_deinterlace; static int top_field_first; @@ -282,6 +283,9 @@ XvMCSurfaceInfo * mc_surf_list; printf("vo_xvmc: Querying %d adaptors\n",num_adaptors); } for(i=0; i<num_adaptors; i++) { + /* check if adaptor number has been specified */ + if (xv_adaptor != -1 && xv_adaptor != i) + continue; if( mp_msg_test(MSGT_VO,MSGL_DBG3) ) { printf("vo_xvmc: Quering adaptor #%d\n",i); } if( ai[i].type == 0 ) continue;// we need at least dummy type! @@ -318,6 +322,7 @@ XvMCSurfaceInfo * mc_surf_list; printf("vo_xvmc: Fail to grab port %ld\n",p); } continue; } + printf("vo_xvmc: Using Xv Adaptor #%d (%s)\n", i, ai[i].name); printf("vo_xvmc: Port %ld grabed\n",p); xv_port = p; } @@ -371,6 +376,7 @@ opt_t subopts [] = { /* name arg type arg var test */ { "port", OPT_ARG_INT, &xv_port_request, (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 }, { "benchmark", OPT_ARG_BOOL, &benchmark, NULL }, |