From: Darren S. <li...@yo...> - 2008-12-28 22:59:08
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1230501938 0 # Node ID 1945b036b8fb162da1ff7b4e926d69a3ef518ebd # Parent 3f5272b7eb3c6ad5decb2590f9d55ea3995858cf Fix up Xv textured video selection for use with drivers for nvidia gfx hw. These drivers use "NV* Video Texture" instead of "* Textured Video". diff -r 1945b036b8fb162da1ff7b4e926d69a3ef518ebd -r 3f5272b7eb3c6ad5decb2590f9d55ea3995858cf src/video_out/video_out_xcbxv.c --- a/src/video_out/video_out_xcbxv.c Sun Dec 28 22:05:38 2008 +0000 +++ b/src/video_out/video_out_xcbxv.c Sun Dec 28 21:21:34 2008 +0000 @@ -1298,7 +1298,7 @@ static xcb_xv_port_t xv_autodetect_port( for (; adaptor_it->rem; xcb_xv_adaptor_info_next(adaptor_it)) if (adaptor_it->data->type & XCB_XV_TYPE_IMAGE_MASK && (prefer_type == xv_prefer_none || - strcasestr (xcb_xv_adaptor_info_name (adaptor_it->data), prefer_types[prefer_type]))) + strcasestr (xcb_xv_adaptor_info_name (adaptor_it->data), prefer_substrings[prefer_type]))) { int j; for (j = 0; j < adaptor_it->data->num_ports; ++j) @@ -1372,7 +1372,7 @@ static vo_driver_t *open_plugin(video_dr VIDEO_DEVICE_XV_PORT_HELP, 20, NULL, NULL); prefer_type = config->register_enum (config, "video.device.xv_preferred_method", 0, - prefer_types, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, + prefer_labels, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, 10, NULL, NULL); if (xv_port != 0) { diff -r 1945b036b8fb162da1ff7b4e926d69a3ef518ebd -r 3f5272b7eb3c6ad5decb2590f9d55ea3995858cf src/video_out/video_out_xv.c --- a/src/video_out/video_out_xv.c Sun Dec 28 22:05:38 2008 +0000 +++ b/src/video_out/video_out_xv.c Sun Dec 28 21:21:34 2008 +0000 @@ -1347,7 +1347,7 @@ static XvPortID xv_autodetect_port(xv_dr for (an = 0; an < adaptors; an++) if (adaptor_info[an].type & XvImageMask && (prefer_type == xv_prefer_none || - strcasestr (adaptor_info[an].name, prefer_types[prefer_type]))) + strcasestr (adaptor_info[an].name, prefer_substrings[prefer_type]))) for (j = 0; j < adaptor_info[an].num_ports; j++) { XvPortID port = adaptor_info[an].base_id + j; if (port >= base && xv_open_port(this, port)) { @@ -1419,7 +1419,7 @@ static vo_driver_t *open_plugin_2 (video VIDEO_DEVICE_XV_PORT_HELP, 20, NULL, NULL); prefer_type = config->register_enum (config, "video.device.xv_preferred_method", 0, - prefer_types, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, + prefer_labels, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, 10, NULL, NULL); if (xv_port != 0) { diff -r 1945b036b8fb162da1ff7b4e926d69a3ef518ebd -r 3f5272b7eb3c6ad5decb2590f9d55ea3995858cf src/video_out/video_out_xxmc.c --- a/src/video_out/video_out_xxmc.c Sun Dec 28 22:05:38 2008 +0000 +++ b/src/video_out/video_out_xxmc.c Sun Dec 28 21:21:34 2008 +0000 @@ -2228,7 +2228,7 @@ static XvPortID xxmc_autodetect_port(xxm for (an = 0; an < adaptors; an++) if (adaptor_info[an].type & XvImageMask && (prefer_type == xv_prefer_none || - strcasestr (adaptor_info[an].name, prefer_types[prefer_type]))) + strcasestr (adaptor_info[an].name, prefer_substrings[prefer_type]))) for (j = 0; j < adaptor_info[an].num_ports; j++) { XvPortID port = adaptor_info[an].base_id + j; if (port >= base && xxmc_open_port(this, port)) { @@ -2448,7 +2448,7 @@ static vo_driver_t *open_plugin (video_d VIDEO_DEVICE_XV_PORT_HELP, 20, NULL, NULL); prefer_type = config->register_enum (config, "video.device.xv_preferred_method", 0, - prefer_types, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, + prefer_labels, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, 10, NULL, NULL); if (xv_port != 0) { diff -r 1945b036b8fb162da1ff7b4e926d69a3ef518ebd -r 3f5272b7eb3c6ad5decb2590f9d55ea3995858cf src/video_out/xv_common.h --- a/src/video_out/xv_common.h Sun Dec 28 22:05:38 2008 +0000 +++ b/src/video_out/xv_common.h Sun Dec 28 21:21:34 2008 +0000 @@ -65,8 +65,10 @@ typedef enum { \ xv_prefer_none, xv_prefer_overlay, xv_prefer_textured, \ } xv_prefertype; \ - static const char *const prefer_types[] = \ - { "Any", "Overlay", "Textured Video", NULL }; + static const char *const prefer_labels[] = \ + { "Any", "Overlay", "Textured Video", NULL }; \ + static const char prefer_substrings[][8] = \ + { "", "Overlay", "Texture" }; #define VIDEO_DEVICE_XV_PREFER_TYPE_HELP \ _("video display method preference"), \ _("Selects which video output method is preferred. " \ |