diff options
author | parkerlreed | 2015-08-10 09:43:53 -0400 |
---|---|---|
committer | parkerlreed | 2015-08-10 09:43:53 -0400 |
commit | 6d49dfefbc1b4d86a51b61fe5524dd821ab355e6 (patch) | |
tree | 1691767d6fb9e4f62d51477ecc3a0190cb338241 | |
download | aur-6d49dfefbc1b4d86a51b61fe5524dd821ab355e6.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 45 | ||||
-rw-r--r-- | PKGBUILD | 76 | ||||
-rw-r--r-- | tvtime-1.0.1-savematte.patch | 567 | ||||
-rw-r--r-- | tvtime-1.0.2-compiler-check.patch | 16 | ||||
-rw-r--r-- | tvtime-1.0.2-fullscreen-crash-fix.patch | 17 | ||||
-rw-r--r-- | tvtime-1.0.2-gcc41.patch | 57 | ||||
-rw-r--r-- | tvtime-1.0.2-libsupc++.patch | 16 | ||||
-rw-r--r-- | tvtime-1.0.2-linuxheaders.patch | 23 | ||||
-rw-r--r-- | tvtime-1.0.2-locale_t-fix.patch | 23 | ||||
-rw-r--r-- | tvtime-1.0.2-xinerama.patch | 32 | ||||
-rw-r--r-- | tvtime-1.0.2-xscreensaver-fix.patch | 130 | ||||
-rw-r--r-- | tvtime-pic.patch | 11 | ||||
-rw-r--r-- | tvtime-setpid.patch | 59 |
13 files changed, 1072 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0752762db779 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,45 @@ +pkgbase = tvtime_patched + pkgdesc = tvtime is a high quality television application for use with video capture cards. Added some patches (Xinemara, save matte settings, icon bug, ...) + pkgver = 1.0.2 + pkgrel = 4 + url = http://tvtime.sourceforge.net/ + arch = i686 + arch = x86_64 + license = GPL + depends = libpng + depends = libxml2 + depends = freetype2 + depends = libxss + depends = libxinerama + depends = libxv + depends = libsm + depends = libxxf86vm + provides = tvtime + conflicts = tvtime + source = http://downloads.sourceforge.net/tvtime/tvtime-1.0.2.tar.gz + source = tvtime-1.0.2-linuxheaders.patch + source = tvtime-1.0.2-gcc41.patch + source = tvtime-1.0.2-libsupc++.patch + source = tvtime-pic.patch + source = tvtime-1.0.2-xinerama.patch + source = tvtime-1.0.1-savematte.patch + source = tvtime-1.0.2-fullscreen-crash-fix.patch + source = tvtime-1.0.2-compiler-check.patch + source = tvtime-1.0.2-locale_t-fix.patch + source = tvtime-setpid.patch + source = tvtime-1.0.2-xscreensaver-fix.patch + md5sums = 4b3d03afe61be239b08b5e522cd8afed + md5sums = 1eb71dcde8371489162792ca14413e25 + md5sums = c782789825dfa664e1f6fcc96ac7246c + md5sums = aa048fd12dfb176e544247148a53bfc7 + md5sums = 4bc08a98c7cc134accb89aea3018c2f6 + md5sums = 7716009f7064bdae850d1464e33f455d + md5sums = faa5a71384f339e871bab9feaebdac2a + md5sums = bc7995998857daf88d0fb75161abe9bd + md5sums = 8844ceef4e2002807cb53c2510a37d9a + md5sums = dd3e388d0dacbe9d05c0a49ce9be147e + md5sums = f42cb93c11644229f9b77f26a4362c6d + md5sums = aed658a5da85bee9c107f339655c3209 + +pkgname = tvtime_patched + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..840e7ae330eb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Parker Reed (parker.l.reed@gmail.com) + +pkgname=tvtime_patched +pkgver=1.0.2 +pkgrel=4 +pkgdesc="tvtime is a high quality television application for use with video capture cards. Added some patches (Xinemara, save matte settings, icon bug, ...)" +depends=('libpng' 'libxml2' 'freetype2' 'libxss' 'libxinerama' 'libxv' 'libsm' 'libxxf86vm') +source=(http://downloads.sourceforge.net/tvtime/tvtime-$pkgver.tar.gz \ + tvtime-1.0.2-linuxheaders.patch \ + tvtime-1.0.2-gcc41.patch \ + tvtime-1.0.2-libsupc++.patch \ + tvtime-pic.patch \ + tvtime-1.0.2-xinerama.patch \ + tvtime-1.0.1-savematte.patch \ + tvtime-1.0.2-fullscreen-crash-fix.patch \ + tvtime-1.0.2-compiler-check.patch \ + tvtime-1.0.2-locale_t-fix.patch \ + tvtime-setpid.patch \ + tvtime-1.0.2-xscreensaver-fix.patch) +url='http://tvtime.sourceforge.net/' +provides=('tvtime') +conflicts=('tvtime') +arch=('i686' 'x86_64') +license=('GPL') +build() { + cd $startdir/src/tvtime-$pkgver + # Add patch to build with linux-headers-2.6.18 and later. Closes bug #159510 + patch -Np1 -i ${startdir}/tvtime-1.0.2-linuxheaders.patch + # Fix for gcc 4.1. + patch -Np1 -i ${startdir}/tvtime-1.0.2-gcc41.patch + # Link to -lsupc++ rather than -lstdc++, this way the dependency over + # libstdc++.so is dropped. + patch -Np1 -i ${startdir}/tvtime-1.0.2-libsupc++.patch + # Fix PIC handling on AMD64 systems when PIE is enabled. + patch -Np1 -i ${startdir}/tvtime-pic.patch + # Xinerama support. + patch -Np1 -i ${startdir}/tvtime-1.0.2-xinerama.patch + # With this patch tvtime saves the matte settings + patch -Np1 -i ${startdir}/tvtime-1.0.1-savematte.patch + # Fix a crash when switching to fullscreen + patch -Np1 -i ${startdir}/tvtime-1.0.2-fullscreen-crash-fix.patch + # Don't generate key events every 30 seconds (patch from + # http://sourceforge.net/tracker/?func=detail&aid=2683274&group_id=64301&atid=506989) + patch -Np1 -i ${startdir}/tvtime-1.0.2-xscreensaver-fix.patch + # Don't explicitly check for CC and CXX, necessary build time deps are handled by pacman, + # the original checks for CC break with e.g. CC="ccache gcc" + patch -Np1 -i ${startdir}/tvtime-1.0.2-compiler-check.patch + # Fix a redefinition of 'locale_t' + patch -Np1 -i ${startdir}/tvtime-1.0.2-locale_t-fix.patch + # set the pid for tvtime + patch -Np1 -i ${startdir}/tvtime-setpid.patch + # use 'tvtime' for the application icon see bug #66293 + sed -i -e "s/tvtime.png/tvtime/" docs/net-tvtime.desktop + sed -i '1,1i#include <zlib.h>' src/pngoutput.c + autoreconf -i + ./configure --prefix=/usr --mandir=/usr/share/man --localstatedir=/var --sysconfdir=/etc || return 1 + make || return 1 +} + +package() { + cd $startdir/src/tvtime-$pkgver + make DESTDIR="$pkgdir" install + install -D -m644 docs/html/default.tvtime.xml $pkgdir/usr/share/tvtime/default.tvtime.xml || return 1 +} +md5sums=('4b3d03afe61be239b08b5e522cd8afed' + '1eb71dcde8371489162792ca14413e25' + 'c782789825dfa664e1f6fcc96ac7246c' + 'aa048fd12dfb176e544247148a53bfc7' + '4bc08a98c7cc134accb89aea3018c2f6' + '7716009f7064bdae850d1464e33f455d' + 'faa5a71384f339e871bab9feaebdac2a' + 'bc7995998857daf88d0fb75161abe9bd' + '8844ceef4e2002807cb53c2510a37d9a' + 'dd3e388d0dacbe9d05c0a49ce9be147e' + 'f42cb93c11644229f9b77f26a4362c6d' + 'aed658a5da85bee9c107f339655c3209') diff --git a/tvtime-1.0.1-savematte.patch b/tvtime-1.0.1-savematte.patch new file mode 100644 index 000000000000..3d34902d4f86 --- /dev/null +++ b/tvtime-1.0.1-savematte.patch @@ -0,0 +1,567 @@ +diff -urNp ./src/commands.c ../tvtime-1.0.1-savematte/src/commands.c +--- ./src/commands.c 2005-09-08 03:31:48.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/commands.c 2007-01-12 18:24:15.000000000 +0000 +@@ -128,6 +128,7 @@ struct commands_s { + int togglepulldowndetection; + int togglematte; + int togglequiet; ++ int changedoverscan; + int framerate; + int scan_channels; + int pause; +@@ -2897,7 +2898,7 @@ void commands_handle( commands_t *cmd, i + case TVTIME_OVERSCAN_DOWN: + cmd->overscan = cmd->overscan + ( (tvtime_cmd == TVTIME_OVERSCAN_UP) ? 0.0025 : -0.0025 ); + if( cmd->overscan > 0.4 ) cmd->overscan = 0.4; if( cmd->overscan < 0.0 ) cmd->overscan = 0.0; +- ++ cmd->changedoverscan = 1; + if( cmd->osd ) { + char message[ 200 ]; + snprintf( message, sizeof( message ), _("Overscan: %.1f%%"), +@@ -3489,6 +3490,7 @@ void commands_next_frame( commands_t *cm + cmd->togglepulldowndetection = 0; + cmd->togglematte = 0; + cmd->togglequiet = 0; ++ cmd->changedoverscan = 0; + cmd->resizewindow = 0; + cmd->setdeinterlacer = 0; + cmd->setfreqtable = 0; +@@ -3536,6 +3538,11 @@ int commands_toggle_aspect( commands_t * + return cmd->toggleaspect; + } + ++int commands_get_changed_overscan( commands_t *cmd ) ++{ ++ return cmd->changedoverscan; ++} ++ + int commands_toggle_alwaysontop( commands_t *cmd ) + { + return cmd->togglealwaysontop; +diff -urNp ./src/commands.h ../tvtime-1.0.1-savematte/src/commands.h +--- ./src/commands.h 2004-10-28 01:50:24.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/commands.h 2007-01-12 18:24:15.000000000 +0000 +@@ -64,6 +64,7 @@ void commands_set_pulldown_alg( commands + int commands_quit( commands_t *cmd ); + int commands_toggle_fullscreen( commands_t *cmd ); + int commands_toggle_aspect( commands_t *cmd ); ++int commands_get_changed_overscan( commands_t *cmd ); + int commands_toggle_deinterlacer( commands_t *cmd ); + int commands_toggle_pulldown_detection( commands_t *cmd ); + int commands_toggle_matte( commands_t *cmd ); +diff -urNp ./src/tvtime.c ../tvtime-1.0.1-savematte/src/tvtime.c +--- ./src/tvtime.c 2005-09-08 03:55:54.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/tvtime.c 2007-01-12 18:29:25.000000000 +0000 +@@ -1062,84 +1062,55 @@ static void build_matte_menu( menu_t *me + char string[ 128 ]; + + menu_set_back_command( menu, TVTIME_SHOW_MENU, "output" ); +- if( sixteennine ) { +- snprintf( string, sizeof( string ), (mode == 0) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("16:9 + Overscan") ); +- menu_set_text( menu, 1, string ); +- menu_set_enter_command( menu, 1, TVTIME_SET_MATTE, "16:9" ); +- snprintf( string, sizeof( string ), (mode == 1) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("1.85:1") ); +- menu_set_text( menu, 2, string ); +- menu_set_enter_command( menu, 2, TVTIME_SET_MATTE, "1.85:1" ); +- snprintf( string, sizeof( string ), (mode == 2) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("2.35:1") ); +- menu_set_text( menu, 3, string ); +- menu_set_enter_command( menu, 3, TVTIME_SET_MATTE, "2.35:1" ); +- snprintf( string, sizeof( string ), (mode == 3) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("4:3 centre") ); +- menu_set_text( menu, 4, string ); +- menu_set_enter_command( menu, 4, TVTIME_SET_MATTE, "4:3" ); +- snprintf( string, sizeof( string ), (mode == 4) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("16:10") ); +- menu_set_text( menu, 5, string ); +- menu_set_enter_command( menu, 5, TVTIME_SET_MATTE, "16:10" ); +- } else { +- snprintf( string, sizeof( string ), (mode == 0) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("4:3 + Overscan") ); +- menu_set_text( menu, 1, string ); +- menu_set_enter_command( menu, 1, TVTIME_SET_MATTE, "4:3" ); +- snprintf( string, sizeof( string ), (mode == 1) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("16:9") ); +- menu_set_text( menu, 2, string ); +- menu_set_enter_command( menu, 2, TVTIME_SET_MATTE, "16:9" ); +- snprintf( string, sizeof( string ), (mode == 2) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("16:10") ); +- menu_set_text( menu, 3, string ); +- menu_set_enter_command( menu, 3, TVTIME_SET_MATTE, "16:10" ); +- snprintf( string, sizeof( string ), (mode == 3) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("1.85:1") ); +- menu_set_text( menu, 4, string ); +- menu_set_enter_command( menu, 4, TVTIME_SET_MATTE, "1.85:1" ); +- snprintf( string, sizeof( string ), (mode == 4) ? +- TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", +- _("2.35:1") ); +- menu_set_text( menu, 5, string ); +- menu_set_enter_command( menu, 5, TVTIME_SET_MATTE, "2.35:1" ); +- } ++ ++ snprintf( string, sizeof( string ), (mode == 0) ? ++ TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", ++ _("4:3") ); ++ menu_set_text( menu, 1, string ); ++ menu_set_enter_command( menu, 1, TVTIME_SET_MATTE, "4:3" ); ++ snprintf( string, sizeof( string ), (mode == 1) ? ++ TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", ++ _("16:10") ); ++ menu_set_text( menu, 2, string ); ++ menu_set_enter_command( menu, 2, TVTIME_SET_MATTE, "16:10" ); ++ snprintf( string, sizeof( string ), (mode == 2) ? ++ TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", ++ _("16:9") ); ++ menu_set_text( menu, 3, string ); ++ menu_set_enter_command( menu, 3, TVTIME_SET_MATTE, "16:9" ); ++ snprintf( string, sizeof( string ), (mode == 3) ? ++ TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", ++ _("1.85:1") ); ++ menu_set_text( menu, 4, string ); ++ menu_set_enter_command( menu, 4, TVTIME_SET_MATTE, "1.85:1" ); ++ snprintf( string, sizeof( string ), (mode == 4) ? ++ TVTIME_ICON_RADIOON " %s" : TVTIME_ICON_RADIOOFF " %s", ++ _("2.35:1") ); ++ menu_set_text( menu, 5, string ); ++ menu_set_enter_command( menu, 5, TVTIME_SET_MATTE, "2.35:1" ); ++ + + snprintf( string, sizeof( string ), TVTIME_ICON_PLAINLEFTARROW " %s", + _("Back") ); + menu_set_text( menu, 6, string ); + menu_set_enter_command( menu, 6, TVTIME_SHOW_MENU, "output" ); + } +- ++ + static void osd_list_matte( tvtime_osd_t *osd, int mode, int sixteennine ) + { + tvtime_osd_list_set_lines( osd, 6 ); + if( sixteennine ) { + tvtime_osd_list_set_text( osd, 0, _("Matte setting (Anamorphic input)") ); +- tvtime_osd_list_set_text( osd, 1, _("16:9 + Overscan") ); +- tvtime_osd_list_set_text( osd, 2, "1.85:1" ); +- tvtime_osd_list_set_text( osd, 3, "2.35:1" ); +- tvtime_osd_list_set_text( osd, 4, _("4:3 centre") ); +- tvtime_osd_list_set_text( osd, 5, "16:10" ); ++ + } else { + tvtime_osd_list_set_text( osd, 0, _("Matte setting (4:3 input)") ); +- tvtime_osd_list_set_text( osd, 1, _("4:3 + Overscan") ); +- tvtime_osd_list_set_text( osd, 2, "16:9" ); +- tvtime_osd_list_set_text( osd, 3, "16:10" ); +- tvtime_osd_list_set_text( osd, 4, "1.85:1" ); +- tvtime_osd_list_set_text( osd, 5, "2.35:1" ); + } ++ tvtime_osd_list_set_text( osd, 1, "4:3" ); ++ tvtime_osd_list_set_text( osd, 2, "16:10" ); ++ tvtime_osd_list_set_text( osd, 3, "16:9" ); ++ tvtime_osd_list_set_text( osd, 4, "1.85:1" ); ++ tvtime_osd_list_set_text( osd, 5, "2.35:1" ); ++ + tvtime_osd_list_set_hilight( osd, mode + 1 ); + tvtime_osd_show_list( osd, 1, 0 ); + } +@@ -1204,6 +1175,7 @@ int tvtime_main( rtctimer_t *rtctimer, i + int matte_y = 0; + int matte_h = 0; + int matte_mode = 0; ++ int matte_changed = 0; + int restarttvtime = 0; + int return_value = 0; + int last_current_id = -1; +@@ -1241,6 +1213,7 @@ int tvtime_main( rtctimer_t *rtctimer, i + output = get_xv_output(); + + sixteennine = config_get_aspect( ct ); ++ matte_mode = config_get_matte( ct ); + + if( !output || !output->init( config_get_geometry( ct ), + sixteennine, config_get_square_pixels( ct ), +@@ -1594,6 +1567,15 @@ int tvtime_main( rtctimer_t *rtctimer, i + build_fspos_menu( commands_get_menu( commands, "fspos" ), + config_get_fullscreen_position( ct ) ); + ++ matte_changed = 1; ++ double matte = 4.0/3.0; ++ ++ /* initialize with safe values until matte is calculated later in the loop. */ ++ matte_x = 0; ++ matte_y = 0; ++ matte_w = width; ++ matte_h = height; ++ + /* Initialize our timestamps. */ + for(;;) { + const char *fifo_args = 0; +@@ -1607,31 +1589,19 @@ int tvtime_main( rtctimer_t *rtctimer, i + int exposed = output->is_exposed(); + int current_id; + ++ + if( vidin && videoinput_has_tuner( vidin ) ) { + current_id = station_get_current_id( stationmgr ); + } else { + current_id = 0; + } +- +- if( matte_mode ) { ++ /* Since the matte/overscan calculations changed these could probably ++ be the same variables, but we'll leave it like this for now. */ + output_x = matte_x; + output_w = matte_w; + output_y = matte_y; + output_h = matte_h; +- } else { +- output_x = (int) ((((double) width) * +- commands_get_overscan( commands )) + 0.5); +- output_w = (int) ((((double) width) - +- (((double) width) * +- commands_get_overscan( commands ) * 2.0)) + +- 0.5); +- output_y = (int) ((((double) height) * +- commands_get_overscan( commands )) + 0.5); +- output_h = (int) ((((double) height) - +- (((double) height) * +- commands_get_overscan( commands ) * 2.0)) + +- 0.5); +- } ++ + + if( fifo ) { + int cmd; +@@ -1766,11 +1736,14 @@ int tvtime_main( rtctimer_t *rtctimer, i + quiet_screenshots ); + commands_refresh_menu( commands ); + } ++ ++ + if( commands_toggle_aspect( commands ) ) { +- matte_mode = 0; +- output->set_matte( 0, 0 ); + if( output->toggle_aspect() ) { + sixteennine = 1; ++ /* Matte is now always applied so we change it to 16:9 mode too so that ++ nothing other than overscan is cropped. */ ++ matte_mode = 2; + if( osd ) { + tvtime_osd_show_message( osd, + _("16:9 display mode active.") ); +@@ -1780,6 +1753,7 @@ int tvtime_main( rtctimer_t *rtctimer, i + ( ( (double) height ) * (16.0 / 9.0) ); + } else { + sixteennine = 0; ++ matte_mode = 0; + if( osd ) { + tvtime_osd_show_message( osd, + _("4:3 display mode active.") ); +@@ -1800,9 +1774,7 @@ int tvtime_main( rtctimer_t *rtctimer, i + output->is_alwaysontop_supported(), + output->is_overscan_supported(), + quiet_screenshots ); +- build_matte_menu( commands_get_menu( commands, "matte" ), +- matte_mode, sixteennine ); +- commands_refresh_menu( commands ); ++ matte_changed = 1; + } + if( commands_get_fs_pos( commands ) ) { + const char *fspos = commands_get_fs_pos( commands ); +@@ -1839,84 +1811,92 @@ int tvtime_main( rtctimer_t *rtctimer, i + } + commands_refresh_menu( commands ); + } ++ ++ /* Overscan has been changed so it is calculated and applied with the matte. ++ So changing it now generated this event so that we can tell it to redo the matte. */ ++ if( commands_get_changed_overscan( commands ) ) { ++ matte_changed = 1; ++ } + if( commands_toggle_matte( commands ) || + commands_get_matte_mode( commands ) ) { +- double matte = 4.0 / 3.0; +- int sqwidth = sixteennine ? +- ((height * 16) / 9) : ((height * 4) / 3); +- int sqheight = sixteennine ? +- ((width * 9) / 16) : ((width * 3) / 4); + +- matte_x = 0; +- matte_w = width; + if( commands_toggle_matte( commands ) ) { + matte_mode = (matte_mode + 1) % 5; + } else { +- if( !strcmp( commands_get_matte_mode( commands ), "16:9" ) ) { +- matte_mode = sixteennine ? 0 : 1; +- } else if( !strcmp( commands_get_matte_mode( commands ), +- "16:10" ) ) { +- matte_mode = sixteennine ? 4 : 2; ++ if( !strcmp( commands_get_matte_mode( commands ), "16:10" ) ) { ++ matte_mode = 1; ++ } else if( !strcmp( commands_get_matte_mode( commands ), ++ "16:9" ) ) { ++ matte_mode = 2; + } else if( !strcmp( commands_get_matte_mode( commands ), + "1.85:1" ) ) { +- matte_mode = sixteennine ? 1 : 3; ++ matte_mode = 3; + } else if( !strcmp( commands_get_matte_mode( commands ), + "2.35:1" ) ) { +- matte_mode = sixteennine ? 2 : 4; ++ matte_mode = 4; + } else { +- matte_mode = sixteennine ? 3 : 0; ++ matte_mode = 0; + } + } +- +- if( sixteennine ) { +- if( matte_mode == 0 ) { +- matte = 16.0 / 9.0; +- } else if( matte_mode == 1 ) { +- matte = 1.85; +- } else if( matte_mode == 2 ) { +- matte = 2.35; +- } else if( matte_mode == 3 ) { +- matte = 4.0 / 3.0; +- matte_w = (int) (((double) sqheight * matte) + 0.5); +- matte_x = (width - matte_w) / 2; +- /* We're cropping the sides off so we add overscan to avoid mess +- * at the top of the screen. */ +- matte_y = commands_get_overscan( commands ) * height / 2; +- matte_h = height - matte_y; +- output->set_matte( (matte_h * 4) / 3, matte_h ); +- } else if( matte_mode == 4 ) { +- matte = 1.6; +- matte_w = (int) (((double) sqheight * matte) + 0.5); +- matte_x = (width - matte_w) / 2; +- /* We're cropping the sides off so we add overscan to avoid mess +- * at the top of the screen. */ +- matte_y = commands_get_overscan( commands ) * height / 2; +- matte_h = height - matte_y; +- output->set_matte( (matte_h * 16) / 10, matte_h ); +- } +- } else { +- if( matte_mode == 1 ) { +- matte = 16.0 / 9.0; +- } else if( matte_mode == 2 ) { +- matte = 1.6; +- } else if( matte_mode == 3 ) { +- matte = 1.85; +- } else if( matte_mode == 4 ) { +- matte = 2.35; +- } +- } +- if( !matte_x ) { +- matte_h = (int) ((((double) sqwidth)/matte) + 0.5); +- matte_y = (height - matte_h) / 2; +- output->set_matte( sqwidth, matte_h ); +- } + if( osd && !commands_menu_active( commands ) ) { + osd_list_matte( osd, matte_mode, sixteennine ); + } + build_matte_menu( commands_get_menu( commands, "matte" ), + matte_mode, sixteennine ); + commands_refresh_menu( commands ); ++ matte_changed = 1; + } ++ if (matte_changed) { ++ matte_changed = 0; ++ ++ /* start with overscan then apply matte */ ++ matte_x = (int) ((((double) width) * ++ commands_get_overscan( commands )) + 0.5); ++ matte_w = (int) ((((double) width) - ++ (((double) width) * ++ commands_get_overscan( commands ) * 2.0)) + ++ 0.5); ++ matte_y = (int) ((((double) height) * ++ commands_get_overscan( commands )) + 0.5); ++ matte_h = (int) ((((double) height) - ++ (((double) height) * ++ commands_get_overscan( commands ) * 2.0)) + ++ 0.5); ++ ++ int sqwidth = sixteennine ? ++ ((matte_h * 16) / 9) : ((matte_h * 4) / 3); ++ int sqheight = sixteennine ? ++ ((matte_w * 9) / 16) : ((matte_w * 3) / 4); ++ ++ if( matte_mode == 0 ) { ++ matte = 4.0 / 3.0; ++ config_save( ct, "Matte", "4:3" ); ++ } else if( matte_mode == 1 ) { ++ matte = 1.6; ++ config_save( ct, "Matte", "16:10" ); ++ } else if( matte_mode == 2 ) { ++ matte = 16.0/9.0; ++ config_save( ct, "Matte", "16:9" ); ++ } else if( matte_mode == 3 ) { ++ matte = 1.85; ++ config_save( ct, "Matte", "1.85:1" ); ++ } else if( matte_mode == 4 ) { ++ matte = 2.35; ++ config_save( ct, "Matte", "2.35:1" ); ++ } ++ ++ if( sixteennine && matte < (16.0/9.0) ) ++ { ++ matte_w = (int) (((double) sqheight * matte) + 0.5); ++ matte_x = (width - matte_w) / 2; ++ output->set_matte( matte_w, sqheight ); ++ } else { ++ matte_h = (int) ((((double) sqwidth)/matte) + 0.5); ++ matte_y = (height - matte_h) / 2; ++ output->set_matte( sqwidth, matte_h ); ++ } ++ } ++ + if( commands_toggle_pulldown_detection( commands ) ) { + if( height == 480 ) { + tvtime->pulldown_alg = +diff -urNp ./src/tvtimeconf.c ../tvtime-1.0.1-savematte/src/tvtimeconf.c +--- ./src/tvtimeconf.c 2005-09-08 05:07:56.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/tvtimeconf.c 2007-01-12 18:26:09.000000000 +0000 +@@ -56,6 +56,7 @@ struct config_s + char *geometry; + int verbose; + int aspect; ++ int matte; + int squarepixels; + int debug; + int fullscreen; +@@ -290,6 +291,22 @@ static void parse_option( config_t *ct, + ct->aspect = atoi( curval ); + } + ++ if( !xmlStrcasecmp( name, BAD_CAST "Matte" ) ) { ++ if(!strcmp( curval, "4:3")) { ++ ct->matte = 0; ++ } else if(!strcmp( curval, "16:10")) { ++ ct->matte = 1; ++ } else if(!strcmp( curval, "16:9")) { ++ ct->matte = 2; ++ } else if(!strcmp( curval, "1.85:1")) { ++ ct->matte = 3; ++ } else if(!strcmp( curval, "2.35:1")) { ++ ct->matte = 4; ++ } ++ /* No valid matte if found ct->matte will be -1 and config_get_matte will choose ++ a default based on the aspect ratio. */ ++ } ++ + if( !xmlStrcasecmp( name, BAD_CAST "DebugMode" ) ) { + ct->debug = atoi( curval ); + } +@@ -712,6 +729,7 @@ config_t *config_new( void ) + ct->geometry = strdup( "0x576" ); + ct->verbose = 0; + ct->aspect = 0; ++ ct->matte = -1; + ct->squarepixels = 1; + ct->debug = 0; + ct->fullscreen = 0; +@@ -807,6 +825,10 @@ config_t *config_new( void ) + ct->keymap[ 'a' ] = TVTIME_TOGGLE_ASPECT; + ct->keymap[ 'f' ] = TVTIME_TOGGLE_FULLSCREEN; + ct->keymap[ 'i' ] = TVTIME_TOGGLE_INPUT; ++ ct->keymap[ 'a' ] = TVTIME_TOGGLE_ASPECT; ++ ct->keymap[ I_INSERT ] = TVTIME_TOGGLE_MATTE; ++ ct->keymap[ ',' ] = TVTIME_OVERSCAN_DOWN; ++ ct->keymap[ '.' ] = TVTIME_OVERSCAN_DOWN; + ct->keymap[ 's' ] = TVTIME_SCREENSHOT; + ct->keymap[ ',' ] = TVTIME_MIXER_TOGGLE_MUTE; + ct->keymap[ 'e' ] = TVTIME_TOGGLE_AUDIO_MODE; +@@ -1451,6 +1473,13 @@ int config_get_aspect( config_t *ct ) + return ct->aspect; + } + ++int config_get_matte( config_t *ct ) ++{ ++ /* If matte is not set then default to 0 for normal or 2 for widescreen. */ ++ if (ct->matte == -1) return ct->aspect * 2; ++ return ct->matte; ++} ++ + int config_get_start_channel( config_t *ct ) + { + return ct->start_channel; +diff -urNp ./src/tvtimeconf.h ../tvtime-1.0.1-savematte/src/tvtimeconf.h +--- ./src/tvtimeconf.h 2005-08-14 18:00:11.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/tvtimeconf.h 2007-01-12 18:24:15.000000000 +0000 +@@ -151,6 +151,7 @@ int config_get_debug( config_t *ct ); + const char *config_get_geometry( config_t *ct ); + int config_get_inputwidth( config_t *ct ); + int config_get_aspect( config_t *ct ); ++int config_get_matte( config_t *ct ); + int config_get_inputnum( config_t *ct ); + const char *config_get_v4l_device( config_t *ct ); + const char *config_get_v4l_norm( config_t *ct ); +diff -urNp ./src/videoinput.c ../tvtime-1.0.1-savematte/src/videoinput.c +--- ./src/videoinput.c 2005-09-08 04:13:37.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/videoinput.c 2007-01-12 18:24:15.000000000 +0000 +@@ -376,6 +376,7 @@ uint8_t *videoinput_next_frame( videoinp + + wait_for_frame_v4l2( vidin ); + ++ videoinput_get_aspect( vidin ); + cur_buf.type = vidin->capbuffers[ 0 ].vidbuf.type; + if( ioctl( vidin->grab_fd, VIDIOC_DQBUF, &cur_buf ) < 0 ) { + /* some drivers return EIO when there is no signal */ +@@ -1148,6 +1149,22 @@ void videoinput_set_saturation_relative( + } + } + ++float videoinput_get_aspect( videoinput_t *vidin ) ++{ ++ float aspect = 1.0; ++ ++ if( vidin->isv4l2 ) { ++ struct v4l2_cropcap cropcap; ++ /* on success 0 is returned */ ++ if( !ioctl( vidin->grab_fd, VIDIOC_CROPCAP, &cropcap ) ) { ++ aspect = (float)cropcap.pixelaspect.numerator / (float)cropcap.pixelaspect.denominator; ++ fprintf( stderr, "videoinput: Aspect ratio: %f\n", aspect); ++ } ++ } ++ ++ return aspect; ++} ++ + static void videoinput_do_mute( videoinput_t *vidin, int mute ) + { + if( vidin->hasaudio && mute != vidin->hw_muted ) { +diff -urNp ./src/videoinput.h ../tvtime-1.0.1-savematte/src/videoinput.h +--- ./src/videoinput.h 2005-09-08 03:55:10.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/videoinput.h 2007-01-12 18:24:15.000000000 +0000 +@@ -71,6 +71,8 @@ typedef struct videoinput_s videoinput_t + #define VIDEOINPUT_LANG1 4 + #define VIDEOINPUT_LANG2 8 + ++float videoinput_get_aspect( videoinput_t *vidin ); ++ + /** + * Possible PAL audio modes, for the cx88 driver that cannot autodetect. + */ +diff -urNp ./src/xvoutput.c ../tvtime-1.0.1-savematte/src/xvoutput.c +--- ./src/xvoutput.c 2005-08-14 18:35:50.000000000 +0100 ++++ ../tvtime-1.0.1-savematte/src/xvoutput.c 2007-01-12 18:24:15.000000000 +0000 +@@ -233,7 +233,7 @@ static int xv_alloc_frame( void ) + { + int size; + uint8_t *alloc; +- ++ + size = input_width * input_height * 2; + if( use_shm ) { + alloc = create_shm( size ); + + diff --git a/tvtime-1.0.2-compiler-check.patch b/tvtime-1.0.2-compiler-check.patch new file mode 100644 index 000000000000..91f732a0fb27 --- /dev/null +++ b/tvtime-1.0.2-compiler-check.patch @@ -0,0 +1,16 @@ +diff -Naurp tvtime-1.0.2.orig/configure.ac tvtime-1.0.2/configure.ac +--- tvtime-1.0.2.orig/configure.ac 2009-05-31 17:54:20.000000000 +0200 ++++ tvtime-1.0.2/configure.ac 2009-05-31 17:58:31.482127573 +0200 +@@ -10,12 +10,7 @@ if test x"$host_alias" = x""; then host_ + + # Check for compilers. + AC_PROG_CC +-AC_CHECK_PROG(found_cc, "$CC", yes, no) +-test "x$found_cc" = "xyes" || exit 1 +- + AC_PROG_CXX +-AC_CHECK_PROG(found_cxx, "$CXX", yes, no) +-test "x$found_cxx" = "xyes" || exit 1 + + # Check for libtool. + AC_PROG_LIBTOOL diff --git a/tvtime-1.0.2-fullscreen-crash-fix.patch b/tvtime-1.0.2-fullscreen-crash-fix.patch new file mode 100644 index 000000000000..f9c2c1355952 --- /dev/null +++ b/tvtime-1.0.2-fullscreen-crash-fix.patch @@ -0,0 +1,17 @@ +This is the patch from +http://sourceforge.net/tracker/?func=detail&aid=1908776&group_id=64301&atid=506989 +to fix a crash when switching to full screen. +diff -up tvtime/src/xfullscreen.c.fsbadval tvtime/src/xfullscreen.c +--- tvtime/src/xfullscreen.c.fsbadval 2008-03-06 15:17:11.000000000 +0100 ++++ tvtime/src/xfullscreen.c 2008-03-06 15:18:21.000000000 +0100 +@@ -263,6 +263,10 @@ void xfullscreen_get_position( xfullscre + int max_area = -1; + int i; + ++ *x = xf->heads[ 0 ].x; ++ *y = xf->heads[ 0 ].y; ++ *w = xf->heads[ 0 ].w; ++ *h = xf->heads[ 0 ].h; + for( i = 0; i < xf->nheads; i++ ) { + int head_x1 = xf->heads[ i ].x; + int head_x2 = xf->heads[ i ].x + xf->heads[ i ].w - 1; diff --git a/tvtime-1.0.2-gcc41.patch b/tvtime-1.0.2-gcc41.patch new file mode 100644 index 000000000000..58e9bb204e10 --- /dev/null +++ b/tvtime-1.0.2-gcc41.patch @@ -0,0 +1,57 @@ +diff -Naur tvtime-1.0.1/plugins/greedyh.asm tvtime-1.0.1-gcc41/plugins/greedyh.asm +--- tvtime-1.0.1/plugins/greedyh.asm 2005-08-14 18:16:43.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/greedyh.asm 2005-11-28 17:53:09.210774544 +0100 +@@ -18,7 +18,7 @@ + + #include "x86-64_macros.inc" + +-void DScalerFilterGreedyH::FUNCT_NAME(TDeinterlaceInfo* pInfo) ++void FUNCT_NAME(TDeinterlaceInfo* pInfo) + { + int64_t i; + bool InfoIsOdd = (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) ? 1 : 0; +diff -Naur tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc +--- tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc 2004-10-20 17:31:05.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc 2005-11-28 17:53:33.251119856 +0100 +@@ -5,9 +5,9 @@ + #endif + + #ifdef USE_STRANGE_BOB +-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n##_SB) ++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n##_SB) + #else +-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n) ++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n) + #endif + + int SEARCH_EFFORT_FUNC(0) // we don't try at all ;-) +diff -Naur tvtime-1.0.1/plugins/tomsmocomp.cpp tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp +--- tvtime-1.0.1/plugins/tomsmocomp.cpp 2004-10-20 19:38:04.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp 2005-11-28 17:52:53.862107896 +0100 +@@ -31,7 +31,7 @@ + + #define IS_MMX + #define SSE_TYPE MMX +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_MMX ++#define FUNCT_NAME filterDScaler_MMX + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_MMX + #undef SSE_TYPE +@@ -39,7 +39,7 @@ + + #define IS_3DNOW + #define SSE_TYPE 3DNOW +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_3DNOW ++#define FUNCT_NAME filterDScaler_3DNOW + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_3DNOW + #undef SSE_TYPE +@@ -47,7 +47,7 @@ + + #define IS_SSE + #define SSE_TYPE SSE +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_SSE ++#define FUNCT_NAME filterDScaler_SSE + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_SSE + #undef SSE_TYPE diff --git a/tvtime-1.0.2-libsupc++.patch b/tvtime-1.0.2-libsupc++.patch new file mode 100644 index 000000000000..cc76d2decc62 --- /dev/null +++ b/tvtime-1.0.2-libsupc++.patch @@ -0,0 +1,16 @@ +Link to libsupc++ instead of bringing in libstdc++ just because tomsocomp +is written in C++. It does not use STL so it needs not the whole standard +library. +Index: tvtime-1.0.2/src/Makefile.am +=================================================================== +--- tvtime-1.0.2.orig/src/Makefile.am ++++ tvtime-1.0.2/src/Makefile.am +@@ -77,7 +77,7 @@ tvtime_CFLAGS = $(TTF_CFLAGS) $(PNG_CFLA + $(PLUGIN_CFLAGS) $(X11_CFLAGS) $(XML2_FLAG) \ + $(FONT_CFLAGS) $(AM_CFLAGS) + tvtime_LDFLAGS = $(TTF_LIBS) $(ZLIB_LIBS) $(PNG_LIBS) \ +- $(X11_LIBS) $(XML2_LIBS) -lm -lstdc++ ++ $(X11_LIBS) $(XML2_LIBS) -lm -lsupc++ + + tvtime_command_SOURCES = utils.h utils.c tvtimeconf.h tvtimeconf.c \ + tvtime-command.c diff --git a/tvtime-1.0.2-linuxheaders.patch b/tvtime-1.0.2-linuxheaders.patch new file mode 100644 index 000000000000..b85484de5a58 --- /dev/null +++ b/tvtime-1.0.2-linuxheaders.patch @@ -0,0 +1,23 @@ +Index: tvtime-1.0.2/src/videoinput.c
+===================================================================
+--- tvtime-1.0.2.orig/src/videoinput.c
++++ tvtime-1.0.2/src/videoinput.c
+@@ -35,8 +35,17 @@
+ #ifdef HAVE_CONFIG_H
+ # include "config.h"
+ #endif
+-#include "videodev.h"
+-#include "videodev2.h"
++#include <libv4l1-videodev.h>
++#include <linux/videodev2.h>
++#include <libv4l1.h>
++
++#ifndef VIDEO_MAX_FRAME
++#define VIDEO_MAX_FRAME 32
++#endif
++
++#ifndef BASE_VIDIOCPRIVATE
++#define BASE_VIDIOCPRIVATE 192
++#endif
+ #include "videoinput.h"
+ #include "mixer.h"
\ No newline at end of file diff --git a/tvtime-1.0.2-locale_t-fix.patch b/tvtime-1.0.2-locale_t-fix.patch new file mode 100644 index 000000000000..7aaa53da136a --- /dev/null +++ b/tvtime-1.0.2-locale_t-fix.patch @@ -0,0 +1,23 @@ +--- tvtime-1.0.2.orig/src/xmltv.c 2004-09-26 18:40:01.000000000 +0200 ++++ tvtime-1.0.2/src/xmltv.c 2009-05-31 18:08:13.228709960 +0200 +@@ -118,9 +118,9 @@ const int num_timezones = sizeof( date_m + typedef struct { + const char *code; + const char *name; +-} locale_t; ++} tv_locale_t; + +-static locale_t locale_table[] = { ++static tv_locale_t locale_table[] = { + {"AA", "Afar"}, {"AB", "Abkhazian"}, {"AF", "Afrikaans"}, + {"AM", "Amharic"}, {"AR", "Arabic"}, {"AS", "Assamese"}, + {"AY", "Aymara"}, {"AZ", "Azerbaijani"}, {"BA", "Bashkir"}, +@@ -168,7 +168,7 @@ static locale_t locale_table[] = { + {"XH", "Xhosa"}, {"YO", "Yoruba"}, {"ZH", "Chinese"}, + {"ZU", "Zulu"} }; + +-const int num_locales = sizeof( locale_table ) / sizeof( locale_t ); ++const int num_locales = sizeof( locale_table ) / sizeof( tv_locale_t ); + + /** + * Timezone parsing code based loosely on the algorithm in diff --git a/tvtime-1.0.2-xinerama.patch b/tvtime-1.0.2-xinerama.patch new file mode 100644 index 000000000000..0964d055768d --- /dev/null +++ b/tvtime-1.0.2-xinerama.patch @@ -0,0 +1,32 @@ +Index: tvtime-1.0.2/configure.ac +=================================================================== +--- tvtime-1.0.2.orig/configure.ac ++++ tvtime-1.0.2/configure.ac +@@ -99,6 +99,8 @@ dnl ------------------------------------ + dnl check for X11, Xv and XF86VidModeExtension + dnl --------------------------------------------- + AC_PATH_XTRA ++AC_ARG_WITH([xinerama], ++ [AS_HELP_STRING([--without-xinerama], [Disable Xinerama extension support (default: check)])]) + if test x"$no_x" != x"yes"; then + dnl check for Xshm + AC_CHECK_LIB([Xext],[XShmCreateImage], +@@ -112,11 +114,13 @@ if test x"$no_x" != x"yes"; then + X11_LIBS="$X11_LIBS -lXv"],, + [$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lXext]) + +- dnl check for Xinerama +- AC_CHECK_LIB([Xinerama],[XineramaQueryScreens], +- [AC_DEFINE([HAVE_XINERAMA],,[Xinerama support]) +- X11_LIBS="$X11_LIBS -lXinerama"],, +- [$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lXext]) ++ if test "x$with_xinerama" != "xno"; then ++ dnl check for Xinerama ++ AC_CHECK_LIB([Xinerama],[XineramaQueryScreens], ++ [AC_DEFINE([HAVE_XINERAMA],,[Xinerama support]) ++ X11_LIBS="$X11_LIBS -lXinerama"],, ++ [$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lXext]) ++ fi + + dnl check for XTest + AC_CHECK_LIB([Xtst],[XTestFakeKeyEvent], diff --git a/tvtime-1.0.2-xscreensaver-fix.patch b/tvtime-1.0.2-xscreensaver-fix.patch new file mode 100644 index 000000000000..49dcf59b0e25 --- /dev/null +++ b/tvtime-1.0.2-xscreensaver-fix.patch @@ -0,0 +1,130 @@ +Based on the patch in +http://sourceforge.net/tracker/?func=detail&aid=2683274&group_id=64301&atid=506989 +--- tvtime-1.0.2.orig/configure.ac ++++ tvtime-1.0.2/configure.ac +@@ -118,10 +118,10 @@ if test x"$no_x" != x"yes"; then + X11_LIBS="$X11_LIBS -lXinerama"],, + [$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lXext]) + +- dnl check for XTest +- AC_CHECK_LIB([Xtst],[XTestFakeKeyEvent], +- [AC_DEFINE([HAVE_XTESTEXTENSION],,[XTest support]) +- X11_LIBS="$X11_LIBS -lXtst"],, ++ dnl check for XSs ++ AC_CHECK_LIB([Xss],[XScreenSaverSuspend], ++ [AC_DEFINE([HAVE_XSSEXTENSION],,[XSs support]) ++ X11_LIBS="$X11_LIBS -lXss"],, + [$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lXext]) + + dnl check for Xvidmode +--- tvtime-1.0.2.orig/src/xcommon.c 2005-08-14 19:36:52.000000000 +0200 ++++ tvtime-1.0.2/src/xcommon.c 2009-05-31 18:44:18.861410600 +0200 +@@ -45,8 +45,8 @@ + #include <X11/keysym.h> + #include <X11/cursorfont.h> + #include <X11/extensions/XShm.h> +-#ifdef HAVE_XTESTEXTENSION +-#include <X11/extensions/XTest.h> ++#ifdef HAVE_XSSEXTENSION ++#include <X11/extensions/scrnsaver.h> + #endif + + #include "xfullscreen.h" +@@ -67,7 +67,7 @@ static Window wm_window; + static Window fs_window; + static Window output_window; + static GC gc; +-static int have_xtest; ++static int have_xss; + static int output_width, output_height; + static int output_aspect; + static int output_on_root; +@@ -107,10 +107,6 @@ static Atom wm_delete_window; + static Atom xawtv_station; + static Atom xawtv_remote; + +-#ifdef HAVE_XTESTEXTENSION +-static KeyCode kc_shift_l; /* Fake key to send. */ +-#endif +- + static area_t video_area; + static area_t window_area; + static area_t scale_area; +@@ -248,12 +244,12 @@ static void x11_wait_mapped( Display *dp + } while ( (event.type != MapNotify) || (event.xmap.event != win) ); + } + +-static int have_xtestextention( void ) ++static int have_xssextention( void ) + { +-#ifdef HAVE_XTESTEXTENSION +- int dummy1, dummy2, dummy3, dummy4; ++#ifdef HAVE_XSSEXTENSION ++ int dummy1, dummy2; + +- return (XTestQueryExtension( display, &dummy1, &dummy2, &dummy3, &dummy4 ) == True); ++ return (XScreenSaverQueryExtension( display, &dummy1, &dummy2 ) == True); + #endif + return 0; + } +@@ -843,7 +839,7 @@ int xcommon_open_display( const char *us + output_aspect = aspect; + output_height = 576; + +- have_xtest = 0; ++ have_xss = 0; + output_on_root = 0; + has_ewmh_state_fullscreen = 0; + has_ewmh_state_above = 0; +@@ -927,13 +923,16 @@ int xcommon_open_display( const char *us + xfullscreen_print_summary( xf ); + } + +-#ifdef HAVE_XTESTEXTENSION +- kc_shift_l = XKeysymToKeycode( display, XK_Shift_L ); +-#endif +- have_xtest = have_xtestextention(); +- if( have_xtest && xcommon_verbose ) { +- fprintf( stderr, "xcommon: Have XTest, will use it to ping the screensaver.\n" ); ++ have_xss = have_xssextention(); ++ if( have_xss && xcommon_verbose ) { ++ fprintf( stderr, "xcommon: Have XSS, will use it to disable the screensaver.\n" ); ++ } ++ ++#ifdef HAVE_XSSEXTENSION ++ if ( have_xss ) { ++ XScreenSaverSuspend( display, True ); + } ++#endif + + /* Initially, get the best width for our height. */ + output_width = xv_get_width_for_height( output_height ); +@@ -1112,15 +1111,7 @@ void xcommon_ping_screensaver( void ) + gettimeofday( &curtime, 0 ); + if( timediff( &curtime, &last_ping_time ) > SCREENSAVER_PING_TIME ) { + last_ping_time = curtime; +-#ifdef HAVE_XTESTEXTENSION +- if( have_xtest ) { +- XTestFakeKeyEvent( display, kc_shift_l, True, CurrentTime ); +- XTestFakeKeyEvent( display, kc_shift_l, False, CurrentTime ); +- } else +-#endif +- { +- XResetScreenSaver( display ); +- } ++ XResetScreenSaver( display ); + } + } + +@@ -1715,6 +1706,11 @@ void xcommon_poll_events( input_t *in ) + + void xcommon_close_display( void ) + { ++#ifdef HAVE_XSSEXTENSION ++ if ( have_xss ) { ++ XScreenSaverSuspend( display, False ); ++ } ++#endif + XDestroyWindow( display, output_window ); + XDestroyWindow( display, wm_window ); + XDestroyWindow( display, fs_window ); diff --git a/tvtime-pic.patch b/tvtime-pic.patch new file mode 100644 index 000000000000..00b040e60af9 --- /dev/null +++ b/tvtime-pic.patch @@ -0,0 +1,11 @@ +--- tvtime/src/cpu_accel.c ++++ tvtime/src/cpu_accel.c +@@ -35,7 +35,7 @@ + int AMD; + uint32_t caps; + +-#ifndef PIC ++#if !defined(__PIC__) || defined(__x86_64__) + #define cpuid(op,eax,ebx,ecx,edx) \ + __asm__ ("cpuid" \ + : "=a" (eax), \ diff --git a/tvtime-setpid.patch b/tvtime-setpid.patch new file mode 100644 index 000000000000..755655cd8426 --- /dev/null +++ b/tvtime-setpid.patch @@ -0,0 +1,59 @@ +--- a/src/xcommon.c 2005-08-14 19:36:52.000000000 +0200 ++++ b/src/xcommon.c 2010-03-07 17:55:52.669570209 +0100 +@@ -25,6 +25,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <unistd.h> + + #if defined(__FreeBSD__) + #include <machine/param.h> +@@ -106,6 +107,7 @@ + static Atom wm_delete_window; + static Atom xawtv_station; + static Atom xawtv_remote; ++static Atom net_wm_pid; + + #ifdef HAVE_XTESTEXTENSION + static KeyCode kc_shift_l; /* Fake key to send. */ +@@ -150,11 +152,12 @@ + "WM_PROTOCOLS", + "WM_DELETE_WINDOW", + "_XAWTV_STATION", +- "_XAWTV_REMOTE" ++ "_XAWTV_REMOTE", ++ "_NET_WM_PID" + }; +- Atom atoms_return[ 17 ]; ++ Atom atoms_return[ 18 ]; + +- XInternAtoms( display, atom_names, 17, False, atoms_return ); ++ XInternAtoms( display, atom_names, 18, False, atoms_return ); + net_supporting_wm_check = atoms_return[ 0 ]; + net_supported = atoms_return[ 1 ]; + net_wm_name = atoms_return[ 2 ]; +@@ -172,6 +175,7 @@ + wm_delete_window = atoms_return[ 14 ]; + xawtv_station = atoms_return[ 15 ]; + xawtv_remote = atoms_return[ 16 ]; ++ net_wm_pid = atoms_return[ 17 ]; + } + + static uint32_t icon_colours[256]; +@@ -1017,6 +1021,16 @@ + free( data ); + } + } ++ ++ /* Set _NET_WM_PID */ ++ { ++ if( xcommon_verbose ) { ++ fprintf( stderr, "xcommon: try to set _NET_WM_PID" ); ++ } ++ pid_t mypid = getpid(); ++ XChangeProperty(display, wm_window, net_wm_pid, cardinal, 32, ++ PropModeReplace, (const unsigned char*) &mypid, 1); ++ } + + if( check_for_EWMH_wm( display, &wmname ) ) { + if( xcommon_verbose ) { |