[vlc-devel] commit: XCB-XVideo: warn if picture resolution is not supported ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Nov 25 20:01:27 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 25 21:00:34 2009 +0200| [4e35738527f42df490d0ed5a0c91a930d1ab9c19] | committer: Rémi Denis-Courmont 

XCB-XVideo: warn if picture resolution is not supported

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e35738527f42df490d0ed5a0c91a930d1ab9c19
---

 modules/video_output/xcb/xvideo.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index aa55e26..775e8b4 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -35,6 +35,7 @@
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
 #include <vlc_picture_pool.h>
+#include <vlc_dialog.h>
 
 #include "xcb_vlc.h"
 
@@ -269,6 +270,19 @@ FindFormat (vout_display_t *vd,
             msg_Warn (vd, "incompatible size %ux%u -> %"PRIu32"x%"PRIu32,
                       fmt->i_width, fmt->i_height,
                       i->width, i->height);
+            var_Create (vd->p_libvlc, "xvideo-resolution-error", VLC_VAR_BOOL);
+            if (!var_GetBool (vd->p_libvlc, "xvideo-resolution-error"))
+            {
+                dialog_FatalWait (vd, _("Video acceleration not available"),
+                    _("Your video output acceleration driver does not support "
+                      "the required resolution: %ux%u pixels. The maximum "
+                      "supported resolution is %"PRIu32"x%"PRIu32".\n"
+                      "Video output acceleration will be disabled. However, "
+                      "rendering videos with overly large resolution "
+                      "may cause severe performance degration."),
+                                  width, height, i->width, i->height);
+                var_SetBool (vd->p_libvlc, "xvideo-resolution-error", true);
+            }
             free (i);
             continue;
         }




More information about the vlc-devel mailing list