diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-06-11 12:59:44 +0300 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-06-11 12:59:44 +0300 |
commit | ae4819e1242d4443346fab86aadcb0041ff1c508 (patch) | |
tree | 31ea7606f8864d09bc13fd95670a15f9c0e455f2 | |
parent | 85c5b26db3a65050d350407f96e268c9aaf7fc18 (diff) | |
download | xine-lib-ae4819e1242d4443346fab86aadcb0041ff1c508.tar.gz xine-lib-ae4819e1242d4443346fab86aadcb0041ff1c508.tar.bz2 |
Query max supported Xv image size
-rw-r--r-- | src/video_out/video_out_xv.c | 22 |
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 */ |