|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
[PATCH 2/4] Added configuration parameter for enabling/disabling XLockDisplay callsAdded configuration parameter 'video.output.vdpau_enable_buggy_xcb_workaround'
for enabling/disabling XLockDisplay calls in VDPAU video output driver. It is enabled by default like it is in the current implementation. But on many systems now it works fine without these locks. Disabling it by configuration is easier as changing source code. The whole mechanisms could still be dropped by undefining LOCKDISPLAY in file 'video_out_vdpau.c'. [2] diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c index 34de4cc..4145dcc 100644 --- a/src/video_out/video_out_vdpau.c +++ b/src/video_out/video_out_vdpau.c @@ -188,8 +188,8 @@ static VdpDecoderDestroy *orig_vdp_decoder_destroy; static VdpDecoderRender *orig_vdp_decoder_render; #ifdef LOCKDISPLAY -#define DO_LOCKDISPLAY XLockDisplay(guarded_display); -#define DO_UNLOCKDISPLAY XUnlockDisplay(guarded_display); +#define DO_LOCKDISPLAY if (guarded_display) XLockDisplay(guarded_display); +#define DO_UNLOCKDISPLAY if (guarded_display) XUnlockDisplay(guarded_display); static Display *guarded_display; #else #define DO_LOCKDISPLAY @@ -2528,7 +2528,12 @@ static vo_driver_t *vdpau_open_plugin (video_driver_class_t *class_gen, const vo return NULL; #ifdef LOCKDISPLAY - guarded_display = visual->display; + int buggy_xcb_workaround = config->register_bool( config, "video.output.vdpau_enable_buggy_xcb_workaround", 1, + _("vdpau: Use lock display synchronization for some vdpau calls (workaround for buggy libX11/xcb)"), + _("Enable this if you have a buggy libX11/xcb."), + 10, NULL, this ); + guarded_display = buggy_xcb_workaround ? visual->display: NULL; + fprintf( stderr, "vo_vdpau: %s lock display synchronization for some vdpau calls\n", buggy_xcb_workaround ? "Use": "Do not use" ); #endif this->display = visual->display; ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ xine-devel mailing list xine-devel@... https://lists.sourceforge.net/lists/listinfo/xine-devel |
|
|
Re: [PATCH 2/4] Added configuration parameter for enabling/disabling XLockDisplay callsI demand that Andreas Auras may or may not have written...
> Added configuration parameter 'video.output.vdpau_enable_buggy_xcb_workaround' > for enabling/disabling XLockDisplay calls in VDPAU video output driver. > It is enabled by default like it is in the current implementation. > But on many systems now it works fine without these locks. Disabling it by > configuration is easier as changing source code. > +#define DO_LOCKDISPLAY if (guarded_display) XLockDisplay(guarded_display); That should be wrapped in 'do { ... } while (0)' and without the trailing semicolon: this kind of macro needs to be a single otherwise-complete statement so that it can be used as an ordinary statement, avoiding odd side-effects in, for example, 'if' blocks. Not at all incidentally, I've just fixed up semicolon usage there. (Can we sufficiently easily programatically determine whether the locking is required?) -- | _ | Darren Salt, using Debian GNU/Linux (and Android) | ( ) | | X | ASCII Ribbon campaign against HTML e-mail | / \ | http://www.asciiribbon.org/ You never know who's right, but you always know who's in charge. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ xine-devel mailing list xine-devel@... https://lists.sourceforge.net/lists/listinfo/xine-devel |
|
|
Re: [PATCH 2/4] Added configuration parameter for enabling/disabling XLockDisplay callsAm Dienstag, den 31.01.2012, 15:07 +0000 schrieb Darren Salt:
> I demand that Andreas Auras may or may not have written... > > > Added configuration parameter > 'video.output.vdpau_enable_buggy_xcb_workaround' > > for enabling/disabling XLockDisplay calls in VDPAU video output driver. > > It is enabled by default like it is in the current implementation. > > But on many systems now it works fine without these locks. Disabling it by > > configuration is easier as changing source code. > > > +#define DO_LOCKDISPLAY if (guarded_display) XLockDisplay(guarded_display); > > That should be wrapped in 'do { ... } while (0)' and without the trailing > semicolon: this kind of macro needs to be a single otherwise-complete > statement so that it can be used as an ordinary statement, avoiding odd > side-effects in, for example, 'if' blocks. > > Not at all incidentally, I've just fixed up semicolon usage there. > > (Can we sufficiently easily programatically determine whether the locking is > required?) > Well all my ubuntu systems never have a problem with buggy xcb library. Maybe other can tell what is really going wrong on affected systems. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ xine-devel mailing list xine-devel@... https://lists.sourceforge.net/lists/listinfo/xine-devel |
|
|
Re: [PATCH 2/4] Added configuration parameter for enabling/disabling XLockDisplay callsLe mardi 31 janvier 2012 21:36:37, Andreas Auras a écrit :
> Am Dienstag, den 31.01.2012, 15:07 +0000 schrieb Darren Salt: > > I demand that Andreas Auras may or may not have written... > > > > > Added configuration parameter > > > > 'video.output.vdpau_enable_buggy_xcb_workaround' > > > > > for enabling/disabling XLockDisplay calls in VDPAU video output driver. > > > It is enabled by default like it is in the current implementation. > > > But on many systems now it works fine without these locks. Disabling it > > > by configuration is easier as changing source code. > > > > > > +#define DO_LOCKDISPLAY if (guarded_display) > > > XLockDisplay(guarded_display); > > > > That should be wrapped in 'do { ... } while (0)' and without the trailing > > semicolon: this kind of macro needs to be a single otherwise-complete > > statement so that it can be used as an ordinary statement, avoiding odd > > side-effects in, for example, 'if' blocks. > > > > Not at all incidentally, I've just fixed up semicolon usage there. > > Thanks. This is of course better style. > > > (Can we sufficiently easily programatically determine whether the locking > > is required?) > > Well all my ubuntu systems never have a problem with buggy xcb library. > Maybe other can tell what is really going wrong on affected systems. Deadlock. -- Christophe Thommeret ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ xine-devel mailing list xine-devel@... https://lists.sourceforge.net/lists/listinfo/xine-devel |
|
|
|
|
|
Re: [PATCH 2/4] Added configuration parameter for enabling/disabling XLockDisplay callsI demand that Andreas Auras may or may not have written...
> Added configuration parameter > 'video.output.vdpau_enable_buggy_xcb_workaround' > for enabling/disabling XLockDisplay calls in VDPAU video output driver. > It is enabled by default (like it is in the current implementation). > But on many systems now it works fine without these locks. I'm wondering if we shouldn't just check for the fixed version (by version no.) at compile time... -- | _ | Darren Salt, using Debian GNU/Linux (and Android) | ( ) | | X | ASCII Ribbon campaign against HTML e-mail | / \ | http://www.asciiribbon.org/ All taglines are currently busy. Please try again later. ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ xine-devel mailing list xine-devel@... https://lists.sourceforge.net/lists/listinfo/xine-devel |
| Free embeddable forum powered by Nabble | Forum Help |