summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_out/video_out_xv.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 2d709c599..4e37e154b 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -1224,6 +1224,8 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
XvAdaptorInfo *adaptor_info;
unsigned int adaptor_num;
xv_prefertype prefer_type;
+ unsigned int nencode = 0;
+ XvEncodingInfo *encodings = NULL;
this = (xv_driver_t *) calloc(1, sizeof(xv_driver_t));
if (!this)
@@ -1502,6 +1504,26 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
}
/*
+ * check max. supported image size
+ */
+
+ XvQueryEncodings(this->display, xv_port, &nencode, &encodings);
+ if (encodings) {
+ int n;
+ for (n = 0; n < nencode; n++) {
+ if (!strcmp(encodings[n].name, "XV_IMAGE")) {
+ xprintf(this->xine, XINE_VERBOSITY_LOG,
+ LOG_MODULE ": max XvImage size %li x %li\n",
+ encodings[n].width, encodings[n].height);
+ this->props[VO_PROP_MAX_VIDEO_WIDTH].value = encodings[n].width;
+ this->props[VO_PROP_MAX_VIDEO_HEIGHT].value = encodings[n].height;
+ break;
+ }
+ }
+ XvFreeEncodingInfo(encodings);
+ }
+
+ /*
* try to create a shared image
* to find out if MIT shm really works, using supported format
*/