diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-12-28 22:05:38 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-12-28 22:05:38 +0000 |
commit | fa5be7cfc0d44f3f4f847dd7e595f781b21e3b09 (patch) | |
tree | ab3a8140659927bf113ddf045bae49cccfacef80 | |
parent | 53833ecfeb3b961f6dba3ace15e725b08728efc9 (diff) | |
download | xine-lib-fa5be7cfc0d44f3f4f847dd7e595f781b21e3b09.tar.gz xine-lib-fa5be7cfc0d44f3f4f847dd7e595f781b21e3b09.tar.bz2 |
Fix up Xv textured video selection for use with drivers for nvidia gfx hw.
These drivers use "NV* Video Texture" instead of "* Textured Video".
-rw-r--r-- | src/video_out/video_out_xcbxv.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_xxmc.c | 4 | ||||
-rw-r--r-- | src/video_out/xv_common.h | 6 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index f1f14333d..fbf7ac1d8 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1298,7 +1298,7 @@ static xcb_xv_port_t xv_autodetect_port(xv_driver_t *this, 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_driver_class_t *class_gen, const void *vis 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 --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index d5d854ebf..2c25eb713 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1347,7 +1347,7 @@ static XvPortID xv_autodetect_port(xv_driver_t *this, 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_driver_class_t *class_gen, const void * 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 --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index d30e69247..732f9f712 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2228,7 +2228,7 @@ static XvPortID xxmc_autodetect_port(xxmc_driver_t *this, 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_driver_class_t *class_gen, const void *vi 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 --git a/src/video_out/xv_common.h b/src/video_out/xv_common.h index cac80c0aa..ac16a333a 100644 --- a/src/video_out/xv_common.h +++ b/src/video_out/xv_common.h @@ -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. " \ |