diff -ru MPlayer-20050304/cfg-mplayer.h MPlayer-20050304.noidle/cfg-mplayer.h
|
old
|
new
|
|
| 69 | 69 | #endif |
| 70 | 70 | extern int WinID; |
| 71 | 71 | |
| | 72 | #ifdef HAVE_XTEST |
| | 73 | extern int xtest_noidle; |
| | 74 | #endif |
| | 75 | |
| 72 | 76 | #ifdef HAVE_MENU |
| 73 | 77 | extern int menu_startup; |
| 74 | 78 | #endif |
| … |
… |
|
| 183 | 187 | {"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL}, |
| 184 | 188 | #endif |
| 185 | 189 | |
| | 190 | #ifdef HAVE_XTEST |
| | 191 | {"xtest-noidle", &xtest_noidle, CONF_TYPE_INT, 0, 0, 0, NULL}, |
| | 192 | #endif |
| | 193 | |
| 186 | 194 | // -vo png only: |
| 187 | 195 | #ifdef HAVE_PNG |
| 188 | 196 | {"z", "-z is replaced by -vo png:z=<0-9>\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, |
diff -ru MPlayer-20050304/libvo/vo_gl.c MPlayer-20050304.noidle/libvo/vo_gl.c
|
old
|
new
|
|
| 371 | 371 | static void |
| 372 | 372 | flip_page(void) |
| 373 | 373 | { |
| | 374 | #ifdef HAVE_XTEST |
| | 375 | vo_x11_noidle(); |
| | 376 | #endif |
| 374 | 377 | |
| 375 | 378 | // glEnable(GL_TEXTURE_2D); |
| 376 | 379 | // glBindTexture(GL_TEXTURE_2D, texture_id); |
diff -ru MPlayer-20050304/libvo/vo_x11.c MPlayer-20050304.noidle/libvo/vo_x11.c
|
old
|
new
|
|
| 568 | 568 | |
| 569 | 569 | static void flip_page(void) |
| 570 | 570 | { |
| | 571 | #ifdef HAVE_XTEST |
| | 572 | vo_x11_noidle(); |
| | 573 | #endif |
| 571 | 574 | Display_Image(myximage, ImageData); |
| 572 | 575 | XSync(mDisplay, False); |
| 573 | 576 | } |
diff -ru MPlayer-20050304/libvo/vo_xv.c MPlayer-20050304.noidle/libvo/vo_xv.c
|
old
|
new
|
|
| 602 | 602 | |
| 603 | 603 | static void flip_page(void) |
| 604 | 604 | { |
| | 605 | #ifdef HAVE_XTEST |
| | 606 | vo_x11_noidle(); |
| | 607 | #endif |
| | 608 | |
| 605 | 609 | put_xvimage( xvimage[current_buf] ); |
| 606 | 610 | |
| 607 | 611 | /* remember the currently visible buffer */ |
diff -ru MPlayer-20050304/libvo/x11_common.c MPlayer-20050304.noidle/libvo/x11_common.c
|
old
|
new
|
|
| 536 | 536 | mDisplay = NULL; |
| 537 | 537 | } |
| 538 | 538 | |
| | 539 | #ifdef HAVE_XTEST |
| | 540 | #include <X11/extensions/XTest.h> |
| | 541 | |
| | 542 | int xtest_noidle = -1; |
| | 543 | static int xtest_noidle_step = 30, xtest_noidle_cpt; |
| | 544 | |
| | 545 | void vo_x11_noidle(void) |
| | 546 | { |
| | 547 | if(--xtest_noidle_cpt > 0) |
| | 548 | return; |
| | 549 | xtest_noidle_cpt = xtest_noidle_step; |
| | 550 | if(!XTestFakeKeyEvent(mDisplay, xtest_noidle, True, 0L) || |
| | 551 | !XTestFakeKeyEvent(mDisplay, xtest_noidle, False, 0L)) { |
| | 552 | mp_msg(MSGT_VO, MSGL_WARN, "Fake key press failed.\n"); |
| | 553 | } |
| | 554 | } |
| | 555 | #endif |
| | 556 | |
| 539 | 557 | #include "osdep/keycodes.h" |
| 540 | 558 | #include "wskeys.h" |
| 541 | 559 | |
| … |
… |
|
| 1700 | 1718 | |
| 1701 | 1719 | int interval, prefer_blank, allow_exp; |
| 1702 | 1720 | |
| | 1721 | #ifdef HAVE_XTEST |
| | 1722 | if(xtest_noidle > 0) { |
| | 1723 | int nothing; |
| | 1724 | |
| | 1725 | if(XTestQueryExtension(mDisplay, ¬hing, ¬hing, |
| | 1726 | ¬hing, ¬hing)) { |
| | 1727 | mp_msg(MSGT_VO, MSGL_V, "Using XTest noidle.\n"); |
| | 1728 | xtest_noidle_cpt = xtest_noidle_step; |
| | 1729 | return; |
| | 1730 | } else { |
| | 1731 | mp_msg(MSGT_VO, MSGL_WARN, "XTest not available.\n"); |
| | 1732 | xtest_noidle = -1; |
| | 1733 | } |
| | 1734 | } |
| | 1735 | #endif |
| | 1736 | |
| 1703 | 1737 | #ifdef HAVE_XDPMS |
| 1704 | 1738 | int nothing; |
| 1705 | 1739 | |
diff -ru MPlayer-20050304/libvo/x11_common.h MPlayer-20050304.noidle/libvo/x11_common.h
|
old
|
new
|
|
| 59 | 59 | extern void vo_x11_fullscreen( void ); |
| 60 | 60 | extern void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer ); |
| 61 | 61 | extern void vo_x11_uninit(); |
| | 62 | extern void vo_x11_noidle( void ); |
| 62 | 63 | extern Colormap vo_x11_create_colormap(XVisualInfo *vinfo); |
| 63 | 64 | extern uint32_t vo_x11_set_equalizer(char *name, int value); |
| 64 | 65 | extern uint32_t vo_x11_get_equalizer(char *name, int *value); |