Changeset e3b4a2c7fad771e31d33650ca887ee907fb9e780
- Timestamp:
- 09/05/07 20:48:21 (2 years ago)
- git-parent:
- Files:
-
- THANKS (modified) (1 diff)
- configure.ac (modified) (1 diff)
- modules/video_output/x11/xcommon.c (modified) (10 diffs)
- modules/video_output/x11/xcommon.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
THANKS
r39df335 re3b4a2c 172 172 Steven Sheehy - wxWidgets interface fix 173 173 Tadashi Jokagi <elf2000 at users.sourceforge dot net> - Japanese translation 174 Tapio Hiltunen <Tapio dot Hiltunen at vtt dot fi> - Maemo X11 enhancements 174 175 Tim 'O Callaghan <tim.ocallaghan at limestudios dot com> - pvr input cleaning patch 175 176 Tim Schuerewegen <ma054331 at skynet dot be> - contrib fixes configure.ac
r263c385 re3b4a2c 5579 5579 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla}) 5580 5580 5581 dnl Tests for Osso and Xsp 5582 AC_CHECK_LIB(osso, osso_display_blanking_pause,[ 5583 PKG_CHECK_MODULES(GLIB2, glib-2.0, [ 5584 VLC_ADD_CPPFLAGS([x11],[-DHAVE_OSSO ${DBUS_CFLAGS} ${GLIB2_CFLAGS}]) 5585 VLC_ADD_LDFLAGS([x11],[-losso]) 5586 ]) 5587 ]) 5588 AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[ 5589 VLC_ADD_CPPFLAGS([x11],[-DHAVE_XSP]) 5590 VLC_ADD_LDFLAGS([x11],[-lXsp]) 5591 ]) 5592 5581 5593 dnl 5582 5594 dnl Mediacontrol Python bindings modules/video_output/x11/xcommon.c
r2d3e647 re3b4a2c 49 49 #endif 50 50 51 #ifdef HAVE_XSP 52 #include <X11/extensions/Xsp.h> 53 #endif 54 51 55 #ifdef HAVE_SYS_SHM_H 52 56 # include <sys/shm.h> /* shmget(), shmctl() */ … … 149 153 150 154 static int X11ErrorHandler( Display *, XErrorEvent * ); 155 156 #ifdef HAVE_XSP 157 static void EnablePixelDoubling( vout_thread_t *p_vout ); 158 static void DisablePixelDoubling( vout_thread_t *p_vout ); 159 #endif 160 161 #ifdef HAVE_OSSO 162 static const int i_backlight_on_interval = 300; 163 #endif 164 165 151 166 152 167 /***************************************************************************** … … 372 387 #endif 373 388 389 #ifdef HAVE_XSP 390 p_vout->p_sys->i_hw_scale = 1; 391 #endif 392 393 #ifdef HAVE_OSSO 394 p_vout->p_sys->i_backlight_on_counter = i_backlight_on_interval; 395 p_vout->p_sys->p_octx = osso_initialize( "vlc", VERSION, 0, NULL ); 396 if ( p_vout->p_sys->p_octx == NULL ) { 397 msg_Err( p_vout, "Could not get osso context" ); 398 } else { 399 msg_Dbg( p_vout, "Initialized osso context" ); 400 } 401 #endif 402 374 403 /* Variable to indicate if the window should be on top of others */ 375 404 /* Trigger a callback right now */ … … 429 458 #endif 430 459 460 #ifdef HAVE_XSP 461 DisablePixelDoubling(p_vout); 462 #endif 463 431 464 DestroyCursor( p_vout ); 432 465 EnableXScreenSaver( p_vout ); … … 440 473 #endif 441 474 475 #ifdef HAVE_OSSO 476 if ( p_vout->p_sys->p_octx != NULL ) { 477 msg_Dbg( p_vout, "Deinitializing osso context" ); 478 osso_deinitialize( p_vout->p_sys->p_octx ); 479 } 480 #endif 481 442 482 free( p_vout->p_sys ); 443 483 } … … 674 714 #endif 675 715 716 #ifdef HAVE_XSP 717 /***************************************************************************** 718 * EnablePixelDoubling: Enables pixel doubling 719 ***************************************************************************** 720 * Checks if the double size image fits in current window, and enables pixel 721 * doubling accordingly. The i_hw_scale is the integer scaling factor. 722 *****************************************************************************/ 723 static void EnablePixelDoubling( vout_thread_t *p_vout ) 724 { 725 int i_hor_scale = ( p_vout->p_sys->p_win->i_width ) / p_vout->render.i_width; 726 int i_vert_scale = ( p_vout->p_sys->p_win->i_height ) / p_vout->render.i_height; 727 if ( ( i_hor_scale > 1 ) && ( i_vert_scale > 1 ) ) { 728 p_vout->p_sys->i_hw_scale = 2; 729 msg_Dbg( p_vout, "Enabling pixel doubling, scaling factor %d", p_vout->p_sys->i_hw_scale ); 730 XSPSetPixelDoubling( p_vout->p_sys->p_display, 0, 1 ); 731 } 732 } 733 734 /***************************************************************************** 735 * DisablePixelDoubling: Disables pixel doubling 736 ***************************************************************************** 737 * The scaling factor i_hw_scale is reset to the no-scaling value 1. 738 *****************************************************************************/ 739 static void DisablePixelDoubling( vout_thread_t *p_vout ) 740 { 741 if ( p_vout->p_sys->i_hw_scale > 1 ) { 742 msg_Dbg( p_vout, "Disabling pixel doubling" ); 743 XSPSetPixelDoubling( p_vout->p_sys->p_display, 0, 0 ); 744 p_vout->p_sys->i_hw_scale = 1; 745 } 746 } 747 #endif 748 749 750 676 751 /***************************************************************************** 677 752 * InitVideo: initialize X11 video thread output method … … 744 819 } 745 820 821 #ifdef HAVE_XSP 822 vout_PlacePicture( p_vout, p_vout->p_sys->p_win->i_width / p_vout->p_sys->i_hw_scale, 823 p_vout->p_sys->p_win->i_height / p_vout->p_sys->i_hw_scale, 824 &i_index, &i_index, 825 &p_vout->fmt_out.i_visible_width, 826 &p_vout->fmt_out.i_visible_height ); 827 #else 746 828 vout_PlacePicture( p_vout, p_vout->p_sys->p_win->i_width, 747 829 p_vout->p_sys->p_win->i_height, … … 749 831 &p_vout->fmt_out.i_visible_width, 750 832 &p_vout->fmt_out.i_visible_height ); 833 #endif 751 834 752 835 p_vout->fmt_out.i_chroma = p_vout->output.i_chroma; … … 1422 1505 xvmc_context_reader_unlock( &p_vout->p_sys->xvmc_lock ); 1423 1506 #endif 1424 1507 1508 #ifdef HAVE_OSSO 1509 if ( p_vout->p_sys->p_octx != NULL ) { 1510 if ( p_vout->p_sys->i_backlight_on_counter == i_backlight_on_interval ) { 1511 if ( osso_display_blanking_pause( p_vout->p_sys->p_octx ) != OSSO_OK ) { 1512 msg_Err( p_vout, "Could not disable backlight blanking" ); 1513 } else { 1514 msg_Dbg( p_vout, "Backlight blanking disabled" ); 1515 } 1516 p_vout->p_sys->i_backlight_on_counter = 0; 1517 } else { 1518 p_vout->p_sys->i_backlight_on_counter ++; 1519 } 1520 } 1521 #endif 1522 1425 1523 vlc_mutex_unlock( &p_vout->p_sys->lock ); 1426 1524 return 0; … … 2118 2216 p_vout->p_sys->p_win->i_width, 2119 2217 p_vout->p_sys->p_win->i_height ); 2218 2219 #ifdef HAVE_XSP 2220 EnablePixelDoubling( p_vout ); 2221 #endif 2222 2120 2223 } 2121 2224 else 2122 2225 { 2123 2226 msg_Dbg( p_vout, "leaving fullscreen mode" ); 2227 2228 #ifdef HAVE_XSP 2229 DisablePixelDoubling( p_vout ); 2230 #endif 2124 2231 2125 2232 XReparentWindow( p_vout->p_sys->p_display, modules/video_output/x11/xcommon.h
r4b4bd31 re3b4a2c 52 52 (i >> 24) & 0xff ) 53 53 54 #ifdef HAVE_OSSO 55 #include <libosso.h> 56 #endif 54 57 55 58 /***************************************************************************** … … 207 210 //alphablend_t alphablend_extra_data; 208 211 #endif 212 213 #ifdef HAVE_XSP 214 int i_hw_scale; 215 #endif 216 217 #ifdef HAVE_OSSO 218 osso_context_t *p_octx; 219 int i_backlight_on_counter; 220 #endif 221 222 209 223 }; 210 224
