summaryrefslogtreecommitdiff
path: root/src/video_out
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-12-28 22:37:46 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-12-28 22:37:46 +0000
commit9b1919bc4c4ca38d41768fd63727cf7b0e279464 (patch)
tree81d2a8eda7558ed37832f113285430731d28f474 /src/video_out
parentbbd913fb70c8c432e846b7f5619669329e913593 (diff)
parent025dd84d92449638ef705dd7fcc20a135c421341 (diff)
downloadxine-lib-9b1919bc4c4ca38d41768fd63727cf7b0e279464.tar.gz
xine-lib-9b1919bc4c4ca38d41768fd63727cf7b0e279464.tar.bz2
Merge from 1.1.
--HG-- rename : src/libxineadec/Makefile.am => src/audio_dec/Makefile.am rename : src/libxinevdec/Makefile.am => src/video_dec/Makefile.am rename : src/libmpeg2/Makefile.am => src/video_dec/libmpeg2/Makefile.am
Diffstat (limited to 'src/video_out')
-rw-r--r--src/video_out/Makefile.am2
-rw-r--r--src/video_out/video_out_xcbxv.c25
-rw-r--r--src/video_out/video_out_xv.c16
-rw-r--r--src/video_out/video_out_xxmc.c14
-rw-r--r--src/video_out/xv_common.h22
5 files changed, 53 insertions, 26 deletions
diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am
index 671e9f0ca..0d3934849 100644
--- a/src/video_out/Makefile.am
+++ b/src/video_out/Makefile.am
@@ -188,7 +188,7 @@ xineplug_vo_out_stk_la_LIBADD = $(XINE_LIB) $(LIBSTK_LIBS) $(PTHREAD_LIBS)
xineplug_vo_out_stk_la_CFLAGS = $(AM_CFLAGS) $(LIBSTK_CFLAGS)
xineplug_vo_out_directx_la_SOURCES = video_out_directx.c
-xineplug_vo_out_directx_la_LIBADD = libyuv2rgb.la $(XINE_LIB) $(DIRECTX_VIDEO_LIBS) $(PTHREAD_LIBS)
+xineplug_vo_out_directx_la_LIBADD = libyuv2rgb.la $(XINE_LIB) $(DIRECTX_VIDEO_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS)
xineplug_vo_out_none_la_SOURCES = video_out_none.c
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c
index c4c188ed4..1564375b7 100644
--- a/src/video_out/video_out_xcbxv.c
+++ b/src/video_out/video_out_xcbxv.c
@@ -153,9 +153,9 @@ typedef struct {
xine_t *xine;
} xv_class_t;
-static const char *const prefer_types[] = VIDEO_DEVICE_XV_PREFER_TYPES;
-static const char *const bicubic_types[] = VIDEO_DEVICE_XV_BICUBIC_TYPES;
-static const char *const sync_atoms[] = VIDEO_DEVICE_XV_VSYNC_ATOMS;
+VIDEO_DEVICE_XV_DECL_BICUBIC_TYPES;
+VIDEO_DEVICE_XV_DECL_PREFER_TYPES;
+VIDEO_DEVICE_XV_DECL_SYNC_ATOMS;
static uint32_t xv_get_capabilities (vo_driver_t *this_gen) {
xv_driver_t *this = (xv_driver_t *) this_gen;
@@ -1134,7 +1134,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)
@@ -1165,7 +1165,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
xcb_xv_list_image_formats_cookie_t list_formats_cookie;
xcb_xv_list_image_formats_reply_t *list_formats_reply;
- xcb_xv_adaptor_info_iterator_t adaptor_it;
+ xcb_xv_adaptor_info_iterator_t adaptor_it, adaptor_first;
xcb_xv_image_format_info_iterator_t format_it;
this = (xv_driver_t *) calloc(1, sizeof(xv_driver_t));
@@ -1203,12 +1203,12 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
return NULL;
}
- adaptor_it = xcb_xv_query_adaptors_info_iterator(query_adaptors_reply);
+ adaptor_first = xcb_xv_query_adaptors_info_iterator(query_adaptors_reply);
xv_port = config->register_num (config, "video.device.xv_port", 0,
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) {
@@ -1216,14 +1216,25 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
xprintf(class->xine, XINE_VERBOSITY_NONE,
_("%s: could not open Xv port %d - autodetecting\n"),
LOG_MODULE, xv_port);
+ adaptor_it = adaptor_first;
xv_port = xv_autodetect_port (this, &adaptor_it, xv_port, prefer_type);
} else
xv_find_adaptor_by_port (xv_port, &adaptor_it);
}
if (!xv_port)
+ {
+ adaptor_it = adaptor_first;
xv_port = xv_autodetect_port (this, &adaptor_it, 0, prefer_type);
+ }
if (!xv_port)
+ {
+ if (prefer_type)
+ xprintf(class->xine, XINE_VERBOSITY_NONE,
+ _("%s: no available ports of type \"%s\", defaulting...\n"),
+ LOG_MODULE, prefer_labels[prefer_type]);
+ adaptor_it = adaptor_first;
xv_port = xv_autodetect_port (this, &adaptor_it, 0, xv_prefer_none);
+ }
if (!xv_port) {
xprintf(class->xine, XINE_VERBOSITY_LOG,
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 6d8771781..a10e8bd36 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -166,9 +166,9 @@ typedef struct {
static int gX11Fail;
-static const char *const prefer_types[] = VIDEO_DEVICE_XV_PREFER_TYPES;
-static const char *const bicubic_types[] = VIDEO_DEVICE_XV_BICUBIC_TYPES;
-static const char *const sync_atoms[] = VIDEO_DEVICE_XV_VSYNC_ATOMS;
+VIDEO_DEVICE_XV_DECL_BICUBIC_TYPES;
+VIDEO_DEVICE_XV_DECL_PREFER_TYPES;
+VIDEO_DEVICE_XV_DECL_SYNC_ATOMS;
static uint32_t xv_get_capabilities (vo_driver_t *this_gen) {
xv_driver_t *this = (xv_driver_t *) this_gen;
@@ -1178,7 +1178,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)) {
@@ -1250,7 +1250,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) {
@@ -1265,7 +1265,13 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
if (!xv_port)
xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, 0, prefer_type);
if (!xv_port)
+ {
+ if (prefer_type)
+ xprintf(class->xine, XINE_VERBOSITY_NONE,
+ _("%s: no available ports of type \"%s\", defaulting...\n"),
+ LOG_MODULE, prefer_labels[prefer_type]);
xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, 0, xv_prefer_none);
+ }
if (!xv_port) {
xprintf(class->xine, XINE_VERBOSITY_LOG,
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index 71bd01020..d0e141c70 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -45,8 +45,8 @@ static void xxmc_frame_updates(xxmc_driver_t *driver, xxmc_frame_t *frame,
static void dispose_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo,
XvImage *myimage);
-static const char *const prefer_types[] = VIDEO_DEVICE_XV_PREFER_TYPES;
-static const char *const bicubic_types[] = VIDEO_DEVICE_XV_BICUBIC_TYPES;
+VIDEO_DEVICE_XV_DECL_BICUBIC_TYPES;
+VIDEO_DEVICE_XV_DECL_PREFER_TYPES;
/*
* Acceleration level priority. Static for now. It may well turn out that IDCT
@@ -2268,7 +2268,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)) {
@@ -2484,7 +2484,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) {
@@ -2499,7 +2499,13 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
if (!xv_port)
xv_port = xxmc_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, 0, prefer_type);
if (!xv_port)
+ {
+ if (prefer_type)
+ xprintf(class->xine, XINE_VERBOSITY_NONE,
+ _("%s: no available ports of type \"%s\", defaulting...\n"),
+ LOG_MODULE, prefer_labels[prefer_type]);
xv_port = xxmc_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, 0, xv_prefer_none);
+ }
if (!xv_port) {
xprintf(class->xine, XINE_VERBOSITY_LOG,
diff --git a/src/video_out/xv_common.h b/src/video_out/xv_common.h
index e24728cdd..ff49286f0 100644
--- a/src/video_out/xv_common.h
+++ b/src/video_out/xv_common.h
@@ -57,22 +57,26 @@
_("pitch alignment workaround"), \
_("Some buggy video drivers need a workaround to function properly.")
-#define VIDEO_DEVICE_XV_VSYNC_ATOMS \
- { "XV_SYNC_TO_VBLANK", "XV_VSYNC" }
+#define VIDEO_DEVICE_XV_DECL_SYNC_ATOMS \
+ static const char *const sync_atoms[] = \
+ { "XV_SYNC_TO_VBLANK", "XV_VSYNC" };
-typedef enum {
- xv_prefer_none, xv_prefer_overlay, xv_prefer_textured
-} xv_prefertype;
-#define VIDEO_DEVICE_XV_PREFER_TYPES \
- { "Any", "Overlay", "Textured Video", NULL }
+#define VIDEO_DEVICE_XV_DECL_PREFER_TYPES \
+ typedef enum { \
+ xv_prefer_none, xv_prefer_overlay, xv_prefer_textured, xv_prefer_blitter, \
+ } xv_prefertype; \
+ static const char *const prefer_labels[] = \
+ { "Any", "Overlay", "Textured Video", "Blitter", NULL }; \
+ static const char prefer_substrings[][8] = \
+ { "", "Overlay", "Texture", "Blitter" };
#define VIDEO_DEVICE_XV_PREFER_TYPE_HELP \
_("video display method preference"), \
_("Selects which video output method is preferred. " \
"Detection is done using the reported Xv adaptor names.\n" \
"(Only applies when auto-detecting which Xv port to use.)")
-#define VIDEO_DEVICE_XV_BICUBIC_TYPES \
- { "Off", "On", "Auto", NULL }
+#define VIDEO_DEVICE_XV_DECL_BICUBIC_TYPES \
+ static const char *const bicubic_types[] = { "Off", "On", "Auto", NULL };
#define VIDEO_DEVICE_XV_BICUBIC_HELP \
_("bicubic filtering"), \
_("This option controls bicubic filtering of the video image. " \