recordmydesktop-svn-commit Mailing List for recordMyDesktop (Page 2)
Status: Alpha
Brought to you by:
enselic
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(39) |
Oct
(6) |
Nov
(16) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(14) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: svn c. f. r. <rec...@li...> - 2008-11-21 18:56:49
|
Revision: 577 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=577&view=rev Author: iovar Date: 2008-11-21 18:56:44 +0000 (Fri, 21 Nov 2008) Log Message: ----------- updated parameters in the arguments list to match these of recordMyDesktop 0.3.8 Modified Paths: -------------- trunk/gtk-recordmydesktop/src/rmdTrayIcon.py Modified: trunk/gtk-recordmydesktop/src/rmdTrayIcon.py =================================================================== --- trunk/gtk-recordmydesktop/src/rmdTrayIcon.py 2008-11-21 18:56:01 UTC (rev 576) +++ trunk/gtk-recordmydesktop/src/rmdTrayIcon.py 2008-11-21 18:56:44 UTC (rev 577) @@ -137,14 +137,14 @@ self.parent.update() self.ch_err="" self.execargs=["recordmydesktop","-o",'%s'%self.parent.values[4], - "-fps","%d"%self.parent.values[0]] + "--fps","%d"%self.parent.values[0]] if self.parent.values[2]==False : self.execargs.append("--no-sound") if self.parent.values[1] == 1: - self.execargs.append("-dummy-cursor") + self.execargs.append("--dummy-cursor") self.execargs.append("white") elif self.parent.values[1] == 2: - self.execargs.append("-dummy-cursor") + self.execargs.append("--dummy-cursor") self.execargs.append("black") elif self.parent.values[1] == 3: self.execargs.append("--no-cursor") @@ -161,33 +161,33 @@ self.execargs.append('-y') self.execargs.append('%d'%self.parent.values[5][1]) if self.parent.values[5][2]>0 and self.parent.values[5][3]>0: - self.execargs.append('-width') + self.execargs.append('--width') self.execargs.append('%d'%(self.parent.values[5][2]-self.parent.values[5][0])) - self.execargs.append('-height') + self.execargs.append('--height') self.execargs.append('%d'%(self.parent.values[5][3]-self.parent.values[5][1])) if(not self.parent.values[14]): for i in range(4): self.parent.values[5][i]=-1 if self.parent.values[6]>0: - self.execargs.append('-delay') + self.execargs.append('--delay') self.execargs.append('%d'%self.parent.values[6]) - self.execargs.append('-channels') + self.execargs.append('--channels') self.execargs.append('%d'%self.parent.values[7]) - self.execargs.append('-freq') + self.execargs.append('--freq') self.execargs.append('%d'%self.parent.values[8]) if self.parent.values[9]!='DEFAULT': - self.execargs.append('-device') + self.execargs.append('--device') self.execargs.append('%s'%self.parent.values[9]) - self.execargs.append('-v_quality') + self.execargs.append('--v_quality') self.execargs.append('%d'%self.parent.values[10]) - self.execargs.append('-s_quality') + self.execargs.append('--s_quality') self.execargs.append('%d'%self.parent.values[11]) if self.parent.values[12] != "$DISPLAY": - self.execargs.append('-display') + self.execargs.append('--display') self.execargs.append('%s'%self.parent.values[12]) if self.parent.values[16] == 0: self.execargs.append('--quick-subsampling') - self.execargs.append('-workdir') + self.execargs.append('--workdir') self.execargs.append('%s'%self.parent.values[17]) if self.parent.values[18] == 0: self.execargs.append('--on-the-fly-encoding') @@ -198,7 +198,7 @@ if self.parent.values[15] == 0: self.execargs.append('--follow-mouse') if self.parent.values[22] == True: - self.execargs.append('-use-jack') + self.execargs.append('--use-jack') for i in self.parent.values[23]: self.execargs.append(i) if self.parent.values[25] == 1: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-21 18:56:11
|
Revision: 576 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=576&view=rev Author: iovar Date: 2008-11-21 18:56:01 +0000 (Fri, 21 Nov 2008) Log Message: ----------- updated parameters in the arguments list to match these of recordMyDesktop 0.3.8 Modified Paths: -------------- trunk/qt-recordmydesktop/src/rmdTrayIcon.py Modified: trunk/qt-recordmydesktop/src/rmdTrayIcon.py =================================================================== --- trunk/qt-recordmydesktop/src/rmdTrayIcon.py 2008-11-16 13:57:16 UTC (rev 575) +++ trunk/qt-recordmydesktop/src/rmdTrayIcon.py 2008-11-21 18:56:01 UTC (rev 576) @@ -125,14 +125,14 @@ self.parent.update() self.ch_err="" self.execargs=["recordmydesktop","-o",'%s'%self.parent.values[4], - "-fps","%d"%self.parent.values[0]] + "--fps","%d"%self.parent.values[0]] if self.parent.values[2]==False : self.execargs.append("--no-sound") if self.parent.values[1] == 1: - self.execargs.append("-dummy-cursor") + self.execargs.append("--dummy-cursor") self.execargs.append("white") elif self.parent.values[1] == 2: - self.execargs.append("-dummy-cursor") + self.execargs.append("--dummy-cursor") self.execargs.append("black") elif self.parent.values[1] == 3: self.execargs.append("--no-cursor") @@ -150,33 +150,33 @@ self.execargs.append('-y') self.execargs.append('%d'%self.parent.values[5][1]) if self.parent.values[5][2]>0 and self.parent.values[5][3]>0: - self.execargs.append('-width') + self.execargs.append('--width') self.execargs.append('%d'%(self.parent.values[5][2]-self.parent.values[5][0])) - self.execargs.append('-height') + self.execargs.append('--height') self.execargs.append('%d'%(self.parent.values[5][3]-self.parent.values[5][1])) if(not self.parent.values[14]): for i in range(4): self.parent.values[5][i]=-1 if self.parent.values[6]>0: - self.execargs.append('-delay') + self.execargs.append('--delay') self.execargs.append('%d'%self.parent.values[6]) - self.execargs.append('-channels') + self.execargs.append('--channels') self.execargs.append('%d'%self.parent.values[7]) - self.execargs.append('-freq') + self.execargs.append('--freq') self.execargs.append('%d'%self.parent.values[8]) if self.parent.values[9]!='DEFAULT': - self.execargs.append('-device') + self.execargs.append('--device') self.execargs.append('%s'%self.parent.values[9]) - self.execargs.append('-v_quality') + self.execargs.append('--v_quality') self.execargs.append('%d'%self.parent.values[10]) - self.execargs.append('-s_quality') + self.execargs.append('--s_quality') self.execargs.append('%d'%self.parent.values[11]) if self.parent.values[12] != "$DISPLAY": - self.execargs.append('-display') + self.execargs.append('--display') self.execargs.append('%s'%self.parent.values[12]) if self.parent.values[16] == 0: self.execargs.append('--quick-subsampling') - self.execargs.append('-workdir') + self.execargs.append('--workdir') self.execargs.append('%s'%self.parent.values[17]) if self.parent.values[18] == 0: self.execargs.append('--on-the-fly-encoding') @@ -187,7 +187,7 @@ if self.parent.values[15] == 0: self.execargs.append('--follow-mouse') if self.parent.values[22] == True: - self.execargs.append('-use-jack') + self.execargs.append('--use-jack') for i in self.parent.values[23]: self.execargs.append(i) if self.parent.values[25] == 1: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-16 13:57:21
|
Revision: 575 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=575&view=rev Author: iovar Date: 2008-11-16 13:57:16 +0000 (Sun, 16 Nov 2008) Log Message: ----------- src/Makefile.am, Makefile.am, autogen.sh, configure.ac: Changed Automake requirement to 1.9 and made some minor changes to accomodate the removal of the m4 macros, as per rev #573 Revision Links: -------------- http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=573&view=rev Modified Paths: -------------- trunk/gtk-recordmydesktop/Makefile.am trunk/gtk-recordmydesktop/autogen.sh trunk/gtk-recordmydesktop/configure.ac trunk/gtk-recordmydesktop/src/Makefile.am Modified: trunk/gtk-recordmydesktop/Makefile.am =================================================================== --- trunk/gtk-recordmydesktop/Makefile.am 2008-11-16 13:52:40 UTC (rev 574) +++ trunk/gtk-recordmydesktop/Makefile.am 2008-11-16 13:57:16 UTC (rev 575) @@ -1,11 +1,8 @@ -AUTOMAKE_OPTIONS = 1.5 +AUTOMAKE_OPTIONS = 1.9 ACLOCAL_AMFLAGS = -I m4 -include $(srcdir)/m4/common.mk -include $(srcdir)/m4/pychecker.mk - SUBDIRS = src po m4 EXTRA_DIST= config.rpath Modified: trunk/gtk-recordmydesktop/autogen.sh =================================================================== --- trunk/gtk-recordmydesktop/autogen.sh 2008-11-16 13:52:40 UTC (rev 574) +++ trunk/gtk-recordmydesktop/autogen.sh 2008-11-16 13:57:16 UTC (rev 575) @@ -1,7 +1,7 @@ #/bin/bash -aclocal-1.7 -I m4/ -automake-1.7 --add-missing +aclocal -I m4/ +automake --add-missing autoconf Modified: trunk/gtk-recordmydesktop/configure.ac =================================================================== --- trunk/gtk-recordmydesktop/configure.ac 2008-11-16 13:52:40 UTC (rev 574) +++ trunk/gtk-recordmydesktop/configure.ac 2008-11-16 13:57:16 UTC (rev 575) @@ -1,7 +1,7 @@ AC_PREREQ(2.59) -AC_INIT(src/rmdSimple.py) -AM_INIT_AUTOMAKE(gtk-recordmydesktop, 0.3.7.2) +AC_INIT([gtk-recordmydesktop], [0.3.7.2]) +AM_INIT_AUTOMAKE AS_AC_EXPAND(LIBDIR, $libdir) AC_MSG_NOTICE(Storing library files in $LIBDIR) Modified: trunk/gtk-recordmydesktop/src/Makefile.am =================================================================== --- trunk/gtk-recordmydesktop/src/Makefile.am 2008-11-16 13:52:40 UTC (rev 574) +++ trunk/gtk-recordmydesktop/src/Makefile.am 2008-11-16 13:57:16 UTC (rev 575) @@ -1,5 +1,3 @@ -include $(top_srcdir)/m4/python.mk - bin_SCRIPTS=gtk-recordMyDesktop gtk_recordMyDesktopdir=$(pythondir)/recordMyDesktop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-16 13:52:45
|
Revision: 574 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=574&view=rev Author: iovar Date: 2008-11-16 13:52:40 +0000 (Sun, 16 Nov 2008) Log Message: ----------- py-compile removed, since it's created at configuration Removed Paths: ------------- trunk/gtk-recordmydesktop/py-compile Deleted: trunk/gtk-recordmydesktop/py-compile =================================================================== --- trunk/gtk-recordmydesktop/py-compile 2008-11-16 13:52:01 UTC (rev 573) +++ trunk/gtk-recordmydesktop/py-compile 2008-11-16 13:52:40 UTC (rev 574) @@ -1,92 +0,0 @@ -#!/bin/sh - -# py-compile - Compile a Python program -# Copyright 2000, 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# called as "py-compile [--basedir DIR] PY_FILES ... - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -basedir= - -case "$1" in - --basedir) - basedir=$2 - shift 2 - ;; - --help) - echo "Usage: py-compile [--basedir DIR] PY_FILES ..." - echo "Byte compile some python scripts. This should be performed" - echo "after they have been moved to the final installation location" - exit 0 - ;; - --version) - echo "py-compile version 0.0" - exit 0 - ;; -esac - -if [ $# = 0 ]; then - echo "No files given to $0" 1>&2 - exit 1 -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - trans="path = file" -else - trans="path = os.path.join('$basedir', file)" -fi - -$PYTHON -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules...' -for file in string.split(files): - $trans - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path) -print" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules (optimized versions) ...' -for file in string.split(files): - $trans - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path) -print" 2>/dev/null || : - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-16 13:52:08
|
Revision: 573 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=573&view=rev Author: iovar Date: 2008-11-16 13:52:01 +0000 (Sun, 16 Nov 2008) Log Message: ----------- removed unneccessary macro files: as-python.m4 as-version.m4 py-compile-destdir common.mk python.mk pychecker.mk Modified Paths: -------------- trunk/gtk-recordmydesktop/m4/Makefile.am Removed Paths: ------------- trunk/gtk-recordmydesktop/m4/as-python.m4 trunk/gtk-recordmydesktop/m4/as-version.m4 trunk/gtk-recordmydesktop/m4/common.mk trunk/gtk-recordmydesktop/m4/py-compile-destdir trunk/gtk-recordmydesktop/m4/pychecker.mk trunk/gtk-recordmydesktop/m4/python.mk Modified: trunk/gtk-recordmydesktop/m4/Makefile.am =================================================================== --- trunk/gtk-recordmydesktop/m4/Makefile.am 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/Makefile.am 2008-11-16 13:52:01 UTC (rev 573) @@ -1,7 +1,2 @@ -EXTRA_DIST = as-python.m4 \ - as-version.m4 \ - as-ac-expand.m4 \ - py-compile-destdir \ - common.mk \ - python.mk \ - pychecker.mk +EXTRA_DIST = as-ac-expand.m4 + Deleted: trunk/gtk-recordmydesktop/m4/as-python.m4 =================================================================== --- trunk/gtk-recordmydesktop/m4/as-python.m4 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/as-python.m4 2008-11-16 13:52:01 UTC (rev 573) @@ -1,218 +0,0 @@ -dnl as-python.m4 0.1.0 -dnl autostars m4 macro for python checks - -dnl From Andrew Dalke -dnl Updated by James Henstridge -dnl Updated by Andy Wingo to loop through possible pythons -dnl Updated by Thomas Vander Stichele to check for presence of packages/modules - -dnl $Id: as-python.m4,v 1.1 2006-09-25 07:45:20 iovar Exp $ - -# AS_PATH_PYTHON([MINIMUM-VERSION]) - -# Adds support for distributing Python modules and packages. To -# install modules, copy them to $(pythondir), using the python_PYTHON -# automake variable. To install a package with the same name as the -# automake package, install to $(pkgpythondir), or use the -# pkgpython_PYTHON automake variable. - -# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as -# locations to install python extension modules (shared libraries). -# Another macro is required to find the appropriate flags to compile -# extension modules. - -# If your package is configured with a different prefix to python, -# users will have to add the install directory to the PYTHONPATH -# environment variable, or create a .pth file (see the python -# documentation for details). - -# If the MINIMUM-VERSION argument is passed, AS_PATH_PYTHON will -# cause an error if the version of python installed on the system -# doesn't meet the requirement. MINIMUM-VERSION should consist of -# numbers and dots only. - -# Updated to loop over all possible python binaries by Andy Wingo -# <wi...@po...> - -AC_DEFUN([AS_PATH_PYTHON], - [ - dnl Find a version of Python. I could check for python versions 1.4 - dnl or earlier, but the default installation locations changed from - dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages - dnl in 1.5, and I don't want to maintain that logic. - - dnl should we do the version check? - ifelse([$1],[], - [AC_PATH_PROG(PYTHON, python python2.1 python2.0 python1.6 python1.5)], - [ - AC_MSG_NOTICE(Looking for Python version >= $1) - changequote(<<, >>)dnl - prog=" -import sys, string -minver = '$1' -pyver = string.split(sys.version)[0] # first word is version string -# split strings by '.'. just compare textually to allow for versions like -# 2.4.1a0 -minver = string.split(minver, '.') -pyver = string.split(pyver, '.') -# we can now do comparisons on the two lists: -if pyver >= minver: - sys.exit(0) -else: - sys.exit(1)" - changequote([, ])dnl - - python_good=false - for python_candidate in python python2.2 python2.1 python2.0 python2 python1.6 python1.5; do - unset PYTHON - AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null - - if test "x$PYTHON" = "x"; then continue; fi - - if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC; then - AC_MSG_CHECKING(["$PYTHON":]) - AC_MSG_RESULT([okay]) - python_good=true - break; - else - dnl clear the cache val - unset ac_cv_path_PYTHON - fi - done - ]) - - if test "$python_good" != "true"; then - AC_MSG_ERROR([No suitable version of python found]) - fi - - AC_MSG_CHECKING([local Python configuration]) - - dnl Query Python for its version number. Getting [:3] seems to be - dnl the best way to do this; it's what "site.py" does in the standard - dnl library. Need to change quote character because of [:3] - - AC_SUBST(PYTHON_VERSION) - changequote(<<, >>)dnl - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` - changequote([, ])dnl - - - dnl Use the values of $prefix and $exec_prefix for the corresponding - dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made - dnl distinct variables so they can be overridden if need be. However, - dnl general consensus is that you shouldn't need this ability. - - AC_SUBST(PYTHON_PREFIX) - PYTHON_PREFIX='${prefix}' - - AC_SUBST(PYTHON_EXEC_PREFIX) - PYTHON_EXEC_PREFIX='${exec_prefix}' - - dnl At times (like when building shared libraries) you may want - dnl to know which OS platform Python thinks this is. - - AC_SUBST(PYTHON_PLATFORM) - PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` - - - dnl Set up 4 directories: - - dnl pythondir -- where to install python scripts. This is the - dnl site-packages directory, not the python standard library - dnl directory like in previous automake betas. This behaviour - dnl is more consistent with lispdir.m4 for example. - dnl - dnl Also, if the package prefix isn't the same as python's prefix, - dnl then the old $(pythondir) was pretty useless. - - AC_SUBST(pythondir) - pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages - - dnl pkgpythondir -- $PACKAGE directory under pythondir. Was - dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is - dnl more consistent with the rest of automake. - dnl Maybe this should be put in python.am? - - AC_SUBST(pkgpythondir) - pkgpythondir=\${pythondir}/$PACKAGE - - dnl pyexecdir -- directory for installing python extension modules - dnl (shared libraries) Was PYTHON_SITE_EXEC in previous betas. - - AC_SUBST(pyexecdir) - pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages - - dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) - dnl Maybe this should be put in python.am? - - AC_SUBST(pkgpyexecdir) - pkgpyexecdir=\${pyexecdir}/$PACKAGE - - AC_MSG_RESULT([looks good]) -]) - -dnl AS_PYTHON_IMPORT(PACKAGE/MODULE, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND, [PREAMBLE, [POSTAMBLE]]]]) -dnl Try to import the given PACKAGE/MODULE - -AC_DEFUN([AS_PYTHON_IMPORT], -[ - dnl Check if we can import a given module. - dnl Requires AS_PATH_PYTHON to be called before. - - AC_MSG_CHECKING([for python module $1]) - - prog=" -import sys - -try: - $4 - import $1 - $5 - sys.exit(0) -except ImportError: - sys.exit(1) -except SystemExit: - raise -except Exception, e: - print ' Error while trying to import $1:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC -then - AC_MSG_RESULT(found) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(not found) - ifelse([$3], , :, [$3]) -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], - [ - AC_REQUIRE([AM_PATH_PYTHON]) - AC_MSG_CHECKING(for headers required to compile python extensions) - - dnl deduce PYTHON_INCLUDES - py_prefix=`$PYTHON -c "import sys; print sys.prefix"` - py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - - if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" - fi - AC_SUBST(PYTHON_INCLUDES) - - dnl check if the headers exist: - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include <Python.h>],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -]) Deleted: trunk/gtk-recordmydesktop/m4/as-version.m4 =================================================================== --- trunk/gtk-recordmydesktop/m4/as-version.m4 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/as-version.m4 2008-11-16 13:52:01 UTC (rev 573) @@ -1,59 +0,0 @@ -dnl version.m4 0.0.6 -dnl autostars m4 macro for versioning -dnl th...@ap... -dnl -dnl AS_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, MICRO, NANO, ACTION_IF_NO_NANO, ACTION_IF_NANO) -dnl example -dnl AS_VERSION(gstreamer, GST_VERSION, 0, 3, 2,) -dnl for a 0.3.2 release version -dnl -dnl this macro -dnl - defines [$PREFIX]_MAJOR, MINOR and MICRO -dnl - if NANO is empty, then we're in release mode, else in cvs/dev mode -dnl - defines [$PREFIX], VERSION, and [$PREFIX]_RELEASE -dnl - executes the relevant action -dnl - AC_SUBST's PACKAGE, VERSION, [$PREFIX] and [$PREFIX]_RELEASE -dnl as well as the little ones -dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents -dnl maintainer mode from running ok -dnl -dnl don't forget to put #undef [$2] and [$2]_RELEASE in acconfig.h - -AC_DEFUN([AS_VERSION], -[ - PACKAGE=[$1] - [$2]_MAJOR=[$3] - [$2]_MINOR=[$4] - [$2]_MICRO=[$5] - NANO=[$6] - [$2]_NANO=$NANO - if test "x$NANO" = "x" || test "x$NANO" = "x0"; - then - AC_MSG_NOTICE(configuring [$1] for release) - VERSION=[$3].[$4].[$5] - [$2]_RELEASE=1 - dnl execute action - ifelse([$7], , :, [$7]) - else - AC_MSG_NOTICE(configuring [$1] for development with nano $NANO) - VERSION=[$3].[$4].[$5].$NANO - [$2]_RELEASE=0.`date +%Y%m%d.%H%M%S` - dnl execute action - ifelse([$8], , :, [$8]) - fi - - [$2]=$VERSION - AC_DEFINE_UNQUOTED([$2], "$[$2]", [Define the version]) - AC_SUBST([$2]) - AC_DEFINE_UNQUOTED([$2]_RELEASE, "$[$2]_RELEASE", [Define the release version]) - AC_SUBST([$2]_RELEASE) - - AC_SUBST([$2]_MAJOR) - AC_SUBST([$2]_MINOR) - AC_SUBST([$2]_MICRO) - AC_SUBST([$2]_NANO) - AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name]) - AC_SUBST(PACKAGE) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version]) - AC_SUBST(VERSION) -]) Deleted: trunk/gtk-recordmydesktop/m4/common.mk =================================================================== --- trunk/gtk-recordmydesktop/m4/common.mk 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/common.mk 2008-11-16 13:52:01 UTC (rev 573) @@ -1,28 +0,0 @@ -clean-local: - @rm -rf _trial_temp - -test: - @make check -C flumotion/test - -check-docs: - @make check -C doc/reference - -coverage: - @trial --coverage coverage -R flumotion.test - @$(PYTHON) common/show-coverage.py _trial_temp/coverage/flumotion.* - -fixme: - tools/fixme | less -R - -release: dist - make $(PACKAGE)-$(VERSION).tar.bz2.md5 - -# generate md5 sum files -%.md5: % - md5sum $< > $@ - -# generate a sloc count -sloc: - sloccount flumotion | grep "(SLOC)" | cut -d = -f 2 - -.PHONY: test Deleted: trunk/gtk-recordmydesktop/m4/py-compile-destdir =================================================================== --- trunk/gtk-recordmydesktop/m4/py-compile-destdir 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/py-compile-destdir 2008-11-16 13:52:01 UTC (rev 573) @@ -1,153 +0,0 @@ -#!/bin/sh -# py-compile - Compile a Python program - -# modified by thomasvs to have DESTDIR support so rpm packages have correct -# compiled-in paths - -scriptversion=2004-01-12.23 - -# Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to <bug...@gn...> or send patches to -# <aut...@gn...>. - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -basedir= - -#echo "THOMAS: args: $*" -loop=true -while test "x$loop" = "xtrue" -do - case "$1" in - --basedir) - basedir=$2 - if test -z "$basedir"; then - echo "$0: Missing argument to --basedir." 1>&2 - exit 1 - fi - shift 2 - ;; - --destdir) - destdir=$2 - if test -z "$destdir"; then - echo "$0: Missing argument to --destdir." 1>&2 - exit 1 - fi - shift 2 - ;; - -h|--h*) - cat <<\EOF -Usage: py-compile [--help] [--version] [--basedir DIR] FILES..." - -Byte compile some python scripts FILES. This should be performed -after they have been moved to the final installation location - -Report bugs to <bug...@gn...>. -EOF - exit 0 - ;; - -v|--v*) - echo "py-compile $scriptversion" - exit 0 - ;; - *) - loop=false - ;; - esac -done - -if [ $# = 0 ]; then - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 - exit 1 -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - trans=" path = file" -else - trans=" path = os.path.join('$basedir', file)" -fi - -# if destdir was given, then it should be stripped from path when storing -# the intended file name -if [ -z "$destdir" ]; then - transdfile=" dfile = path" -else - transdfile=" - if path.startswith('$destdir'): - dfile = path.split('$destdir')[1] - else: - dfile = path - " -fi -#echo "THOMAS: args after parse: $*" -#echo THOMAS: transdfile: $transdfile - -$PYTHON -c " -import sys, os, string, py_compile - -files = '''$*''' -# print 'THOMAS: files: %s' % files -print 'Byte-compiling python modules...' -for file in string.split(files): -$trans - # print 'THOMAS: looking at file %s for path %s' % (file, path) -$transdfile - # print 'THOMAS: dfile: %s' % dfile - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - # print 'THOMAS: compiling path %s' % path - py_compile.compile(path, dfile=dfile) -print" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules (optimized versions) ...' -for file in string.split(files): -$trans -$transdfile - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path, dfile=dfile) -print" 2>/dev/null || : - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: Deleted: trunk/gtk-recordmydesktop/m4/pychecker.mk =================================================================== --- trunk/gtk-recordmydesktop/m4/pychecker.mk 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/pychecker.mk 2008-11-16 13:52:01 UTC (rev 573) @@ -1,43 +0,0 @@ -# include this snippet for the pychecker stuff -# Makefile.am needs to define -# PYCHECKER_WHITELIST -# and -# PYCHECKER_BLACKLIST - -# we redirect stderr so we don't get messages like -# warning: couldn't find real module for class SSL.Error (module name: SSL) -# which can't be turned off in pychecker -pycheckersplit: - @echo running pychecker on each file ... - @for file in $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))); \ - do \ - PYTHONPATH=`pwd` \ - pychecker -Q -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $$file \ - > /dev/null 2>&1; \ - if test $$? -ne 0; then \ - echo "Error on $$file"; \ - pychecker -Q -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $$file; break; fi; \ - done - -pychecker: - @echo running pychecker ... - @PYTHONPATH=`pwd` \ - pychecker -Q -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST)))\ - 2> /dev/null || make pycheckerverbose - -pycheckerverbose: - @echo running pychecker ... - PYTHONPATH=`pwd` \ - pychecker -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))) Deleted: trunk/gtk-recordmydesktop/m4/python.mk =================================================================== --- trunk/gtk-recordmydesktop/m4/python.mk 2008-11-16 13:49:11 UTC (rev 572) +++ trunk/gtk-recordmydesktop/m4/python.mk 2008-11-16 13:52:01 UTC (rev 573) @@ -1,11 +0,0 @@ -py_compile = $(top_srcdir)/m4/py-compile-destdir --destdir $(DESTDIR) - -#if HAVE_PYCHECKER -#check-local: $(PYCHECKER_FILES) -# if test ! -z "$(PYCHECKER_FILES)"; \ -# then \ -# PYTHONPATH=$(top_srcdir):$(top_builddir) \ -# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ -# $(PYCHECKER_FILES); \ -# fi -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-16 13:49:16
|
Revision: 572 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=572&view=rev Author: iovar Date: 2008-11-16 13:49:11 +0000 (Sun, 16 Nov 2008) Log Message: ----------- src/Makefile.am, Makefile.am, autogen.sh, configure.ac: Changed Automake requirement to 1.9 and made some minor changes to accomodate the removal of the m4 macros, as per rev #570 Revision Links: -------------- http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=570&view=rev Modified Paths: -------------- trunk/qt-recordmydesktop/Makefile.am trunk/qt-recordmydesktop/autogen.sh trunk/qt-recordmydesktop/configure.ac trunk/qt-recordmydesktop/src/Makefile.am Modified: trunk/qt-recordmydesktop/Makefile.am =================================================================== --- trunk/qt-recordmydesktop/Makefile.am 2008-11-16 13:45:04 UTC (rev 571) +++ trunk/qt-recordmydesktop/Makefile.am 2008-11-16 13:49:11 UTC (rev 572) @@ -1,11 +1,8 @@ -AUTOMAKE_OPTIONS = 1.5 +AUTOMAKE_OPTIONS = 1.9 ACLOCAL_AMFLAGS = -I m4 -include $(srcdir)/m4/common.mk -include $(srcdir)/m4/pychecker.mk - SUBDIRS = src po m4 EXTRA_DIST= config.rpath Modified: trunk/qt-recordmydesktop/autogen.sh =================================================================== --- trunk/qt-recordmydesktop/autogen.sh 2008-11-16 13:45:04 UTC (rev 571) +++ trunk/qt-recordmydesktop/autogen.sh 2008-11-16 13:49:11 UTC (rev 572) @@ -1,7 +1,7 @@ #/bin/bash -aclocal-1.7 -I m4/ -automake-1.7 --add-missing +aclocal -I m4/ +automake --add-missing autoconf Modified: trunk/qt-recordmydesktop/configure.ac =================================================================== --- trunk/qt-recordmydesktop/configure.ac 2008-11-16 13:45:04 UTC (rev 571) +++ trunk/qt-recordmydesktop/configure.ac 2008-11-16 13:49:11 UTC (rev 572) @@ -1,7 +1,7 @@ AC_PREREQ(2.59) -AC_INIT(src/rmdSimple.py) -AM_INIT_AUTOMAKE(qt-recordmydesktop, 0.3.7.2) +AC_INIT([qt-recordmydesktop], [0.3.7.2]) +AM_INIT_AUTOMAKE AS_AC_EXPAND(LIBDIR, $libdir) AC_MSG_NOTICE(Storing library files in $LIBDIR) Modified: trunk/qt-recordmydesktop/src/Makefile.am =================================================================== --- trunk/qt-recordmydesktop/src/Makefile.am 2008-11-16 13:45:04 UTC (rev 571) +++ trunk/qt-recordmydesktop/src/Makefile.am 2008-11-16 13:49:11 UTC (rev 572) @@ -1,4 +1,3 @@ -include $(top_srcdir)/m4/python.mk bin_SCRIPTS=qt-recordMyDesktop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-16 13:45:08
|
Revision: 571 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=571&view=rev Author: iovar Date: 2008-11-16 13:45:04 +0000 (Sun, 16 Nov 2008) Log Message: ----------- py-compile removed, since it's created at configuration Removed Paths: ------------- trunk/qt-recordmydesktop/py-compile Deleted: trunk/qt-recordmydesktop/py-compile =================================================================== --- trunk/qt-recordmydesktop/py-compile 2008-11-16 13:43:48 UTC (rev 570) +++ trunk/qt-recordmydesktop/py-compile 2008-11-16 13:45:04 UTC (rev 571) @@ -1,92 +0,0 @@ -#!/bin/sh - -# py-compile - Compile a Python program -# Copyright 2000, 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# called as "py-compile [--basedir DIR] PY_FILES ... - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -basedir= - -case "$1" in - --basedir) - basedir=$2 - shift 2 - ;; - --help) - echo "Usage: py-compile [--basedir DIR] PY_FILES ..." - echo "Byte compile some python scripts. This should be performed" - echo "after they have been moved to the final installation location" - exit 0 - ;; - --version) - echo "py-compile version 0.0" - exit 0 - ;; -esac - -if [ $# = 0 ]; then - echo "No files given to $0" 1>&2 - exit 1 -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - trans="path = file" -else - trans="path = os.path.join('$basedir', file)" -fi - -$PYTHON -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules...' -for file in string.split(files): - $trans - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path) -print" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules (optimized versions) ...' -for file in string.split(files): - $trans - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path) -print" 2>/dev/null || : - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-16 13:43:54
|
Revision: 570 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=570&view=rev Author: iovar Date: 2008-11-16 13:43:48 +0000 (Sun, 16 Nov 2008) Log Message: ----------- removed unneccessary macro files: as-python.m4 as-version.m4 py-compile-destdir common.mk python.mk pychecker.mk Modified Paths: -------------- trunk/qt-recordmydesktop/m4/Makefile.am Removed Paths: ------------- trunk/qt-recordmydesktop/m4/as-python.m4 trunk/qt-recordmydesktop/m4/as-version.m4 trunk/qt-recordmydesktop/m4/common.mk trunk/qt-recordmydesktop/m4/py-compile-destdir trunk/qt-recordmydesktop/m4/pychecker.mk trunk/qt-recordmydesktop/m4/python.mk Modified: trunk/qt-recordmydesktop/m4/Makefile.am =================================================================== --- trunk/qt-recordmydesktop/m4/Makefile.am 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/Makefile.am 2008-11-16 13:43:48 UTC (rev 570) @@ -1,7 +1 @@ -EXTRA_DIST = as-python.m4 \ - as-version.m4 \ - as-ac-expand.m4 \ - py-compile-destdir \ - common.mk \ - python.mk \ - pychecker.mk +EXTRA_DIST = as-ac-expand.m4 Deleted: trunk/qt-recordmydesktop/m4/as-python.m4 =================================================================== --- trunk/qt-recordmydesktop/m4/as-python.m4 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/as-python.m4 2008-11-16 13:43:48 UTC (rev 570) @@ -1,218 +0,0 @@ -dnl as-python.m4 0.1.0 -dnl autostars m4 macro for python checks - -dnl From Andrew Dalke -dnl Updated by James Henstridge -dnl Updated by Andy Wingo to loop through possible pythons -dnl Updated by Thomas Vander Stichele to check for presence of packages/modules - -dnl $Id: as-python.m4,v 1.1.1.1 2007-04-27 02:45:16 iovar Exp $ - -# AS_PATH_PYTHON([MINIMUM-VERSION]) - -# Adds support for distributing Python modules and packages. To -# install modules, copy them to $(pythondir), using the python_PYTHON -# automake variable. To install a package with the same name as the -# automake package, install to $(pkgpythondir), or use the -# pkgpython_PYTHON automake variable. - -# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as -# locations to install python extension modules (shared libraries). -# Another macro is required to find the appropriate flags to compile -# extension modules. - -# If your package is configured with a different prefix to python, -# users will have to add the install directory to the PYTHONPATH -# environment variable, or create a .pth file (see the python -# documentation for details). - -# If the MINIMUM-VERSION argument is passed, AS_PATH_PYTHON will -# cause an error if the version of python installed on the system -# doesn't meet the requirement. MINIMUM-VERSION should consist of -# numbers and dots only. - -# Updated to loop over all possible python binaries by Andy Wingo -# <wi...@po...> - -AC_DEFUN([AS_PATH_PYTHON], - [ - dnl Find a version of Python. I could check for python versions 1.4 - dnl or earlier, but the default installation locations changed from - dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages - dnl in 1.5, and I don't want to maintain that logic. - - dnl should we do the version check? - ifelse([$1],[], - [AC_PATH_PROG(PYTHON, python python2.1 python2.0 python1.6 python1.5)], - [ - AC_MSG_NOTICE(Looking for Python version >= $1) - changequote(<<, >>)dnl - prog=" -import sys, string -minver = '$1' -pyver = string.split(sys.version)[0] # first word is version string -# split strings by '.'. just compare textually to allow for versions like -# 2.4.1a0 -minver = string.split(minver, '.') -pyver = string.split(pyver, '.') -# we can now do comparisons on the two lists: -if pyver >= minver: - sys.exit(0) -else: - sys.exit(1)" - changequote([, ])dnl - - python_good=false - for python_candidate in python python2.2 python2.1 python2.0 python2 python1.6 python1.5; do - unset PYTHON - AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null - - if test "x$PYTHON" = "x"; then continue; fi - - if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC; then - AC_MSG_CHECKING(["$PYTHON":]) - AC_MSG_RESULT([okay]) - python_good=true - break; - else - dnl clear the cache val - unset ac_cv_path_PYTHON - fi - done - ]) - - if test "$python_good" != "true"; then - AC_MSG_ERROR([No suitable version of python found]) - fi - - AC_MSG_CHECKING([local Python configuration]) - - dnl Query Python for its version number. Getting [:3] seems to be - dnl the best way to do this; it's what "site.py" does in the standard - dnl library. Need to change quote character because of [:3] - - AC_SUBST(PYTHON_VERSION) - changequote(<<, >>)dnl - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` - changequote([, ])dnl - - - dnl Use the values of $prefix and $exec_prefix for the corresponding - dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made - dnl distinct variables so they can be overridden if need be. However, - dnl general consensus is that you shouldn't need this ability. - - AC_SUBST(PYTHON_PREFIX) - PYTHON_PREFIX='${prefix}' - - AC_SUBST(PYTHON_EXEC_PREFIX) - PYTHON_EXEC_PREFIX='${exec_prefix}' - - dnl At times (like when building shared libraries) you may want - dnl to know which OS platform Python thinks this is. - - AC_SUBST(PYTHON_PLATFORM) - PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` - - - dnl Set up 4 directories: - - dnl pythondir -- where to install python scripts. This is the - dnl site-packages directory, not the python standard library - dnl directory like in previous automake betas. This behaviour - dnl is more consistent with lispdir.m4 for example. - dnl - dnl Also, if the package prefix isn't the same as python's prefix, - dnl then the old $(pythondir) was pretty useless. - - AC_SUBST(pythondir) - pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages - - dnl pkgpythondir -- $PACKAGE directory under pythondir. Was - dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is - dnl more consistent with the rest of automake. - dnl Maybe this should be put in python.am? - - AC_SUBST(pkgpythondir) - pkgpythondir=\${pythondir}/$PACKAGE - - dnl pyexecdir -- directory for installing python extension modules - dnl (shared libraries) Was PYTHON_SITE_EXEC in previous betas. - - AC_SUBST(pyexecdir) - pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages - - dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) - dnl Maybe this should be put in python.am? - - AC_SUBST(pkgpyexecdir) - pkgpyexecdir=\${pyexecdir}/$PACKAGE - - AC_MSG_RESULT([looks good]) -]) - -dnl AS_PYTHON_IMPORT(PACKAGE/MODULE, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND, [PREAMBLE, [POSTAMBLE]]]]) -dnl Try to import the given PACKAGE/MODULE - -AC_DEFUN([AS_PYTHON_IMPORT], -[ - dnl Check if we can import a given module. - dnl Requires AS_PATH_PYTHON to be called before. - - AC_MSG_CHECKING([for python module $1]) - - prog=" -import sys - -try: - $4 - import $1 - $5 - sys.exit(0) -except ImportError: - sys.exit(1) -except SystemExit: - raise -except Exception, e: - print ' Error while trying to import $1:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC -then - AC_MSG_RESULT(found) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(not found) - ifelse([$3], , :, [$3]) -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], - [ - AC_REQUIRE([AM_PATH_PYTHON]) - AC_MSG_CHECKING(for headers required to compile python extensions) - - dnl deduce PYTHON_INCLUDES - py_prefix=`$PYTHON -c "import sys; print sys.prefix"` - py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - - if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" - fi - AC_SUBST(PYTHON_INCLUDES) - - dnl check if the headers exist: - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include <Python.h>],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -]) Deleted: trunk/qt-recordmydesktop/m4/as-version.m4 =================================================================== --- trunk/qt-recordmydesktop/m4/as-version.m4 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/as-version.m4 2008-11-16 13:43:48 UTC (rev 570) @@ -1,59 +0,0 @@ -dnl version.m4 0.0.6 -dnl autostars m4 macro for versioning -dnl th...@ap... -dnl -dnl AS_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, MICRO, NANO, ACTION_IF_NO_NANO, ACTION_IF_NANO) -dnl example -dnl AS_VERSION(gstreamer, GST_VERSION, 0, 3, 2,) -dnl for a 0.3.2 release version -dnl -dnl this macro -dnl - defines [$PREFIX]_MAJOR, MINOR and MICRO -dnl - if NANO is empty, then we're in release mode, else in cvs/dev mode -dnl - defines [$PREFIX], VERSION, and [$PREFIX]_RELEASE -dnl - executes the relevant action -dnl - AC_SUBST's PACKAGE, VERSION, [$PREFIX] and [$PREFIX]_RELEASE -dnl as well as the little ones -dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents -dnl maintainer mode from running ok -dnl -dnl don't forget to put #undef [$2] and [$2]_RELEASE in acconfig.h - -AC_DEFUN([AS_VERSION], -[ - PACKAGE=[$1] - [$2]_MAJOR=[$3] - [$2]_MINOR=[$4] - [$2]_MICRO=[$5] - NANO=[$6] - [$2]_NANO=$NANO - if test "x$NANO" = "x" || test "x$NANO" = "x0"; - then - AC_MSG_NOTICE(configuring [$1] for release) - VERSION=[$3].[$4].[$5] - [$2]_RELEASE=1 - dnl execute action - ifelse([$7], , :, [$7]) - else - AC_MSG_NOTICE(configuring [$1] for development with nano $NANO) - VERSION=[$3].[$4].[$5].$NANO - [$2]_RELEASE=0.`date +%Y%m%d.%H%M%S` - dnl execute action - ifelse([$8], , :, [$8]) - fi - - [$2]=$VERSION - AC_DEFINE_UNQUOTED([$2], "$[$2]", [Define the version]) - AC_SUBST([$2]) - AC_DEFINE_UNQUOTED([$2]_RELEASE, "$[$2]_RELEASE", [Define the release version]) - AC_SUBST([$2]_RELEASE) - - AC_SUBST([$2]_MAJOR) - AC_SUBST([$2]_MINOR) - AC_SUBST([$2]_MICRO) - AC_SUBST([$2]_NANO) - AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name]) - AC_SUBST(PACKAGE) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version]) - AC_SUBST(VERSION) -]) Deleted: trunk/qt-recordmydesktop/m4/common.mk =================================================================== --- trunk/qt-recordmydesktop/m4/common.mk 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/common.mk 2008-11-16 13:43:48 UTC (rev 570) @@ -1,28 +0,0 @@ -clean-local: - @rm -rf _trial_temp - -test: - @make check -C flumotion/test - -check-docs: - @make check -C doc/reference - -coverage: - @trial --coverage coverage -R flumotion.test - @$(PYTHON) common/show-coverage.py _trial_temp/coverage/flumotion.* - -fixme: - tools/fixme | less -R - -release: dist - make $(PACKAGE)-$(VERSION).tar.bz2.md5 - -# generate md5 sum files -%.md5: % - md5sum $< > $@ - -# generate a sloc count -sloc: - sloccount flumotion | grep "(SLOC)" | cut -d = -f 2 - -.PHONY: test Deleted: trunk/qt-recordmydesktop/m4/py-compile-destdir =================================================================== --- trunk/qt-recordmydesktop/m4/py-compile-destdir 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/py-compile-destdir 2008-11-16 13:43:48 UTC (rev 570) @@ -1,153 +0,0 @@ -#!/bin/sh -# py-compile - Compile a Python program - -# modified by thomasvs to have DESTDIR support so rpm packages have correct -# compiled-in paths - -scriptversion=2004-01-12.23 - -# Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to <bug...@gn...> or send patches to -# <aut...@gn...>. - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -basedir= - -#echo "THOMAS: args: $*" -loop=true -while test "x$loop" = "xtrue" -do - case "$1" in - --basedir) - basedir=$2 - if test -z "$basedir"; then - echo "$0: Missing argument to --basedir." 1>&2 - exit 1 - fi - shift 2 - ;; - --destdir) - destdir=$2 - if test -z "$destdir"; then - echo "$0: Missing argument to --destdir." 1>&2 - exit 1 - fi - shift 2 - ;; - -h|--h*) - cat <<\EOF -Usage: py-compile [--help] [--version] [--basedir DIR] FILES..." - -Byte compile some python scripts FILES. This should be performed -after they have been moved to the final installation location - -Report bugs to <bug...@gn...>. -EOF - exit 0 - ;; - -v|--v*) - echo "py-compile $scriptversion" - exit 0 - ;; - *) - loop=false - ;; - esac -done - -if [ $# = 0 ]; then - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 - exit 1 -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - trans=" path = file" -else - trans=" path = os.path.join('$basedir', file)" -fi - -# if destdir was given, then it should be stripped from path when storing -# the intended file name -if [ -z "$destdir" ]; then - transdfile=" dfile = path" -else - transdfile=" - if path.startswith('$destdir'): - dfile = path.split('$destdir')[1] - else: - dfile = path - " -fi -#echo "THOMAS: args after parse: $*" -#echo THOMAS: transdfile: $transdfile - -$PYTHON -c " -import sys, os, string, py_compile - -files = '''$*''' -# print 'THOMAS: files: %s' % files -print 'Byte-compiling python modules...' -for file in string.split(files): -$trans - # print 'THOMAS: looking at file %s for path %s' % (file, path) -$transdfile - # print 'THOMAS: dfile: %s' % dfile - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - # print 'THOMAS: compiling path %s' % path - py_compile.compile(path, dfile=dfile) -print" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules (optimized versions) ...' -for file in string.split(files): -$trans -$transdfile - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path, dfile=dfile) -print" 2>/dev/null || : - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: Deleted: trunk/qt-recordmydesktop/m4/pychecker.mk =================================================================== --- trunk/qt-recordmydesktop/m4/pychecker.mk 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/pychecker.mk 2008-11-16 13:43:48 UTC (rev 570) @@ -1,43 +0,0 @@ -# include this snippet for the pychecker stuff -# Makefile.am needs to define -# PYCHECKER_WHITELIST -# and -# PYCHECKER_BLACKLIST - -# we redirect stderr so we don't get messages like -# warning: couldn't find real module for class SSL.Error (module name: SSL) -# which can't be turned off in pychecker -pycheckersplit: - @echo running pychecker on each file ... - @for file in $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))); \ - do \ - PYTHONPATH=`pwd` \ - pychecker -Q -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $$file \ - > /dev/null 2>&1; \ - if test $$? -ne 0; then \ - echo "Error on $$file"; \ - pychecker -Q -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $$file; break; fi; \ - done - -pychecker: - @echo running pychecker ... - @PYTHONPATH=`pwd` \ - pychecker -Q -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST)))\ - 2> /dev/null || make pycheckerverbose - -pycheckerverbose: - @echo running pychecker ... - PYTHONPATH=`pwd` \ - pychecker -F misc/pycheckerrc \ - `ls $(top_srcdir)/misc/setup.py 2> /dev/null` \ - `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` \ - $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))) Deleted: trunk/qt-recordmydesktop/m4/python.mk =================================================================== --- trunk/qt-recordmydesktop/m4/python.mk 2008-11-15 21:04:13 UTC (rev 569) +++ trunk/qt-recordmydesktop/m4/python.mk 2008-11-16 13:43:48 UTC (rev 570) @@ -1,11 +0,0 @@ -py_compile = $(top_srcdir)/m4/py-compile-destdir --destdir $(DESTDIR) - -#if HAVE_PYCHECKER -#check-local: $(PYCHECKER_FILES) -# if test ! -z "$(PYCHECKER_FILES)"; \ -# then \ -# PYTHONPATH=$(top_srcdir):$(top_builddir) \ -# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ -# $(PYCHECKER_FILES); \ -# fi -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-15 21:04:18
|
Revision: 569 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=569&view=rev Author: iovar Date: 2008-11-15 21:04:13 +0000 (Sat, 15 Nov 2008) Log Message: ----------- configure.ac, doc/recordmydesktop.1, src/rmd.c, src/rmd_cache_audio.c, src/rmd_encode_sound_buffer.c, src/rmd_initialize_data.c, src/rmd_jack.c, src/rmd_jack.h, src/rmd_parseargs.c, src/rmd_threads.c, src/rmd_types.h: Changed the way Jack support is offered, from dlopening at runtime to normal linking at compilation. Modified Paths: -------------- trunk/recordmydesktop/configure.ac trunk/recordmydesktop/doc/recordmydesktop.1 trunk/recordmydesktop/src/rmd.c trunk/recordmydesktop/src/rmd_cache_audio.c trunk/recordmydesktop/src/rmd_encode_sound_buffer.c trunk/recordmydesktop/src/rmd_initialize_data.c trunk/recordmydesktop/src/rmd_jack.c trunk/recordmydesktop/src/rmd_jack.h trunk/recordmydesktop/src/rmd_parseargs.c trunk/recordmydesktop/src/rmd_threads.c trunk/recordmydesktop/src/rmd_types.h Modified: trunk/recordmydesktop/configure.ac =================================================================== --- trunk/recordmydesktop/configure.ac 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/configure.ac 2008-11-15 21:04:13 UTC (rev 569) @@ -60,12 +60,7 @@ fi AC_CHECK_HEADER([sys/soundcard.h]) -AC_CHECK_HEADER([dlfcn.h],[dlfcn_header=true]) -if test x$jack = xtrue && test x$dlfcn_header = xtrue; then -AC_CHECK_HEADER([jack/jack.h], - jack_headers_present=true) -fi AC_CHECK_HEADERS([sys/time.h unistd.h vorbis/vorbisfile.h fcntl.h]) @@ -99,6 +94,11 @@ AC_CHECK_LIB([pthread],[pthread_mutex_lock],, AC_MSG_ERROR([Can't find libpthread])) +if test x$jack = xtrue ; then +AC_CHECK_LIB([jack],[jack_activate],, + jack_lib_found=false) +fi + if test x$oss = xfalse; then AC_CHECK_LIB([asound],[snd_pcm_drain],, audio_backend="OSS") @@ -106,23 +106,6 @@ audio_backend="OSS" fi -if test x$jack_headers_present = xtrue; then - case "$host_os" in - *bsd*) - AC_CHECK_LIB([c], [dlopen],,libdl_np=true) - ;; - *) - AC_CHECK_LIB([dl],[dlopen],,libdl_np=true) - ;; - esac - - if test x$libdl_np != xtrue; then - AC_DEFINE([HAVE_JACK_H],1, - define to 1 if <jack/jack.h> exists) - fi -fi - - # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. @@ -137,7 +120,8 @@ if test x$audio_backend != xOSS; then audio_backend="ALSA" fi -if test x$jack_headers_present = xtrue && test x$libdl_np != xtrue; then +if test x$jack_lib_found != xfalse ; then +# AC_DEFINE([HAVE_JACK_H],1,define to 1 if libjack is found) , jack_support="Enabled" else jack_support="Disabled" Modified: trunk/recordmydesktop/doc/recordmydesktop.1 =================================================================== --- trunk/recordmydesktop/doc/recordmydesktop.1 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/doc/recordmydesktop.1 2008-11-15 21:04:13 UTC (rev 569) @@ -165,7 +165,10 @@ .br 13 Cannot open file for writting. .br -14 Cannot load the Jack library (dlopen/dlsym error on libjack.so). +14 Cannot load the Jack library ( +.B +UNUSED SINCE 0.3.8 +). .br 15 Cannot create new client. .br Modified: trunk/recordmydesktop/src/rmd.c =================================================================== --- trunk/recordmydesktop/src/rmd.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd.c 2008-11-15 21:04:13 UTC (rev 569) @@ -72,7 +72,7 @@ else{ EncData enc_data; CacheData cache_data; -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK JackData jdata; // Give jack access to program data, mainly for program state Modified: trunk/recordmydesktop/src/rmd_cache_audio.c =================================================================== --- trunk/recordmydesktop/src/rmd_cache_audio.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_cache_audio.c 2008-11-15 21:04:13 UTC (rev 569) @@ -39,7 +39,7 @@ //It's sound is tiny compared to that of image, so //compressing would reducethe overall size by only an //insignificant fraction. -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK void *jackbuf=NULL; if(pdata->args.use_jack){ jackbuf=malloc(pdata->sound_framesize*pdata->jdata->buffersize); @@ -76,10 +76,10 @@ free(buff); } else{ -#ifdef HAVE_JACK_H - if((*jack_ringbuffer_read_space_p)(pdata->jdata->sound_buffer)>= +#ifdef HAVE_LIBJACK + if((*jack_ringbuffer_read_space)(pdata->jdata->sound_buffer)>= (pdata->sound_framesize*pdata->jdata->buffersize)){ - (*jack_ringbuffer_read_p)(pdata->jdata->sound_buffer, + (*jack_ringbuffer_read)(pdata->jdata->sound_buffer, jackbuf, (pdata->sound_framesize* pdata->jdata->buffersize)); Modified: trunk/recordmydesktop/src/rmd_encode_sound_buffer.c =================================================================== --- trunk/recordmydesktop/src/rmd_encode_sound_buffer.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_encode_sound_buffer.c 2008-11-15 21:04:13 UTC (rev 569) @@ -36,7 +36,7 @@ void *EncodeSoundBuffer(ProgData *pdata){ int sampread=pdata->periodsize; -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK void *jackbuf=NULL; if(pdata->args.use_jack){ jackbuf=malloc(pdata->sound_framesize*pdata->jdata->buffersize); @@ -85,10 +85,10 @@ free(buff); } else{ -#ifdef HAVE_JACK_H - if((*jack_ringbuffer_read_space_p)(pdata->jdata->sound_buffer)>= +#ifdef HAVE_LIBJACK + if((*jack_ringbuffer_read_space)(pdata->jdata->sound_buffer)>= (pdata->sound_framesize*pdata->jdata->buffersize)){ - (*jack_ringbuffer_read_p)(pdata->jdata->sound_buffer, + (*jack_ringbuffer_read)(pdata->jdata->sound_buffer, jackbuf, (pdata->sound_framesize* pdata->jdata->buffersize)); Modified: trunk/recordmydesktop/src/rmd_initialize_data.c =================================================================== --- trunk/recordmydesktop/src/rmd_initialize_data.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_initialize_data.c 2008-11-15 21:04:13 UTC (rev 569) @@ -138,7 +138,7 @@ } } else{ -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK int jack_error=0; pdata->jdata->port_names=pdata->args.jack_port_names; pdata->jdata->nports=pdata->args.jack_nports; Modified: trunk/recordmydesktop/src/rmd_jack.c =================================================================== --- trunk/recordmydesktop/src/rmd_jack.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_jack.c 2008-11-15 21:04:13 UTC (rev 569) @@ -33,56 +33,10 @@ #include "rmd_jack.h" -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK -#define CHECK_DLERRORS_FATAL(__error_p)\ - if((__error_p=dlerror())!=NULL){\ - fprintf(stderr,"%s\n",__error_p);\ - return 1;\ - } - -#define DLSYM_AND_CHECK(lib_handle,__call_name__,__error_p)\ - __call_name__##_p=dlsym(lib_handle,#__call_name__);\ - CHECK_DLERRORS_FATAL(__error_p) - - /** -* -* Fuction Pointers To Jack API Calls (shouldn't a jack header provide these?) -* -*/ -jack_client_t *(*jack_client_new_p)(const char *client_name); -jack_nframes_t (*jack_get_sample_rate_p)(jack_client_t * client); -int (*jack_set_buffer_size_p)(jack_client_t *client, jack_nframes_t nframes); -jack_nframes_t (*jack_get_buffer_size_p)(jack_client_t *client); -int (*jack_set_process_callback_p)(jack_client_t *client, - JackProcessCallback process_callback, - void *arg); -void (*jack_on_shutdown_p)(jack_client_t *client, - void(*function)(void *arg), - void *arg); -int (*jack_activate_p)(jack_client_t *client); -int (*jack_client_close_p)(jack_client_t *client); -void *(*jack_port_get_buffer_p)(jack_port_t *port,jack_nframes_t); -jack_port_t *(*jack_port_register_p)(jack_client_t *client, - const char *port_name, - const char *port_type, - unsigned long flags, - unsigned long buffer_size); -int (*jack_connect_p)(jack_client_t *client, - const char *source_port, - const char *destination_port); -const char *(*jack_port_name_p)(const jack_port_t *port); -int (*jack_port_name_size_p)(void); -jack_ringbuffer_t *(*jack_ringbuffer_create_p)(size_t sz); -void (*jack_ringbuffer_free_p)(jack_ringbuffer_t *rb); -size_t (*jack_ringbuffer_write_p)(jack_ringbuffer_t *rb, - const char *src, - size_t cnt); - - -/** * Callback for capture through jack * * \param nframes Number of frames captured @@ -101,12 +55,12 @@ } for(i= 0;i<jdata->nports;i++) - jdata->portbuf[i]=jack_port_get_buffer_p(jdata->ports[i],nframes); + jdata->portbuf[i]=jack_port_get_buffer(jdata->ports[i],nframes); //vorbis analysis buffer wants uninterleaved data //so we are simply placing the buffers for every channel //sequentially on the ringbuffer for(i=0;i<jdata->nports;i++) - (*jack_ringbuffer_write_p)(jdata->sound_buffer, + (*jack_ringbuffer_write)(jdata->sound_buffer, (void *)(jdata->portbuf[i]), nframes* sizeof(jack_default_audio_sample_t)); @@ -148,7 +102,7 @@ strcpy(name,"input_"); snprintf( num, 8, "%d", i+1 ); strcat(name,num); - if((jdata->ports[i]=jack_port_register_p(jdata->client, + if((jdata->ports[i]=jack_port_register(jdata->client, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, @@ -156,11 +110,11 @@ fprintf(stderr,"Cannot register input port \"%s\"!\n",name); return 1; } - if(jack_connect_p(jdata->client, + if(jack_connect(jdata->client, jdata->port_names[i], - jack_port_name_p(jdata->ports[i]))){ + jack_port_name(jdata->ports[i]))){ fprintf(stderr,"Cannot connect input port %s to %s\n", - jack_port_name_p(jdata->ports[i]), + jack_port_name(jdata->ports[i]), jdata->port_names[i]); return 1; } @@ -168,46 +122,6 @@ return 0; } -/** -* dlopen libjack and dlsym all needed functions -* -* \param jack_lib_handle Pointer to handle for jack library -* -* \returns 0 on Success, 1 on failure -*/ -static int LoadJackLib(void *jack_lib_handle) { - char *error; - jack_lib_handle=dlopen("libjack.so",RTLD_LAZY); - if(!jack_lib_handle){ - fprintf(stderr,"%s\n",dlerror()); - return 1; - } - if((error=dlerror())!=NULL){ - fprintf(stderr,"%s\n",dlerror()); - } -//this macro will call return with status 1 on failure - DLSYM_AND_CHECK(jack_lib_handle,jack_client_new,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_get_sample_rate,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_set_buffer_size,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_get_buffer_size,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_set_process_callback,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_on_shutdown,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_activate,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_client_close,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_port_get_buffer,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_port_register,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_connect,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_port_name,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_port_name_size,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_ringbuffer_create,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_ringbuffer_free,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_ringbuffer_read,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_ringbuffer_read_space,error) - DLSYM_AND_CHECK(jack_lib_handle,jack_ringbuffer_write,error) - - return 0; -} - //in case the jack server shuts down //the program should stop recording, //encode the result(if not on the fly) @@ -236,11 +150,7 @@ snprintf( pidbuf, 8, "%d", pid ); strcat(rmd_client_name,pidbuf); - if(LoadJackLib(jdata->jack_lib_handle)){ - fprintf (stderr,"Couldn't load the Jack library (libjack.so)!\n"); - return 14; - } - if ((jdata->client=(*jack_client_new_p)(rmd_client_name))==0){ + if ((jdata->client=(*jack_client_new)(rmd_client_name))==0){ fprintf(stderr,"Could not create new client!\n" "Make sure that Jack server is running!\n"); return 15; @@ -258,23 +168,23 @@ //(it might be in some cases, but it will certainly be the cause //of unpredicted problems). A clean exit is preferable //and any recording up to that point will be encoded and saved. - jdata->frequency=jack_get_sample_rate_p(jdata->client); - jdata->buffersize=jack_get_buffer_size_p(jdata->client); + jdata->frequency=jack_get_sample_rate(jdata->client); + jdata->buffersize=jack_get_buffer_size(jdata->client); ring_buffer_size=(jdata->ringbuffer_secs* jdata->frequency* sizeof(jack_default_audio_sample_t)* jdata->nports); jdata->sound_buffer= - (*jack_ringbuffer_create_p)((int)(ring_buffer_size+0.5));//round up - jack_set_process_callback_p(jdata->client,JackCapture,jdata); - jack_on_shutdown_p(jdata->client,JackShutdown,jdata); + (*jack_ringbuffer_create)((int)(ring_buffer_size+0.5));//round up + jack_set_process_callback(jdata->client,JackCapture,jdata); + jack_on_shutdown(jdata->client,JackShutdown,jdata); - if (jack_activate_p(jdata->client)) { + if (jack_activate(jdata->client)) { fprintf(stderr,"cannot activate client!\n"); return 16; } if(SetupPorts(jdata)){ - jack_client_close_p(jdata->client); + jack_client_close(jdata->client); return 17; } @@ -284,8 +194,8 @@ int StopJackClient(JackData *jdata){ int ret=0; - (*jack_ringbuffer_free_p)(jdata->sound_buffer); - if(jack_client_close_p(jdata->client)){ + (*jack_ringbuffer_free)(jdata->sound_buffer); + if(jack_client_close(jdata->client)){ fprintf(stderr,"Cannot close Jack client!\n"); ret=1; } Modified: trunk/recordmydesktop/src/rmd_jack.h =================================================================== --- trunk/recordmydesktop/src/rmd_jack.h 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_jack.h 2008-11-15 21:04:13 UTC (rev 569) @@ -30,14 +30,10 @@ #include "rmd_types.h" -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK -size_t (*jack_ringbuffer_read_p)(jack_ringbuffer_t *rb, - char *dest, size_t cnt); -size_t (*jack_ringbuffer_read_space_p)(const jack_ringbuffer_t *rb); - /** -* Load libjack, create and activate client,register ports +* create and activate client,register ports * * \param jdata_t Pointer to JackData struct containing port * and client information Modified: trunk/recordmydesktop/src/rmd_parseargs.c =================================================================== --- trunk/recordmydesktop/src/rmd_parseargs.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_parseargs.c 2008-11-15 21:04:13 UTC (rev 569) @@ -34,7 +34,7 @@ static void PrintConfig(void) { fprintf(stderr,"\nrecordMyDesktop was compiled with" " the following options:\n\n"); -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK fprintf(stdout,"Jack\t\t\t:Enabled\n"); #else fprintf(stdout,"Jack\t\t\t:Disabled\n"); @@ -489,7 +489,7 @@ else if (strcmp(argv[i], "--use-jack") == 0 || strcmp(argv[i], "-use-jack") == 0) { if(i+1<argc){ -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK int k=i+1; arg_return->jack_nports=0; while((k<argc)&&(argv[k][0]!='-')){ Modified: trunk/recordmydesktop/src/rmd_threads.c =================================================================== --- trunk/recordmydesktop/src/rmd_threads.c 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_threads.c 2008-11-15 21:04:13 UTC (rev 569) @@ -107,7 +107,7 @@ (void *)rmdTimer, (void *)pdata); fprintf(stderr,"Capturing!\n"); -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK if(pdata->args.use_jack){ pdata->jdata->capture_started=1; } @@ -132,7 +132,7 @@ fprintf(stderr,"."); if(!pdata->args.nosound){ -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK if(pdata->args.use_jack) StopJackClient(pdata->jdata); #endif Modified: trunk/recordmydesktop/src/rmd_types.h =================================================================== --- trunk/recordmydesktop/src/rmd_types.h 2008-11-15 16:28:36 UTC (rev 568) +++ trunk/recordmydesktop/src/rmd_types.h 2008-11-15 21:04:13 UTC (rev 569) @@ -46,10 +46,9 @@ #define DEFAULT_AUDIO_DEVICE "/dev/dsp" #endif -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK #include <jack/jack.h> #include <jack/ringbuffer.h> - #include <dlfcn.h> #endif @@ -223,10 +222,9 @@ struct _SndBuffer *next; }SndBuffer; -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK typedef struct _JackData{ ProgData *pdata; //pointer to prog data - void *jack_lib_handle; //handle for jack library (loaded with dlopen). jack_client_t *client; unsigned int buffersize, //buffer size for every port in frames. frequency, //samplerate with which jack server was started. @@ -264,7 +262,7 @@ CacheData *cache_data; HotKey pause_key, //Shortcuts stop_key; -#ifdef HAVE_JACK_H +#ifdef HAVE_LIBJACK JackData *jdata; #endif /**X related info*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-15 16:28:38
|
Revision: 568 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=568&view=rev Author: iovar Date: 2008-11-15 16:28:36 +0000 (Sat, 15 Nov 2008) Log Message: ----------- src/rmd_wm_is_compositing.[ch], src/rmd.c, src/rmd_types.h, src/Makefile.am : Added rmdWMIsCompositing method which is used to determine if the window manager is compositing and thus if it will be recorded in --full-shots mode. This method replaces the name check that was previously used, but rmdWMCheck hasn't been removed as it is also a proper method of identifying compliance with the freedesktop.org standards, which is a neccessary step before determining whether a window manager is compositing. This method is still not perfect as non-3d compositing WM's will trigger full-shots, without neccessarily needing it, but the only penalty for this mistake will be increased CPU usage while previously, non-identification of compositing WM as such could lead in distorted/unusable videos (e.g. KWin when used in 3d compositing mode). Modified Paths: -------------- trunk/recordmydesktop/src/Makefile.am trunk/recordmydesktop/src/rmd.c trunk/recordmydesktop/src/rmd_types.h Added Paths: ----------- trunk/recordmydesktop/src/rmd_wm_is_compositing.c trunk/recordmydesktop/src/rmd_wm_is_compositing.h Modified: trunk/recordmydesktop/src/Makefile.am =================================================================== --- trunk/recordmydesktop/src/Makefile.am 2008-11-15 15:12:18 UTC (rev 567) +++ trunk/recordmydesktop/src/Makefile.am 2008-11-15 16:28:36 UTC (rev 568) @@ -68,6 +68,8 @@ rmd_update_image.h \ rmd_wm_check.c \ rmd_wm_check.h \ + rmd_wm_is_compositing.c \ + rmd_wm_is_compositing.h \ rmd_yuv_utils.c \ rmd_yuv_utils.h \ skeleton.c \ Modified: trunk/recordmydesktop/src/rmd.c =================================================================== --- trunk/recordmydesktop/src/rmd.c 2008-11-15 15:12:18 UTC (rev 567) +++ trunk/recordmydesktop/src/rmd.c 2008-11-15 16:28:36 UTC (rev 568) @@ -38,7 +38,7 @@ #include "rmd_setbrwindow.h" #include "rmd_shortcuts.h" #include "rmd_threads.h" -#include "rmd_wm_check.h" +#include "rmd_wm_is_compositing.h" int main(int argc,char **argv){ @@ -99,28 +99,17 @@ if (!SetBRWindow(pdata.dpy, &pdata.brwin, &pdata.specs, &pdata.args)) exit(11); - //check if we are under compiz or beryl, - //in which case we must enable full-shots - //and with it use of shared memory.User can override this - pdata.window_manager=((pdata.args.nowmcheck)? - NULL:rmdWMCheck(pdata.dpy,pdata.specs.root)); - if(pdata.window_manager==NULL){ - fprintf(stderr,"Not taking window manager into account.\n"); - } - //Right now only wm's that I know of performing - //3d compositing are beryl and compiz. - //No, the blue screen in metacity doesn't count :) - //names can be compiz for compiz and beryl/beryl-co/beryl-core - //for beryl(so it's strncmp ) - else if(!strcmp(pdata.window_manager,"compiz") || - !strncmp(pdata.window_manager,"beryl",5)){ - fprintf(stderr,"\nDetected 3d compositing window manager.\n" + if( !pdata.args.nowmcheck && + rmdWMIsCompositing( pdata.dpy, pdata.specs.screen ) ) { + + fprintf(stderr,"\nDetected compositing window manager.\n" "Reverting to full screen capture at every frame.\n" "To disable this check run with --no-wm-check\n" "(though that is not advised, since it will " "probably produce faulty results).\n\n"); pdata.args.full_shots=1; pdata.args.noshared=0; + } QueryExtensions(pdata.dpy, Modified: trunk/recordmydesktop/src/rmd_types.h =================================================================== --- trunk/recordmydesktop/src/rmd_types.h 2008-11-15 15:12:18 UTC (rev 567) +++ trunk/recordmydesktop/src/rmd_types.h 2008-11-15 16:28:36 UTC (rev 568) @@ -304,7 +304,6 @@ //when drawing the dummy pointer unsigned int periodtime,//time that a sound buffer lasts (microsecs) frametime; //time that a frame lasts (microsecs) - char *window_manager; //name of the window manager at program launch Window shaped_w; //frame int damage_event, //damage event base code damage_error, //damage error base code Added: trunk/recordmydesktop/src/rmd_wm_is_compositing.c =================================================================== --- trunk/recordmydesktop/src/rmd_wm_is_compositing.c (rev 0) +++ trunk/recordmydesktop/src/rmd_wm_is_compositing.c 2008-11-15 16:28:36 UTC (rev 568) @@ -0,0 +1,66 @@ +/****************************************************************************** +* recordMyDesktop * +******************************************************************************* +* * +* Copyright (C) 2006,2007,2008 John Varouhakis * +* * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * +* * +* * +* * +* For further information contact me at joh...@gm... * +******************************************************************************/ + +#include "config.h" + +#include <X11/Xatom.h> + +#include "rmd_types.h" + +#include "rmd_wm_check.h" + +#include "rmd_wm_is_compositing.h" + +boolean rmdWMIsCompositing( Display *dpy, int screen ) { + + Window win; + Atom atom; + char buf[32]; + char *window_manager=rmdWMCheck( dpy, + RootWindow( dpy, screen ) ); + + //If the wm name is queried successfully the wm is compliant (source + //http://standards.freedesktop.org/wm-spec/1.4/ar01s03.html#id2568282 ) + //in which case we will also free() the allcoated string. + + if( window_manager == NULL ) + return FALSE; + else + free( window_manager ); + + + snprintf( buf, sizeof(buf), "_NET_WM_CM_S%d", screen); + atom = XInternAtom(dpy, buf, True); + if (atom == None) return FALSE; + + win = XGetSelectionOwner(dpy, atom); + + return win != None; + + + +} + Added: trunk/recordmydesktop/src/rmd_wm_is_compositing.h =================================================================== --- trunk/recordmydesktop/src/rmd_wm_is_compositing.h (rev 0) +++ trunk/recordmydesktop/src/rmd_wm_is_compositing.h 2008-11-15 16:28:36 UTC (rev 568) @@ -0,0 +1,48 @@ +/****************************************************************************** +* recordMyDesktop * +******************************************************************************* +* * +* Copyright (C) 2006,2007,2008 John Varouhakis * +* * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * +* * +* * +* * +* For further information contact me at joh...@gm... * +******************************************************************************/ + +#ifndef RMD_WM_IS_COMPOSITING_H +#define RMD_WM_IS_COMPOSITING_H 1 + +#include "rmd_types.h" + + +/** +*Check if the window manager is compositing (duh!). +* +* \param dpy Connection to the server +* +* \param screen screen number/id that the window manager runs on +* +* \returns TRUE if compositing, false otherwise or when +* the window manager doesn't support the required +* freedesktop.org hints for the test to be done +* succesfully. +*/ + +boolean rmdWMIsCompositing( Display *dpy, int screen) ; + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-11-15 15:12:23
|
Revision: 567 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=567&view=rev Author: iovar Date: 2008-11-15 15:12:18 +0000 (Sat, 15 Nov 2008) Log Message: ----------- Changed CACHE_FILE_SIZE_LIMIT back to 500 Mb ( 500*1<<20 ) Modified Paths: -------------- trunk/recordmydesktop/src/rmd_cache_frame.c Modified: trunk/recordmydesktop/src/rmd_cache_frame.c =================================================================== --- trunk/recordmydesktop/src/rmd_cache_frame.c 2008-10-03 13:51:04 UTC (rev 566) +++ trunk/recordmydesktop/src/rmd_cache_frame.c 2008-11-15 15:12:18 UTC (rev 567) @@ -38,7 +38,7 @@ #define BYTES_PER_MB (1024 * 1024) #define CACHE_OUT_BUFFER_SIZE (4 * 1024) -#define CACHE_FILE_SIZE_LIMIT (5 * 1024 * 1024) +#define CACHE_FILE_SIZE_LIMIT (500 * 1024 * 1024) static int FlushBlock(unsigned char *buf, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-10-03 13:51:13
|
Revision: 566 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=566&view=rev Author: enselic Date: 2008-10-03 13:51:04 +0000 (Fri, 03 Oct 2008) Log Message: ----------- src/rmd_init_encoder.c: Format the code for the initialization of the theora_info structure to increase readability. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_init_encoder.c Modified: trunk/recordmydesktop/src/rmd_init_encoder.c =================================================================== --- trunk/recordmydesktop/src/rmd_init_encoder.c 2008-10-03 09:14:44 UTC (rev 565) +++ trunk/recordmydesktop/src/rmd_init_encoder.c 2008-10-03 13:51:04 UTC (rev 566) @@ -158,41 +158,38 @@ ogg_stream_init(&enc_data_t->m_ogg_vs,y2); - theora_info_init(&enc_data_t->m_th_inf); - enc_data_t->m_th_inf.frame_width=(pdata)->brwin.rgeom.width; - enc_data_t->m_th_inf.frame_height=(pdata)->brwin.rgeom.height; - enc_data_t->m_th_inf.width=((enc_data_t->m_th_inf.frame_width+15)>>4)<<4; - enc_data_t->m_th_inf.height=((enc_data_t->m_th_inf.frame_height+15)>>4)<<4; - enc_data_t->m_th_inf.offset_x=((enc_data_t->m_th_inf.width- - enc_data_t->m_th_inf.frame_width)/2)&~1; - enc_data_t->m_th_inf.offset_y=((enc_data_t->m_th_inf.height- - enc_data_t->m_th_inf.frame_height)/2)&~1; - enc_data_t->m_th_inf.fps_numerator=((pdata)->args.fps*100.0); - enc_data_t->m_th_inf.fps_denominator=100; - enc_data_t->m_th_inf.aspect_numerator=1;//(pdata)->brwin.rgeom.width; - enc_data_t->m_th_inf.aspect_denominator=1;//(pdata)->brwin.rgeom.height; - enc_data_t->m_th_inf.colorspace=OC_CS_UNSPECIFIED; - enc_data_t->m_th_inf.pixelformat=OC_PF_420; - enc_data_t->m_th_inf.target_bitrate=(pdata)->args.v_bitrate; - enc_data_t->m_th_inf.quality=(pdata)->args.v_quality; - enc_data_t->m_th_inf.dropframes_p=0; - enc_data_t->m_th_inf.quick_p=1; - enc_data_t->m_th_inf.keyframe_auto_p=1; - enc_data_t->m_th_inf.keyframe_frequency=64; - enc_data_t->m_th_inf.keyframe_frequency_force=64; - enc_data_t->m_th_inf.keyframe_data_target_bitrate= - enc_data_t->m_th_inf.quality*1.5; + enc_data_t->m_th_inf.frame_width = pdata->brwin.rgeom.width; + enc_data_t->m_th_inf.frame_height = pdata->brwin.rgeom.height; + enc_data_t->m_th_inf.width = ((enc_data_t->m_th_inf.frame_width + 15) >> 4) << 4; + enc_data_t->m_th_inf.height = ((enc_data_t->m_th_inf.frame_height + 15) >> 4) << 4; + enc_data_t->m_th_inf.offset_x = 0; + enc_data_t->m_th_inf.offset_y = 0; - enc_data_t->m_th_inf.keyframe_auto_threshold=80; - enc_data_t->m_th_inf.keyframe_mindistance=8; - enc_data_t->m_th_inf.noise_sensitivity=1; - enc_data_t->m_th_inf.sharpness=2; + enc_data_t->m_th_inf.fps_numerator = pdata->args.fps * 100.0; + enc_data_t->m_th_inf.fps_denominator = 100; + enc_data_t->m_th_inf.aspect_numerator = 1; + enc_data_t->m_th_inf.aspect_denominator = 1; - theora_encode_init(&enc_data_t->m_th_st,&enc_data_t->m_th_inf); + enc_data_t->m_th_inf.colorspace = OC_CS_UNSPECIFIED; + enc_data_t->m_th_inf.pixelformat = OC_PF_420; + enc_data_t->m_th_inf.target_bitrate = pdata->args.v_bitrate; + enc_data_t->m_th_inf.quality = pdata->args.v_quality; + enc_data_t->m_th_inf.dropframes_p = 0; + enc_data_t->m_th_inf.quick_p = 1; + enc_data_t->m_th_inf.keyframe_auto_p = 1; + enc_data_t->m_th_inf.keyframe_frequency = 64; + enc_data_t->m_th_inf.keyframe_frequency_force = 64; + enc_data_t->m_th_inf.keyframe_data_target_bitrate = enc_data_t->m_th_inf.quality * 1.5; + enc_data_t->m_th_inf.keyframe_auto_threshold = 80; + enc_data_t->m_th_inf.keyframe_mindistance = 8; + enc_data_t->m_th_inf.noise_sensitivity = 1; + enc_data_t->m_th_inf.sharpness = 2; + theora_encode_init(&enc_data_t->m_th_st,&enc_data_t->m_th_inf); + if(!pdata->args.nosound){ int ret; vorbis_info_init(&enc_data_t->m_vo_inf); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-10-03 09:14:47
|
Revision: 565 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=565&view=rev Author: enselic Date: 2008-10-03 09:14:44 +0000 (Fri, 03 Oct 2008) Log Message: ----------- src/rmd_init_encoder.c: When not overwriting files, output what filename that was eventually used. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_init_encoder.c Modified: trunk/recordmydesktop/src/rmd_init_encoder.c =================================================================== --- trunk/recordmydesktop/src/rmd_init_encoder.c 2008-10-03 08:29:13 UTC (rev 564) +++ trunk/recordmydesktop/src/rmd_init_encoder.c 2008-10-03 09:14:44 UTC (rev 565) @@ -120,8 +120,11 @@ } - if(!pdata->args.overwrite) + if (!pdata->args.overwrite) { IncrementalNaming(&(pdata)->args.filename); + fprintf(stderr, "Output file: %s\n", pdata->args.filename); + } + enc_data_t->fp=fopen((pdata)->args.filename,"w"); if(enc_data_t->fp==NULL){ fprintf(stderr,"Cannot open file %s for writting!\n", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-10-03 08:29:18
|
Revision: 564 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=564&view=rev Author: enselic Date: 2008-10-03 08:29:13 +0000 (Fri, 03 Oct 2008) Log Message: ----------- src/rmd_setbrwindow.c: Make SetBRWindow() return a success-boolean, i.e. TRUE for success and FALSE for failure. src/rmd.c: Adapt. Modified Paths: -------------- trunk/recordmydesktop/src/rmd.c trunk/recordmydesktop/src/rmd_setbrwindow.c Modified: trunk/recordmydesktop/src/rmd.c =================================================================== --- trunk/recordmydesktop/src/rmd.c 2008-10-03 08:25:53 UTC (rev 563) +++ trunk/recordmydesktop/src/rmd.c 2008-10-03 08:29:13 UTC (rev 564) @@ -96,7 +96,7 @@ " color depth modes are currently supported.\n"); exit(10); } - if(SetBRWindow(pdata.dpy,&pdata.brwin,&pdata.specs,&pdata.args)) + if (!SetBRWindow(pdata.dpy, &pdata.brwin, &pdata.specs, &pdata.args)) exit(11); //check if we are under compiz or beryl, Modified: trunk/recordmydesktop/src/rmd_setbrwindow.c =================================================================== --- trunk/recordmydesktop/src/rmd_setbrwindow.c 2008-10-03 08:25:53 UTC (rev 563) +++ trunk/recordmydesktop/src/rmd_setbrwindow.c 2008-10-03 08:29:13 UTC (rev 564) @@ -124,10 +124,10 @@ -int SetBRWindow(Display *dpy, - BRWindow *brwin, - DisplaySpecs *specs, - ProgArgs *args){ +boolean SetBRWindow(Display *dpy, + BRWindow *brwin, + DisplaySpecs *specs, + ProgArgs *args) { //before we start recording we have to make sure the ranges are valid if(args->windowid==0){//root window //first set it up @@ -147,7 +147,7 @@ fprintf(stderr,"Window size specification out of bounds!" "(current resolution:%dx%d)\n", specs->width,specs->height); - return 1; + return FALSE; } } else{ @@ -158,7 +158,7 @@ XGetWindowAttributes(dpy,args->windowid,&attribs); if((attribs.map_state==IsUnviewable)||(attribs.map_state==IsUnmapped)){ fprintf(stderr,"Window must be mapped and visible!\n"); - return 1; + return FALSE; } XTranslateCoordinates(dpy, specs->root, @@ -176,7 +176,7 @@ if((brwin->geom.x+brwin->geom.width>specs->width)|| (brwin->geom.y+brwin->geom.height>specs->height)){ fprintf(stderr,"Window must be on visible screen area!\n"); - return 1; + return FALSE; } brwin->rgeom.x=brwin->geom.x+args->x; @@ -188,7 +188,7 @@ if((args->x+brwin->rgeom.width>brwin->geom.width)|| (args->y+brwin->rgeom.height>brwin->geom.height)){ fprintf(stderr,"Specified Area is larger than window!\n"); - return 1; + return FALSE; } } fprintf(stderr, "Initial recording window is set to:\n" @@ -209,5 +209,5 @@ (((brwin->rgeom.height+15)>>4)<<4)* ((specs->depth==16)?2:4); - return 0; + return TRUE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-10-03 08:25:55
|
Revision: 563 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=563&view=rev Author: enselic Date: 2008-10-03 08:25:53 +0000 (Fri, 03 Oct 2008) Log Message: ----------- src/rmd_types.h: To be on the safer side, only define TRUE and FALSE if they are not already defined. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_types.h Modified: trunk/recordmydesktop/src/rmd_types.h =================================================================== --- trunk/recordmydesktop/src/rmd_types.h 2008-10-03 08:13:34 UTC (rev 562) +++ trunk/recordmydesktop/src/rmd_types.h 2008-10-03 08:25:53 UTC (rev 563) @@ -76,8 +76,12 @@ // Boolean type typedef int boolean; +#ifndef FALSE #define FALSE (0) +#endif +#ifndef TRUE #define TRUE (!FALSE) +#endif // Forward declarations typedef struct _ProgData ProgData; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-10-03 08:13:36
|
Revision: 562 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=562&view=rev Author: enselic Date: 2008-10-03 08:13:34 +0000 (Fri, 03 Oct 2008) Log Message: ----------- src/rmd_cache_frame.c: Fix display of recorded data info and compression ratio by using unsigned long long ints to prevent integer overflow, and convert to Mb as late as possible. Also did some reformating. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_cache_frame.c Modified: trunk/recordmydesktop/src/rmd_cache_frame.c =================================================================== --- trunk/recordmydesktop/src/rmd_cache_frame.c 2008-10-03 07:27:09 UTC (rev 561) +++ trunk/recordmydesktop/src/rmd_cache_frame.c 2008-10-03 08:13:34 UTC (rev 562) @@ -36,6 +36,7 @@ #include "rmd_cache_frame.h" +#define BYTES_PER_MB (1024 * 1024) #define CACHE_OUT_BUFFER_SIZE (4 * 1024) #define CACHE_FILE_SIZE_LIMIT (5 * 1024 * 1024) @@ -91,12 +92,12 @@ frameno=0, nbytes=0, nth_cache=1; - unsigned int total_bytes=0, - total_received_bytes=0; u_int32_t ynum,unum,vnum, y_short_blocks[blocknum_x*blocknum_y], u_short_blocks[blocknum_x*blocknum_y], v_short_blocks[blocknum_x*blocknum_y]; + unsigned long long int total_bytes = 0; + unsigned long long int total_received_bytes = 0; if(!pdata->args.zerocompression){ fp=pdata->cache_data->ifp; @@ -256,23 +257,35 @@ //space is freed the recording //can be proccessed later. } - total_bytes+=(nbytes>>20); + total_bytes += nbytes; nth_cache++; nbytes=0; } } - total_bytes+=(nbytes>>20); - total_received_bytes=((frameno*((pdata->specs.depth>=24)?4:2)* - pdata->brwin.rgeom.width*pdata->brwin.rgeom.height)>>20); + total_bytes += nbytes; + + { + unsigned int bytes_per_pixel = pdata->specs.depth >= 24 ? 4 : 2; + unsigned int pixels_per_frame = pdata->brwin.rgeom.width * pdata->brwin.rgeom.height; + + total_received_bytes = ((unsigned int)frameno) * bytes_per_pixel * pixels_per_frame; + } + if(total_received_bytes){ - fprintf(stderr,"\n*********************************************\n" - "\nCached %u MB, from %u MB that were received.\n" - "Average cache compression ratio: %u %%\n" - "\n*********************************************\n", - total_bytes, - total_received_bytes, - (total_bytes*100)/total_received_bytes); + double percent_of_data_left = (total_bytes / (double)total_received_bytes) * 100; + fprintf(stderr, + "\n" + "*********************************************\n" + "\n" + "Cached %llu MB, from %llu MB that were received.\n" + "Average cache compression ratio: %.1f %%\n" + "\n" + "*********************************************\n", + total_bytes / BYTES_PER_MB, + total_received_bytes / BYTES_PER_MB, + 100 - percent_of_data_left); + } fprintf(stderr, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-10-03 07:27:11
|
Revision: 561 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=561&view=rev Author: enselic Date: 2008-10-03 07:27:09 +0000 (Fri, 03 Oct 2008) Log Message: ----------- src/rmd_cache_frame.c: Define CACHE_OUT_BUFFER_SIZE and CACHE_FILE_SIZE_LIMIT in a readable manner, and remove redundant comments. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_cache_frame.c Modified: trunk/recordmydesktop/src/rmd_cache_frame.c =================================================================== --- trunk/recordmydesktop/src/rmd_cache_frame.c 2008-09-18 18:59:47 UTC (rev 560) +++ trunk/recordmydesktop/src/rmd_cache_frame.c 2008-10-03 07:27:09 UTC (rev 561) @@ -36,10 +36,8 @@ #include "rmd_cache_frame.h" -//minimize hard disk access -#define CACHE_OUT_BUFFER_SIZE 4096 -//500 mb file size -#define CACHE_FILE_SIZE_LIMIT (500*1<<20) +#define CACHE_OUT_BUFFER_SIZE (4 * 1024) +#define CACHE_FILE_SIZE_LIMIT (5 * 1024 * 1024) static int FlushBlock(unsigned char *buf, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-18 11:59:50
|
Revision: 560 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=560&view=rev Author: enselic Date: 2008-09-18 18:59:47 +0000 (Thu, 18 Sep 2008) Log Message: ----------- src/rmd_parseargs.c doc/recordmydesktop.1: Make options consistently have GNU-style, i.e. --this instead of -this. We're still backwards compatible with old options, but they are undocumented. Modified Paths: -------------- trunk/recordmydesktop/doc/recordmydesktop.1 trunk/recordmydesktop/src/rmd_parseargs.c Modified: trunk/recordmydesktop/doc/recordmydesktop.1 =================================================================== --- trunk/recordmydesktop/doc/recordmydesktop.1 2008-09-18 13:16:18 UTC (rev 559) +++ trunk/recordmydesktop/doc/recordmydesktop.1 2008-09-18 18:59:47 UTC (rev 560) @@ -58,10 +58,10 @@ .br See .B -\-pause\-shortcut +\-\-pause\-shortcut and .B -\-stop\-shortcut +\-\-stop\-shortcut , on the .B Misc. @@ -99,7 +99,7 @@ To specify a region for recording you can type this: .br .B -~$ recordmydesktop \-x X_pos \-y Y_pos \-width WIDTH \-height HEIGHT \-o foo.ogv +~$ recordmydesktop \-x X_pos \-y Y_pos \-\-width WIDTH \-\-height HEIGHT \-o foo.ogv .br where X_pos and Y_pos specify the offset in pixels from the upper left .br @@ -201,12 +201,12 @@ .br .TP .B - \-windowid id_of_window + \-\-windowid id_of_window id of window to be recorded. .br .TP .B - \-display DISPLAY + \-\-display DISPLAY Display to connect to. .br .TP @@ -221,12 +221,12 @@ .br .TP .B - \-width N + \-\-width N Width of recorded window. .br .TP .B - \-height N + \-\-height N Height of recorded window. .br .TP @@ -235,7 +235,7 @@ .br .TP .B - \-dummy\-cursor color + \-\-dummy\-cursor color Draw a dummy cursor, instead of the normal one.Value of color can be "black" or "white". .br .TP @@ -270,7 +270,7 @@ .br .TP .B - \-fps N(number>0.0) + \-\-fps N(number>0.0) A positive number denoting desired framerate. .br .br @@ -280,22 +280,22 @@ .br .TP .B - \-channels N(number>0) + \-\-channels N(number>0) A positive number denoting desired sound channels in recording. .br .TP .B - \-freq N(number>0) + \-\-freq N(number>0) A positive number denoting desired sound frequency. .br .TP .B - \-buffer\-size N(number>0) + \-\-buffer\-size N(number>0) A positive number denoting the desired sound buffer size(in frames, when using ALSA or OSS). .br .TP .B - \-ring\-buffer\-size N(float number>0) + \-\-ring\-buffer\-size N(float number>0) A float number denoting the desired ring buffer size (in seconds,when using JACK only). The overall size of the buffer in bytes will be: ring_buffer_size * samplerate * number_of_ports * sizeof(jack_default_audio_sample_t), @@ -303,12 +303,12 @@ .br .TP .B - \-device SOUND_DEVICE + \-\-device SOUND_DEVICE Sound device(default hw:0,0 or /dev/dsp, depending on whether ALSA or OSS is used). .br .TP .B - \-use\-jack port1 port2... portn + \-\-use\-jack port1 port2... portn Record audio from the specified list of .B space-separated @@ -332,17 +332,17 @@ .br .TP .B - \-v_quality n + \-\-v_quality n A number from 0 to 63 for desired encoded video quality(default 63). .br .TP .B - \-v_bitrate n + \-\-v_bitrate n A number from 45000 to 2000000 for desired encoded video bitrate(default 45000). .br .TP .B - \-s_quality n + \-\-s_quality n Desired audio quality(\-1 to 10). .br .PP @@ -352,7 +352,7 @@ .br .TP .B - \-rescue path_to_data + \-\-rescue path_to_data Encode cache data from a previous session, into an Ogg/Theora+Vorbis file. The filename will be the one that was chosen initially. Any other option specified with this one will be implicitly ignored @@ -387,7 +387,7 @@ .br .TP .B - \-pause\-shortcut MOD+KEY + \-\-pause\-shortcut MOD+KEY Shortcut that will be used for pausing or unpausing the recording. MOD can be any combination of the following modifier keys: Control, Shift and Mod1 to Mod5. The modifiers can be separated @@ -403,7 +403,7 @@ .br .TP .B - \-stop\-shortcut MOD+KEY + \-\-stop\-shortcut MOD+KEY Shortcut that will be used to stop the recording. For more, see \-pause\-shortcut above. Default is Control+Mod1+s. @@ -415,12 +415,12 @@ .br .TP .B - \-workdir DIR + \-\-workdir DIR Location where a temporary directory will be created to hold project files(default /tmp). .br .TP .B - \-delay n[H|h|M|m] + \-\-delay n[H|h|M|m] Number of secs(default),minutes or hours before capture starts(number can be float). .br .TP @@ -460,9 +460,9 @@ .br .SH NOTES .br - Recording a window using the \-windowid option, doesn't track the window itself, but the region that it covers. + Recording a window using the \-\-windowid option, doesn't track the window itself, but the region that it covers. .br -Also when using that option the \-x,\-y,\-width and \-height options are relative to the specified window area. +Also when using that option the \-x,\-y,\-\-width and \-\-height options are relative to the specified window area. .br An easy way to find out the id of a window, is by using the .B @@ -479,7 +479,7 @@ More conviniently you can put all that in the command that launches recordMyDesktop like this: .br .B -~$recordmydesktop \-windowid $(xwininfo | awk \'/Window id:/ {print $4}\') +~$recordmydesktop \-\-windowid $(xwininfo | awk \'/Window id:/ {print $4}\') .br .br Also, the lower quality you select on a video recording ( Modified: trunk/recordmydesktop/src/rmd_parseargs.c =================================================================== --- trunk/recordmydesktop/src/rmd_parseargs.c 2008-09-18 13:16:18 UTC (rev 559) +++ trunk/recordmydesktop/src/rmd_parseargs.c 2008-09-18 18:59:47 UTC (rev 560) @@ -47,6 +47,10 @@ fprintf(stderr,"\n\n"); } +/** + * Still has backwards compatible options like -this, but --this is + * what is documented. + */ boolean ParseArgs(int argc, char **argv, ProgArgs *arg_return) { int i; char *usage="\nUsage:\n" @@ -59,14 +63,14 @@ "selected during compilation and exit.\n\n" "Image Options:\n" - "\t-windowid id_of_window\tid of window to be recorded.\n" - "\t-display DISPLAY\tDisplay to connect to.\n" + "\t--windowid id_of_window\tid of window to be recorded.\n" + "\t--display DISPLAY\tDisplay to connect to.\n" "\t-x X\t\t\tOffset in x direction.\n" "\t-y Y\t\t\tOffset in y direction.\n" - "\t-width N\t\tWidth of recorded window.\n" - "\t-height N\t\tHeight of recorded window.\n\n" + "\t--width N\t\tWidth of recorded window.\n" + "\t--height N\t\tHeight of recorded window.\n\n" - "\t-dummy-cursor color\tColor of the dummy cursor [black|white]\n" + "\t--dummy-cursor color\tColor of the dummy cursor [black|white]\n" "\t--no-cursor\t\tDisable drawing of the cursor.\n" "\t--no-shared\t\tDisable usage of" " MIT-shared memory extension(Not Recommended!).\n" @@ -75,50 +79,50 @@ "\t--quick-subsampling\tDo subsampling" " of the chroma planes by discarding,not averaging.\n" - "\t-fps N(number>0.0)\tA positive number denoting desired framerate.\n\n" + "\t--fps N(number>0.0)\tA positive number denoting desired framerate.\n\n" "Sound Options:\n" - "\t-channels N\t\t\tA positive number denoting" + "\t--channels N\t\t\tA positive number denoting" " desired sound channels in recording.\n" - "\t-freq N\t\t\t\tA positive number denoting desired sound frequency.\n" - "\t-buffer-size N\t\t\tA positive number denoting the desired" + "\t--freq N\t\t\t\tA positive number denoting desired sound frequency.\n" + "\t--buffer-size N\t\t\tA positive number denoting the desired" " sound buffer size (in frames,when using ALSA or OSS)\n" - "\t-ring-buffer-size N\t\tA float number denoting the desired" + "\t--ring-buffer-size N\t\tA float number denoting the desired" " ring buffer size (in seconds,when using JACK only).\n" - "\t-device SOUND_DEVICE\t\tSound device(default " + "\t--device SOUND_DEVICE\t\tSound device(default " DEFAULT_AUDIO_DEVICE ").\n" - "\t-use-jack port1 port2... portn\tRecord audio from the specified\n" + "\t--use-jack port1 port2... portn\tRecord audio from the specified\n" "\t\t\t\t\tlist of space-separated jack ports.\n" "\t--no-sound\t\t\tDo not record sound.\n\n" "Encoding Options\n" "\t--on-the-fly-encoding\tEncode the audio-video data, while recording.\n" - "\t-v_quality n\t\tA number from 0 to 63 for" + "\t--v_quality n\t\tA number from 0 to 63 for" " desired encoded video quality(default 63).\n" - "\t-v_bitrate n\t\tA number from 45000 to 2000000" + "\t--v_bitrate n\t\tA number from 45000 to 2000000" " for desired encoded video bitrate(default 45000).\n" - "\t-s_quality n\t\tDesired audio quality(-1 to 10).\n\n" + "\t--s_quality n\t\tDesired audio quality(-1 to 10).\n\n" "Misc Options:\n" - "\t-rescue path_to_data\tEncode data from a previous, crashed, session.\n" + "\t--rescue path_to_data\tEncode data from a previous, crashed, session.\n" "\t--no-wm-check\t\tDo not try to detect" " the window manager(and set options according to it)\n" - "\t-pause-shortcut MOD+KEY\tShortcut that will be used for (un)pausing" + "\t--pause-shortcut MOD+KEY\tShortcut that will be used for (un)pausing" "(default Control+Mod1+p).\n" - "\t-stop-shortcut MOD+KEY\tShortcut that will be used to stop the " + "\t--stop-shortcut MOD+KEY\tShortcut that will be used to stop the " "recording (default Control+Mod1+s).\n" "\t--compress-cache\tImage data are cached with light compression.\n" - "\t-workdir DIR\t\tLocation where a temporary directory" + "\t--workdir DIR\t\tLocation where a temporary directory" " will be created to hold project files(default $HOME).\n" - "\t-delay n[H|h|M|m]\tNumber of secs(default),minutes or hours" + "\t--delay n[H|h|M|m]\tNumber of secs(default),minutes or hours" " before capture starts(number can be float)\n" "\t--overwrite\t\tIf there is already a file with the same name," @@ -138,7 +142,8 @@ } } for(i=1;i<argc;i++){ - if(!strcmp(argv[i],"-delay")){ + if (strcmp(argv[i], "--delay") == 0 || + strcmp(argv[i], "-delay") == 0) { if(i+1<argc){ float num=atof(argv[i+1]); if(num>0.0){ @@ -156,37 +161,39 @@ arg_return->delay=(int)num; } else{ - fprintf(stderr,"Argument Usage: -delay n[H|h|M|m]\n" + fprintf(stderr,"Argument Usage: --delay n[H|h|M|m]\n" "where n is a float number\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -delay n[H|h|M|m]\n" + fprintf(stderr,"Argument Usage: --delay n[H|h|M|m]\n" "where n is a float number\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-windowid")){ + else if (strcmp(argv[i], "--windowid") == 0 || + strcmp(argv[i], "-windowid") == 0) { if(i+1<argc){ Window num=strtod(argv[i+1],NULL); if(num>0) arg_return->windowid=num; else{ fprintf(stderr,"Argument Usage:" - " -windowid id_of_window(number)\n"); + " --windowid id_of_window(number)\n"); return FALSE; } } else{ fprintf(stderr,"Argument Usage:" - " -windowid id_of_window(number)\n"); + " --windowid id_of_window(number)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-display")){ + else if (strcmp(argv[i], "--display") == 0 || + strcmp(argv[i], "-display") == 0) { if(i+1<argc){ if(arg_return->display!=NULL) free(arg_return->display); @@ -194,7 +201,7 @@ strcpy(arg_return->display,argv[i+1]); } else{ - fprintf(stderr,"Argument Usage: -display DISPLAY\n"); + fprintf(stderr,"Argument Usage: --display DISPLAY\n"); return FALSE; } i++; @@ -231,34 +238,36 @@ } i++; } - else if(!strcmp(argv[i],"-width")){ + else if (strcmp(argv[i], "--width") == 0 || + strcmp(argv[i], "-width") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if(num>0) arg_return->width=num; else{ - fprintf(stderr,"Argument Usage: -width N(number>0)\n"); + fprintf(stderr,"Argument Usage: --width N(number>0)\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -width N(number>0)\n"); + fprintf(stderr,"Argument Usage: --width N(number>0)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-height")){ + else if (strcmp(argv[i], "--height") == 0 || + strcmp(argv[i], "-height") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if(num>0) arg_return->height=num; else{ - fprintf(stderr,"Argument Usage: -height N(number>0)\n"); + fprintf(stderr,"Argument Usage: --height N(number>0)\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -height N(number>0)\n"); + fprintf(stderr,"Argument Usage: --height N(number>0)\n"); return FALSE; } i++; @@ -275,59 +284,63 @@ } i++; } - else if(!strcmp(argv[i],"-fps")){ + else if (strcmp(argv[i], "--fps") == 0 || + strcmp(argv[i], "-fps") == 0) { if(i+1<argc){ float num=atof(argv[i+1]); if(num>0.0) arg_return->fps=num; else{ - fprintf(stderr,"Argument Usage: -fps N(number>0)\n"); + fprintf(stderr,"Argument Usage: --fps N(number>0)\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -fps N(number>0)\n"); + fprintf(stderr,"Argument Usage: --fps N(number>0)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-v_quality")){ + else if (strcmp(argv[i], "--v_quality") == 0 || + strcmp(argv[i], "-v_quality") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if((num>=0)&&(num<64)) arg_return->v_quality=num; else{ fprintf(stderr,"Argument Usage:" - " -v_quality n(number 0-63)\n"); + " --v_quality n(number 0-63)\n"); return FALSE; } } else{ fprintf(stderr,"Argument Usage:" - " -v_quality n(number 0-63)\n"); + " --v_quality n(number 0-63)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-v_bitrate")){ + else if (strcmp(argv[i], "--v_bitrate") == 0 || + strcmp(argv[i], "-v_bitrate") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if((num>=45000)&&(num<=2000000)) arg_return->v_bitrate=num; else{ fprintf(stderr,"Argument Usage:" - " -v_bitrate n(number 45000-2000000)\n"); + " --v_bitrate n(number 45000-2000000)\n"); return FALSE; } } else{ fprintf(stderr,"Argument Usage:" - " -v_bitrate n(number 45000-2000000)\n"); + " --v_bitrate n(number 45000-2000000)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-dummy-cursor")){ + else if (strcmp(argv[i], "--dummy-cursor") == 0 || + strcmp(argv[i], "-dummy-cursor") == 0) { if(i+1<argc){ if(!strcmp(argv[i+1],"white")) arg_return->cursor_color=0; @@ -335,7 +348,7 @@ arg_return->cursor_color=1; else{ fprintf(stderr,"Argument Usage:" - " -dummy-cursor [black|white]\n"); + " --dummy-cursor [black|white]\n"); return FALSE; } arg_return->have_dummy_cursor=1; @@ -343,64 +356,68 @@ } else{ fprintf(stderr,"Argument Usage:" - " -dummy-cursor [black|white]\n"); + " --dummy-cursor [black|white]\n"); return FALSE; } i++; } else if(!strcmp(argv[i],"--no-cursor")) arg_return->xfixes_cursor=0; - else if(!strcmp(argv[i],"-freq")){ + else if (strcmp(argv[i], "--freq") == 0 || + strcmp(argv[i], "-freq") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if(num>0) arg_return->frequency=num; else{ - fprintf(stderr,"Argument Usage: -freq N(number>0)\n"); + fprintf(stderr,"Argument Usage: --freq N(number>0)\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -freq N(number>0)\n"); + fprintf(stderr,"Argument Usage: --freq N(number>0)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-channels")){ + else if (strcmp(argv[i], "--channels") == 0 || + strcmp(argv[i], "-channels") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if(num>0) arg_return->channels=num; else{ - fprintf(stderr,"Argument Usage: -channels N(number>0)\n"); + fprintf(stderr,"Argument Usage: --channels N(number>0)\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -channels N(number>0)\n"); + fprintf(stderr,"Argument Usage: --channels N(number>0)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-s_quality")){ + else if (strcmp(argv[i], "--s_quality") == 0 || + strcmp(argv[i], "-s_quality") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if((num>=-1)&&(num<=10)) arg_return->s_quality=num; else{ fprintf(stderr,"Argument Usage:" - " -s_quality n(number -1 to 10)\n"); + " --s_quality n(number -1 to 10)\n"); return FALSE; } } else{ fprintf(stderr,"Argument Usage:" - " -s_quality n(number -1 to 10)\n"); + " --s_quality n(number -1 to 10)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-device")){ + else if (strcmp(argv[i], "--device") == 0 || + strcmp(argv[i], "-device") == 0) { if(i+1<argc){ free(arg_return->device); arg_return->device=malloc(strlen(argv[i+1])+1); @@ -412,60 +429,65 @@ } i++; } - else if(!strcmp(argv[i],"-workdir")){ + else if (strcmp(argv[i], "--workdir") == 0 || + strcmp(argv[i], "-workdir") == 0) { if(i+1<argc){ free(arg_return->workdir); arg_return->workdir=malloc(strlen(argv[i+1])+1); strcpy(arg_return->workdir,argv[i+1]); } else{ - fprintf(stderr,"Argument Usage: -workdir DIR\n"); + fprintf(stderr,"Argument Usage: --workdir DIR\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-pause-shortcut")){ + else if (strcmp(argv[i], "--pause-shortcut") == 0 || + strcmp(argv[i], "-pause-shortcut") == 0) { if(i+1<argc){ free(arg_return->pause_shortcut); arg_return->pause_shortcut=malloc(strlen(argv[i+1])+1); strcpy(arg_return->pause_shortcut,argv[i+1]); } else{ - fprintf(stderr,"Argument Usage: -pause-shortcut MOD+KEY\n"); + fprintf(stderr,"Argument Usage: --pause-shortcut MOD+KEY\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-stop-shortcut")){ + else if (strcmp(argv[i], "--stop-shortcut") == 0 || + strcmp(argv[i], "-stop-shortcut") == 0) { if(i+1<argc){ free(arg_return->stop_shortcut); arg_return->stop_shortcut=malloc(strlen(argv[i+1])+1); strcpy(arg_return->stop_shortcut,argv[i+1]); } else{ - fprintf(stderr,"Argument Usage: -stop-shortcut MOD+KEY\n"); + fprintf(stderr,"Argument Usage: --stop-shortcut MOD+KEY\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-buffer-size")){ + else if (strcmp(argv[i], "--buffer-size") == 0 || + strcmp(argv[i], "-buffer-size") == 0) { if(i+1<argc){ int num=atoi(argv[i+1]); if(num>0) arg_return->buffsize=num; else{ fprintf(stderr,"Argument Usage:" - " -buffer-size N(number>0)\n"); + " --buffer-size N(number>0)\n"); return FALSE; } } else{ - fprintf(stderr,"Argument Usage: -buffer-size N(number>0)\n"); + fprintf(stderr,"Argument Usage: --buffer-size N(number>0)\n"); return FALSE; } i++; } - else if(!strcmp(argv[i],"-use-jack")){ + else if (strcmp(argv[i], "--use-jack") == 0 || + strcmp(argv[i], "-use-jack") == 0) { if(i+1<argc){ #ifdef HAVE_JACK_H int k=i+1; @@ -487,7 +509,7 @@ arg_return->use_jack=1; } else{ - fprintf(stderr,"Argument Usage: -use-jack port1" + fprintf(stderr,"Argument Usage: --use-jack port1" " port2... portn\n"); return FALSE; } @@ -498,12 +520,13 @@ #endif } else{ - fprintf(stderr,"Argument Usage: -use-jack port1" + fprintf(stderr,"Argument Usage: --use-jack port1" " port2... portn\n"); return FALSE; } } - else if(!strcmp(argv[i],"-ring-buffer-size")){ + else if (strcmp(argv[i], "--ring-buffer-size") == 0 || + strcmp(argv[i], "-ring-buffer-size") == 0) { if(i+1<argc){ float num=atof(argv[i+1]); if(num>0.0) @@ -521,12 +544,13 @@ } i++; } - else if(!strcmp(argv[i],"-rescue")){ + else if (strcmp(argv[i], "--rescue") == 0 || + strcmp(argv[i], "-rescue") == 0) { if(i+1<argc){ arg_return->rescue_path = argv[i + 1]; } else{ - fprintf(stderr,"Argument Usage: -rescue path_to_data\n"); + fprintf(stderr,"Argument Usage: --rescue path_to_data\n"); return FALSE; } i++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-18 06:16:29
|
Revision: 559 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=559&view=rev Author: iovar Date: 2008-09-18 13:16:18 +0000 (Thu, 18 Sep 2008) Log Message: ----------- configure.ac : Fixed AC_INIT macro utilisation Modified Paths: -------------- trunk/recordmydesktop/configure.ac Modified: trunk/recordmydesktop/configure.ac =================================================================== --- trunk/recordmydesktop/configure.ac 2008-09-17 23:09:21 UTC (rev 558) +++ trunk/recordmydesktop/configure.ac 2008-09-18 13:16:18 UTC (rev 559) @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(src/rmd.c) -AM_INIT_AUTOMAKE(recordmydesktop,0.3.7.3,) +AC_INIT( [recordmydesktop], [0.3.7.3], ) +AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/rmd.c]) AM_CONFIG_HEADER(config.h) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-17 16:09:24
|
Revision: 558 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=558&view=rev Author: iovar Date: 2008-09-17 23:09:21 +0000 (Wed, 17 Sep 2008) Log Message: ----------- src/rmd_get_frame.c : As Martin has found, we need to mark both the new and the old area of the cursor, for it to render correctly. This changeset does that for the full-shots scenario, (which is always double-buffered) by making dirty the new area on the back buffer, before the Yuv convertion. Other changes are that the MARK_BACK_BUFFER macro has been renamed to MARK_BUFFER_AREA (as that is what it does and there is nothing intristically tying it to the back buffer) and also a non-sensical comment was removed (probably a thought I never got to finish). Modified Paths: -------------- trunk/recordmydesktop/src/rmd_get_frame.c Modified: trunk/recordmydesktop/src/rmd_get_frame.c =================================================================== --- trunk/recordmydesktop/src/rmd_get_frame.c 2008-09-17 16:36:46 UTC (rev 557) +++ trunk/recordmydesktop/src/rmd_get_frame.c 2008-09-17 23:09:21 UTC (rev 558) @@ -145,7 +145,7 @@ }\ } -#define MARK_BACK_BUFFER_C( data,\ +#define MARK_BUFFER_AREA_C( data,\ x_tm,\ y_tm,\ width_tm,\ @@ -165,7 +165,7 @@ }\ } -#define MARK_BACK_BUFFER( data,\ +#define MARK_BUFFER_AREA( data,\ x_tm,\ y_tm,\ width_tm,\ @@ -173,7 +173,7 @@ buffer_width,\ __bit_depth__){\ if((__bit_depth__==24)||(__bit_depth__==32)){\ - MARK_BACK_BUFFER_C( data,\ + MARK_BUFFER_AREA_C( data,\ x_tm,\ y_tm,\ width_tm,\ @@ -182,7 +182,7 @@ 32)\ }\ else{\ - MARK_BACK_BUFFER_C( data,\ + MARK_BUFFER_AREA_C( data,\ x_tm,\ y_tm,\ width_tm,\ @@ -464,15 +464,6 @@ pdata->args.follow_mouse){ - // ==Old comment== (not sure how to interpret): - //pointer sequence - //update previous_position - //(if full_shots is enabled the new cursor is - //entered on the list for update. - //When taking full shots we keep it for further - //bellow, to mark the area as dirty when dbuffering. - // - // ==New comment== // Pointer sequence: // * Mark previous position as dirty with RectInsert() // * Update to new position @@ -498,13 +489,45 @@ &mouse_pos_abs.x,&mouse_pos_abs.y, &mouse_pos_rel.x,&mouse_pos_rel.y,&msk_ret); } + CLIP_DUMMY_POINTER_AREA(mouse_pos_abs, &temp_brwin, &mouse_pos_temp); - if (!pdata->args.full_shots && - mouse_pos_temp.x >=0 && + if( mouse_pos_temp.x >=0 && mouse_pos_temp.y >=0 && mouse_pos_temp.width > 0 && mouse_pos_temp.height > 0) { - RectInsert(&pdata->rect_root,&mouse_pos_temp); + + //there are 3 capture scenarios: + // * Xdamage + // * full-shots with double buffering + // * full-shots on a single buffer + //The last one cannot be reached through + //this code (see above how the d_buf variable is set), but + //even if it could, it would not be of interest regarding the + //marking of the cursor area. Single buffer means full repaint + //on every frame so there is no need for marking at all. + + if (!pdata->args.full_shots) { + + RectInsert(&pdata->rect_root,&mouse_pos_temp); + + } + else if(d_buff){ + unsigned char *back_buff= + (img_sel)?((unsigned char*)image->data): + ((unsigned char*)image_back->data); + + MARK_BUFFER_AREA( back_buff, + (mouse_pos_temp.x- + temp_brwin.rgeom.x+ + pdata->enc_data->x_offset), + (mouse_pos_temp.y- + temp_brwin.rgeom.y+ + pdata->enc_data->y_offset), + mouse_pos_temp.width, + mouse_pos_temp.height, + (temp_brwin.rgeom.width), + pdata->specs.depth) + } } } if(pdata->args.follow_mouse){ @@ -629,12 +652,15 @@ pdata->npxl); } if(d_buff){ - //make previous cursor position dirty + //make previous cursor position dirty + //on the currently front buffer (which + //will be the back buffer next time it's + //used) unsigned char *front_buff= (!img_sel)?((unsigned char*)image->data): ((unsigned char*)image_back->data); - MARK_BACK_BUFFER( front_buff, + MARK_BUFFER_AREA( front_buff, (mouse_pos_temp.x- temp_brwin.rgeom.x+ pdata->enc_data->x_offset), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-16 13:14:34
|
Revision: 555 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=555&view=rev Author: enselic Date: 2008-09-16 20:14:32 +0000 (Tue, 16 Sep 2008) Log Message: ----------- src/rmd_macro.h: Remove the COMPARE_STRIDE define, it's not used any longer. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_macro.h Modified: trunk/recordmydesktop/src/rmd_macro.h =================================================================== --- trunk/recordmydesktop/src/rmd_macro.h 2008-09-16 20:09:03 UTC (rev 554) +++ trunk/recordmydesktop/src/rmd_macro.h 2008-09-16 20:14:32 UTC (rev 555) @@ -70,14 +70,6 @@ //avoid problems (amd64 has 8byte ulong) #define RMD_ULONG_SIZE_T (sizeof(unsigned long)) -//size of stride when comparing planes(depending on type) -//this is just to avoid thousands of sizeof's -#ifdef HAVE_U_INT64_T - #define COMPARE_STRIDE 8 -#else - #define COMPARE_STRIDE 4 -#endif - //The width, in bytes, of the blocks //on which the y,u and v planes are broken. //These blocks are square. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-16 13:09:06
|
Revision: 554 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=554&view=rev Author: enselic Date: 2008-09-16 20:09:03 +0000 (Tue, 16 Sep 2008) Log Message: ----------- src/rmd_macro.h: Move the DEFAULT_AUDIO_DEVICE define to src/rmd_types.h here. src/rmd_parseargs.c: That way we can get rid of the dependency to rmd_macro.h from here, yay! Modified Paths: -------------- trunk/recordmydesktop/src/rmd_macro.h trunk/recordmydesktop/src/rmd_parseargs.c trunk/recordmydesktop/src/rmd_types.h Modified: trunk/recordmydesktop/src/rmd_macro.h =================================================================== --- trunk/recordmydesktop/src/rmd_macro.h 2008-09-16 19:45:26 UTC (rev 553) +++ trunk/recordmydesktop/src/rmd_macro.h 2008-09-16 20:09:03 UTC (rev 554) @@ -84,12 +84,6 @@ #define Y_UNIT_WIDTH 0x0010 #define UV_UNIT_WIDTH 0x0008 -#ifdef HAVE_LIBASOUND - #define DEFAULT_AUDIO_DEVICE "hw:0,0" -#else - #define DEFAULT_AUDIO_DEVICE "/dev/dsp" -#endif - #define I16TOA(number,buffer){\ int t_num=(number),__k=0,__i=0;\ char *t_buf=malloc(8);\ Modified: trunk/recordmydesktop/src/rmd_parseargs.c =================================================================== --- trunk/recordmydesktop/src/rmd_parseargs.c 2008-09-16 19:45:26 UTC (rev 553) +++ trunk/recordmydesktop/src/rmd_parseargs.c 2008-09-16 20:09:03 UTC (rev 554) @@ -26,11 +26,11 @@ #include "config.h" +#include <stdio.h> + #include "rmd_types.h" -#include "rmd_macro.h" - static void PrintConfig(void) { fprintf(stderr,"\nrecordMyDesktop was compiled with" " the following options:\n\n"); Modified: trunk/recordmydesktop/src/rmd_types.h =================================================================== --- trunk/recordmydesktop/src/rmd_types.h 2008-09-16 19:45:26 UTC (rev 553) +++ trunk/recordmydesktop/src/rmd_types.h 2008-09-16 20:09:03 UTC (rev 554) @@ -37,9 +37,13 @@ #ifdef HAVE_LIBASOUND #include <alsa/asoundlib.h> + + #define DEFAULT_AUDIO_DEVICE "hw:0,0" #else #include <sys/ioctl.h> #include <sys/soundcard.h> + + #define DEFAULT_AUDIO_DEVICE "/dev/dsp" #endif #ifdef HAVE_JACK_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-16 12:45:29
|
Revision: 553 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=553&view=rev Author: enselic Date: 2008-09-16 19:45:26 +0000 (Tue, 16 Sep 2008) Log Message: ----------- src/rmd_types.h: Add a rescue_path member to ProgArgs. src/rmd_initialize_data.c: Initialize rescue_path. src/rmd_parseargs.c: Don't rmdRescue() in ParseArgs(). We want the parse args functionality to be free from depdenencies. ParseArgs() should only parse args. Instead set the new rescue_path ProgArgs member. src/rmd.c: If a rescue_path was given, call rmdRescue() with that path. By doing this rmd_parseargs.c becomes more self-contained. Modified Paths: -------------- trunk/recordmydesktop/src/rmd.c trunk/recordmydesktop/src/rmd_initialize_data.c trunk/recordmydesktop/src/rmd_parseargs.c trunk/recordmydesktop/src/rmd_types.h Modified: trunk/recordmydesktop/src/rmd.c =================================================================== --- trunk/recordmydesktop/src/rmd.c 2008-09-16 18:46:38 UTC (rev 552) +++ trunk/recordmydesktop/src/rmd.c 2008-09-16 19:45:26 UTC (rev 553) @@ -28,15 +28,16 @@ #include "rmd_types.h" +#include "rmd_cache.h" #include "rmd_encode_cache.h" +#include "rmd_error.h" #include "rmd_initialize_data.h" #include "rmd_parseargs.h" #include "rmd_queryextensions.h" -#include "rmd_cache.h" -#include "rmd_error.h" -#include "rmd_threads.h" +#include "rmd_rescue.h" #include "rmd_setbrwindow.h" #include "rmd_shortcuts.h" +#include "rmd_threads.h" #include "rmd_wm_check.h" @@ -49,6 +50,9 @@ if (!ParseArgs(argc, argv, &pdata.args)) { exit(1); } + if (pdata.args.rescue_path != NULL) { + exit(rmdRescue(pdata.args.rescue_path)); + } if(XInitThreads ()==0){ fprintf(stderr,"Couldn't initialize thread support!\n"); exit(7); Modified: trunk/recordmydesktop/src/rmd_initialize_data.c =================================================================== --- trunk/recordmydesktop/src/rmd_initialize_data.c 2008-09-16 18:46:38 UTC (rev 552) +++ trunk/recordmydesktop/src/rmd_initialize_data.c 2008-09-16 19:45:26 UTC (rev 553) @@ -199,6 +199,7 @@ args->y = 0; args->width = 0; args->height = 0; + args->rescue_path = NULL; args->nosound = 0; args->full_shots = 0; args->follow_mouse = 0; Modified: trunk/recordmydesktop/src/rmd_parseargs.c =================================================================== --- trunk/recordmydesktop/src/rmd_parseargs.c 2008-09-16 18:46:38 UTC (rev 552) +++ trunk/recordmydesktop/src/rmd_parseargs.c 2008-09-16 19:45:26 UTC (rev 553) @@ -29,7 +29,6 @@ #include "rmd_types.h" #include "rmd_macro.h" -#include "rmd_rescue.h" static void PrintConfig(void) { @@ -524,8 +523,7 @@ } else if(!strcmp(argv[i],"-rescue")){ if(i+1<argc){ - int ex_st=rmdRescue(argv[i+1]); - exit(ex_st); + arg_return->rescue_path = argv[i + 1]; } else{ fprintf(stderr,"Argument Usage: -rescue path_to_data\n"); Modified: trunk/recordmydesktop/src/rmd_types.h =================================================================== --- trunk/recordmydesktop/src/rmd_types.h 2008-09-16 18:46:38 UTC (rev 552) +++ trunk/recordmydesktop/src/rmd_types.h 2008-09-16 19:45:26 UTC (rev 553) @@ -129,6 +129,7 @@ #else u_int32_t buffsize; #endif + const char* rescue_path; int nosound; //do not record sound(default 0) int noshared; //do not use shared memory extension(default 0) int nowmcheck; //do not check if there's a 3d comp window manager This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-16 11:46:40
|
Revision: 552 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=552&view=rev Author: enselic Date: 2008-09-16 18:46:38 +0000 (Tue, 16 Sep 2008) Log Message: ----------- src/rmd_rectinsert.c: Remove unnecessary mallocs, we can use the stack instead. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_rectinsert.c Modified: trunk/recordmydesktop/src/rmd_rectinsert.c =================================================================== --- trunk/recordmydesktop/src/rmd_rectinsert.c 2008-09-16 17:04:11 UTC (rev 551) +++ trunk/recordmydesktop/src/rmd_rectinsert.c 2008-09-16 18:46:38 UTC (rev 552) @@ -56,7 +56,7 @@ */ static int CollideRects(WGeometry *wgeom1, WGeometry *wgeom2, - WGeometry **wgeom_return, + WGeometry wgeom_return[], int *ngeoms) { //1 fits in 2 if((wgeom1->x>=wgeom2->x)&& @@ -118,89 +118,88 @@ //group if((enclosed[1][0]&&enclosed[1][1])&& (wgeom1->width==wgeom2->width)){ - wgeom_return[0]=(WGeometry *)malloc(sizeof(WGeometry)); *ngeoms=1; - wgeom_return[0]->x=wgeom1->x; - wgeom_return[0]->y=wgeom1->y; - wgeom_return[0]->width=wgeom1->width; - wgeom_return[0]->height=wgeom2->height+wgeom2->y-wgeom1->y; + wgeom_return[0].x = wgeom1->x; + wgeom_return[0].y = wgeom1->y; + wgeom_return[0].width = wgeom1->width; + wgeom_return[0].height = wgeom2->height + wgeom2->y - wgeom1->y; return -10; } else if((enclosed[1][0]&&enclosed[1][2])&& (wgeom1->height==wgeom2->height)){ *ngeoms=1; - wgeom_return[0]->x=wgeom1->x; - wgeom_return[0]->y=wgeom1->y; - wgeom_return[0]->width=wgeom2->width+wgeom2->x-wgeom1->x; - wgeom_return[0]->height=wgeom1->height; + wgeom_return[0].x = wgeom1->x; + wgeom_return[0].y = wgeom1->y; + wgeom_return[0].width = wgeom2->width + wgeom2->x - wgeom1->x; + wgeom_return[0].height = wgeom1->height; return -10; } else if((enclosed[1][3]&&enclosed[1][1])&& (wgeom1->height==wgeom2->height)){ *ngeoms=1; - wgeom_return[0]->x=wgeom2->x; - wgeom_return[0]->y=wgeom2->y; - wgeom_return[0]->width=wgeom1->width+wgeom1->x-wgeom2->x; - wgeom_return[0]->height=wgeom2->height; + wgeom_return[0].x = wgeom2->x; + wgeom_return[0].y = wgeom2->y; + wgeom_return[0].width = wgeom1->width + wgeom1->x - wgeom2->x; + wgeom_return[0].height = wgeom2->height; return -10; } else if((enclosed[1][3]&&enclosed[1][2])&& (wgeom1->width==wgeom2->width)){ *ngeoms=1; - wgeom_return[0]->x=wgeom2->x; - wgeom_return[0]->y=wgeom2->y; - wgeom_return[0]->width=wgeom2->width; - wgeom_return[0]->height=wgeom1->height+wgeom1->y-wgeom2->y; + wgeom_return[0].x = wgeom2->x; + wgeom_return[0].y = wgeom2->y; + wgeom_return[0].width = wgeom2->width; + wgeom_return[0].height = wgeom1->height + wgeom1->y - wgeom2->y; return -10; } //if control reaches here therewasn't a group and we go on } if(tot2==2){ //break geom2 - wgeom_return[0]->x=wgeom2->x; - wgeom_return[0]->y=wgeom2->y; - wgeom_return[0]->width=wgeom2->width; - wgeom_return[0]->height=wgeom2->height; + wgeom_return[0].x = wgeom2->x; + wgeom_return[0].y = wgeom2->y; + wgeom_return[0].width = wgeom2->width; + wgeom_return[0].height = wgeom2->height; *ngeoms=1; if(enclosed[1][0]&&enclosed[1][1]){ - wgeom_return[0]->y=y1[1]; - wgeom_return[0]->height-=y1[1]-y2[0]; + wgeom_return[0].y = y1[1]; + wgeom_return[0].height -= y1[1] - y2[0]; } else if(enclosed[1][0]&&enclosed[1][2]){ - wgeom_return[0]->x=x1[1]; - wgeom_return[0]->width-=x1[1]-x2[0]; + wgeom_return[0].x = x1[1]; + wgeom_return[0].width -= x1[1] - x2[0]; } else if(enclosed[1][3]&&enclosed[1][1]) - wgeom_return[0]->width-=x2[1]-x1[0]; + wgeom_return[0].width -= x2[1] - x1[0]; else if(enclosed[1][3]&&enclosed[1][2]) - wgeom_return[0]->height-=y2[1]-y1[0]; + wgeom_return[0].height -= y2[1] - y1[0]; return -2; } else if(tot1==2){ //if the first one breaks(which is already inserted) //then we reenter the part that was left and the one //that was to be inserted - wgeom_return[1]->x=wgeom2->x; - wgeom_return[1]->y=wgeom2->y; - wgeom_return[1]->width=wgeom2->width; - wgeom_return[1]->height=wgeom2->height; - wgeom_return[0]->x=wgeom1->x; - wgeom_return[0]->y=wgeom1->y; - wgeom_return[0]->width=wgeom1->width; - wgeom_return[0]->height=wgeom1->height; + wgeom_return[1].x = wgeom2->x; + wgeom_return[1].y = wgeom2->y; + wgeom_return[1].width = wgeom2->width; + wgeom_return[1].height = wgeom2->height; + wgeom_return[0].x = wgeom1->x; + wgeom_return[0].y = wgeom1->y; + wgeom_return[0].width = wgeom1->width; + wgeom_return[0].height = wgeom1->height; *ngeoms=1; if(enclosed[0][0]&&enclosed[0][1]){ - wgeom_return[0]->y=y2[1]; - wgeom_return[0]->height-=y2[1]-y1[0]; + wgeom_return[0].y = y2[1]; + wgeom_return[0].height -= y2[1] - y1[0]; } else if(enclosed[0][0]&&enclosed[0][2]){ - wgeom_return[0]->x=x2[1]; - wgeom_return[0]->width-=x2[1]-x1[0]; + wgeom_return[0].x = x2[1]; + wgeom_return[0].width -= x2[1] - x1[0]; } else if(enclosed[0][3]&&enclosed[0][1]) - wgeom_return[0]->width-=x1[1]-x2[0]; + wgeom_return[0].width -= x1[1] - x2[0]; else if(enclosed[0][3]&&enclosed[0][2]) - wgeom_return[0]->height-=y1[1]-y2[0]; + wgeom_return[0].height -= y1[1] - y2[0]; return -1; } @@ -210,51 +209,51 @@ *ngeoms=2; if(enclosed[1][0]){ //first - wgeom_return[0]->x=x1[1]; - wgeom_return[0]->y=y2[0]; - wgeom_return[0]->width=wgeom2->width-x1[1]+x2[0]; - wgeom_return[0]->height=wgeom2->height; + wgeom_return[0].x = x1[1]; + wgeom_return[0].y = y2[0]; + wgeom_return[0].width = wgeom2->width - x1[1] + x2[0]; + wgeom_return[0].height = wgeom2->height; //second - wgeom_return[1]->x=x2[0]; - wgeom_return[1]->y=y1[1]; - wgeom_return[1]->width=x1[1]-x2[0]; - wgeom_return[1]->height=wgeom2->height-y1[1]+y2[0]; + wgeom_return[1].x = x2[0]; + wgeom_return[1].y = y1[1]; + wgeom_return[1].width = x1[1] - x2[0]; + wgeom_return[1].height = wgeom2->height - y1[1] + y2[0]; } else if(enclosed[1][1]){ //first - wgeom_return[0]->x=x2[0]; - wgeom_return[0]->y=y2[0]; - wgeom_return[0]->width=wgeom2->width-x2[1]+x1[0]; - wgeom_return[0]->height=wgeom2->height; + wgeom_return[0].x = x2[0]; + wgeom_return[0].y = y2[0]; + wgeom_return[0].width = wgeom2->width - x2[1] + x1[0]; + wgeom_return[0].height = wgeom2->height; //second - wgeom_return[1]->x=x1[0]; - wgeom_return[1]->y=y1[1]; - wgeom_return[1]->width=x2[1]-x1[0]; - wgeom_return[1]->height=wgeom2->height-y1[1]+y2[0]; + wgeom_return[1].x = x1[0]; + wgeom_return[1].y = y1[1]; + wgeom_return[1].width = x2[1] - x1[0]; + wgeom_return[1].height = wgeom2->height - y1[1] + y2[0]; } else if(enclosed[1][2]){ //first(same as [1][0]) - wgeom_return[0]->x=x1[1]; - wgeom_return[0]->y=y2[0]; - wgeom_return[0]->width=wgeom2->width-x1[1]+x2[0]; - wgeom_return[0]->height=wgeom2->height; + wgeom_return[0].x = x1[1]; + wgeom_return[0].y = y2[0]; + wgeom_return[0].width = wgeom2->width - x1[1] + x2[0]; + wgeom_return[0].height = wgeom2->height; //second - wgeom_return[1]->x=x2[0]; - wgeom_return[1]->y=y2[0]; - wgeom_return[1]->width=x1[1]-x2[0]; - wgeom_return[1]->height=wgeom2->height-y2[1]+y1[0]; + wgeom_return[1].x = x2[0]; + wgeom_return[1].y = y2[0]; + wgeom_return[1].width = x1[1] - x2[0]; + wgeom_return[1].height = wgeom2->height - y2[1] + y1[0]; } else if(enclosed[1][3]){ //first(same as [1][1]) - wgeom_return[0]->x=x2[0]; - wgeom_return[0]->y=y2[0]; - wgeom_return[0]->width=wgeom2->width-x2[1]+x1[0]; - wgeom_return[0]->height=wgeom2->height; + wgeom_return[0].x = x2[0]; + wgeom_return[0].y = y2[0]; + wgeom_return[0].width = wgeom2->width - x2[1] + x1[0]; + wgeom_return[0].height = wgeom2->height; //second - wgeom_return[1]->x=x1[0]; - wgeom_return[1]->y=y2[0]; - wgeom_return[1]->width=x2[1]-x1[0]; - wgeom_return[1]->height=wgeom2->height-y2[1]+y1[0]; + wgeom_return[1].x = x1[0]; + wgeom_return[1].y = y2[0]; + wgeom_return[1].width = x2[1] - x1[0]; + wgeom_return[1].height = wgeom2->height - y2[1] + y1[0]; } return -2; } @@ -269,23 +268,23 @@ *ngeoms=2; if(wgeom2->y<wgeom1->y){ //common - wgeom_return[0]->x=wgeom_return[1]->x=x2[0]; - wgeom_return[0]->width=wgeom_return[1]->width=wgeom2->width; + wgeom_return[0].x = wgeom_return[1].x = x2[0]; + wgeom_return[0].width = wgeom_return[1].width = wgeom2->width; - wgeom_return[0]->y=y2[0]; - wgeom_return[0]->height=wgeom2->height-y2[1]+y1[0]; - wgeom_return[1]->y=y1[1]; - wgeom_return[1]->height=y2[1]-y1[1]; + wgeom_return[0].y = y2[0]; + wgeom_return[0].height = wgeom2->height - y2[1] + y1[0]; + wgeom_return[1].y = y1[1]; + wgeom_return[1].height = y2[1] - y1[1]; } else{ //common - wgeom_return[0]->y=wgeom_return[1]->y=y2[0]; - wgeom_return[0]->height=wgeom_return[1]->height=wgeom2->height; + wgeom_return[0].y = wgeom_return[1].y = y2[0]; + wgeom_return[0].height = wgeom_return[1].height = wgeom2->height; - wgeom_return[0]->x=x2[0]; - wgeom_return[0]->width=wgeom2->width-x2[1]+x1[0]; - wgeom_return[1]->x=x1[1]; - wgeom_return[1]->width=x2[1]-x1[1]; + wgeom_return[0].x = x2[0]; + wgeom_return[0].width = wgeom2->width - x2[1] + x1[0]; + wgeom_return[1].x = x1[1]; + wgeom_return[1].width = x2[1] - x1[1]; } return -2; } @@ -316,27 +315,25 @@ total_insertions=1; } else{ - WGeometry *wgeom_return[2]; - wgeom_return[0]=(WGeometry *)malloc(sizeof(WGeometry)); - wgeom_return[1]=(WGeometry *)malloc(sizeof(WGeometry)); + WGeometry wgeom_return[2]; int ngeoms=0,insert_ok=1,i=0; temp=*root; while(insert_ok){ //if something is broken list does not procceed //(except on -1 collres case) - int collres=CollideRects(&(temp->geom),wgeom,wgeom_return,&ngeoms); + int collres = CollideRects(&temp->geom, wgeom, &wgeom_return[0], &ngeoms); if((!collres)) insert_ok=1; else{ for(i=0;i<ngeoms;i++){ - wgeom_return[i]->width+=(wgeom_return[i]->width%2)| - (wgeom_return[i]->x%2); - wgeom_return[i]->height+=(wgeom_return[i]->height%2)| - (wgeom_return[i]->y%2); - wgeom_return[i]->width+=(wgeom_return[i]->width%2); - wgeom_return[i]->height+=(wgeom_return[i]->height%2); - wgeom_return[i]->x-=wgeom_return[i]->x%2; - wgeom_return[i]->y-=wgeom_return[i]->y%2; + wgeom_return[i].width += (wgeom_return[i].width % 2) | + (wgeom_return[i].x % 2); + wgeom_return[i].height += (wgeom_return[i].height % 2) | + (wgeom_return[i].y % 2); + wgeom_return[i].width += (wgeom_return[i].width % 2); + wgeom_return[i].height += (wgeom_return[i].height % 2); + wgeom_return[i].x -= wgeom_return[i].x % 2; + wgeom_return[i].y -= wgeom_return[i].y % 2; } insert_ok=0; switch(collres){ @@ -382,12 +379,12 @@ case -1://current node is broken and reinserted //(in same pos) //newnode is also reinserted - if((wgeom_return[0]->width>0)&& - (wgeom_return[0]->height>0)){ - temp->geom.x=wgeom_return[0]->x; - temp->geom.y=wgeom_return[0]->y; - temp->geom.width=wgeom_return[0]->width; - temp->geom.height=wgeom_return[0]->height; + if (wgeom_return[0].width > 0 && + wgeom_return[0].height > 0) { + temp->geom.x = wgeom_return[0].x; + temp->geom.y = wgeom_return[0].y; + temp->geom.width = wgeom_return[0].width; + temp->geom.height = wgeom_return[0].height; if(temp->next==NULL){ temp->next=newnode; newnode->prev=temp; @@ -423,20 +420,20 @@ case -2://new is broken and reinserted if(temp->next==NULL){ total_insertions+=ngeoms; - newnode->geom.x=wgeom_return[0]->x; - newnode->geom.y=wgeom_return[0]->y; - newnode->geom.width=wgeom_return[0]->width; - newnode->geom.height=wgeom_return[0]->height; + newnode->geom.x = wgeom_return[0].x; + newnode->geom.y = wgeom_return[0].y; + newnode->geom.width = wgeom_return[0].width; + newnode->geom.height = wgeom_return[0].height; temp->next=newnode; newnode->prev=temp; if(ngeoms>1){ RectArea *newnode1= (RectArea *)malloc(sizeof(RectArea)); - newnode1->geom.x=wgeom_return[1]->x; - newnode1->geom.y=wgeom_return[1]->y; - newnode1->geom.width=wgeom_return[1]->width; - newnode1->geom.height=wgeom_return[1]->height; + newnode1->geom.x = wgeom_return[1].x; + newnode1->geom.y = wgeom_return[1].y; + newnode1->geom.width = wgeom_return[1].width; + newnode1->geom.height = wgeom_return[1].height; newnode->next=newnode1; newnode1->prev=newnode; newnode1->next=NULL; @@ -444,21 +441,20 @@ } else{ for(i=0;i<ngeoms;i++){ - if((wgeom_return[i]->width>0)&& - (wgeom_return[i]->height>0)) + if(wgeom_return[i].width > 0 && + wgeom_return[i].height > 0) total_insertions+= - RectInsert(&temp->next,wgeom_return[i]); + RectInsert(&temp->next, &wgeom_return[i]); } } break; case -10://grouped if(temp->prev==NULL){ if(temp->next==NULL){//empty list - newnode->geom.x=wgeom_return[0]->x; - newnode->geom.y=wgeom_return[0]->y; - newnode->geom.width=wgeom_return[0]->width; - newnode->geom.height= - wgeom_return[0]->height; + newnode->geom.x = wgeom_return[0].x; + newnode->geom.y = wgeom_return[0].y; + newnode->geom.width = wgeom_return[0].width; + newnode->geom.height = wgeom_return[0].height; *root=newnode; free(temp); @@ -468,17 +464,17 @@ *root=temp->next; (*root)->prev=NULL; free(temp); - if((wgeom_return[0]->width>0)&& - (wgeom_return[0]->height>0)) + if(wgeom_return[0].width > 0 && + wgeom_return[0].height > 0) total_insertions+= - RectInsert(root,wgeom_return[0]); + RectInsert(root, &wgeom_return[0]); } } else if(temp->next==NULL){//last, enter anyway - newnode->geom.x=wgeom_return[0]->x; - newnode->geom.y=wgeom_return[0]->y; - newnode->geom.width=wgeom_return[0]->width; - newnode->geom.height=wgeom_return[0]->height; + newnode->geom.x = wgeom_return[0].x; + newnode->geom.y = wgeom_return[0].y; + newnode->geom.width = wgeom_return[0].width; + newnode->geom.height = wgeom_return[0].height; temp->prev->next=newnode; newnode->prev=temp->prev; free(temp); @@ -489,10 +485,10 @@ temp->prev->next=temp->next; temp->next->prev=temp->prev; free(temp); - if((wgeom_return[0]->width>0)&& - (wgeom_return[0]->height>0)) + if(wgeom_return[0].width > 0 && + wgeom_return[0].height > 0) total_insertions+= - RectInsert(&temp1,wgeom_return[0]); + RectInsert(&temp1, &wgeom_return[0]); } break; } @@ -512,9 +508,6 @@ break; } }; - - free(wgeom_return[0]); - free(wgeom_return[1]); } return total_insertions; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: svn c. f. r. <rec...@li...> - 2008-09-16 10:04:13
|
Revision: 551 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=551&view=rev Author: iovar Date: 2008-09-16 17:04:11 +0000 (Tue, 16 Sep 2008) Log Message: ----------- src/rmd_yuv_utils.c : Applied patch by Luca Bonavita, that corrects the rgb to yuv algorithm and provides near perfect colorspace conversion. src/rmd_get_frame.c : The sum of the chroma subcomponents, in the XFIXES_POINTER_TO_YUV macro, must wrap around the unsigned char type range, for the calculation to be correct. So, we take its modulo to that range. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_get_frame.c trunk/recordmydesktop/src/rmd_yuv_utils.c Modified: trunk/recordmydesktop/src/rmd_get_frame.c =================================================================== --- trunk/recordmydesktop/src/rmd_get_frame.c 2008-09-16 06:51:44 UTC (rev 550) +++ trunk/recordmydesktop/src/rmd_get_frame.c 2008-09-16 17:04:11 UTC (rev 551) @@ -106,9 +106,10 @@ yuv->y[x_tm+(i-x_offset)+(k+y_tm-y_offset)*yuv->y_width]=\ (yuv->y[x_tm+(i-x_offset)+(k-y_offset+y_tm)*yuv->y_width]*\ (UCHAR_MAX-data[(j*RMD_ULONG_SIZE_T)+__ABYTE])+\ - (Yr[data[(j*RMD_ULONG_SIZE_T)+__RBYTE]]+\ - Yg[data[(j*RMD_ULONG_SIZE_T)+__GBYTE]] +\ - Yb[data[(j*RMD_ULONG_SIZE_T)+__BBYTE]])*\ + ( ( Yr[data[(j*RMD_ULONG_SIZE_T)+__RBYTE]]+\ + Yg[data[(j*RMD_ULONG_SIZE_T)+__GBYTE]] +\ + Yb[data[(j*RMD_ULONG_SIZE_T)+__BBYTE]] ) % \ + ( UCHAR_MAX + 1 ) ) * \ data[(j*RMD_ULONG_SIZE_T)+__ABYTE])/UCHAR_MAX ;\ if((k%2)&&(i%2)){\ avg3=AVG_4_PIXELS(data,\ @@ -128,13 +129,17 @@ (yuv->u[x_2+(i-x_offset)/2+((k-y_offset)/2+y_2)*\ yuv->uv_width]*\ (UCHAR_MAX-avg3)+\ - (Ur[avg2] + Ug[avg1] +UbVr[avg0])*avg3)/UCHAR_MAX;\ + ( (Ur[avg2] + Ug[avg1] + UbVr[avg0]) % \ + ( UCHAR_MAX + 1 ) ) * avg3 ) / \ + UCHAR_MAX;\ yuv->v[x_2+(i-x_offset)/2+((k-y_offset)/2+y_2)*\ yuv->uv_width]=\ (yuv->v[x_2+(i-x_offset)/2+((k-y_offset)/2+y_2)*\ yuv->uv_width]*\ (UCHAR_MAX-avg3)+\ - (UbVr[avg2] + Vg[avg1] +Vb[avg0])*avg3)/UCHAR_MAX;\ + ( ( UbVr[avg2] + Vg[avg1] + Vb[avg0] ) % \ + ( UCHAR_MAX + 1 ) ) * avg3 ) / \ + UCHAR_MAX; \ }\ }\ }\ Modified: trunk/recordmydesktop/src/rmd_yuv_utils.c =================================================================== --- trunk/recordmydesktop/src/rmd_yuv_utils.c 2008-09-16 06:51:44 UTC (rev 550) +++ trunk/recordmydesktop/src/rmd_yuv_utils.c 2008-09-16 17:04:11 UTC (rev 551) @@ -1,10 +1,10 @@ /****************************************************************************** -* recordMyDesktop * +* recordMyDesktop - rmd_yuv_utils.c * ******************************************************************************* * * * Copyright (C) 2006,2007,2008 John Varouhakis * +* Copyright (C) 2008 Luca Bonavita * * * -* * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -34,24 +34,52 @@ Vg[256], Vb[256]; void MakeMatrices (void) { + int i; + + /* assuming 8-bit precision */ + float Yscale = 219.0, Yoffset = 16.0; + float Cscale = 224.0, Coffset = 128.0; + float RGBscale = 255.0; + + float r, g, b; + float yr, yg, yb; + float ur, ug, ub; + float vg, vb; /* vr intentionally missing */ + + /* as for ITU-R BT-601-6 specifications: */ + r = 0.299; + b = 0.114; + g = 1.0 - r - b; + + /* as a note, here are the coefficients + as for ITU-R BT-709 specifications: + r=0.2126; b=0.0722; g=1.0-r-b; */ + + yr = r * Yscale / RGBscale; + yg = g * Yscale / RGBscale; + yb = b * Yscale / RGBscale; + ur = ( -0.5 * r / ( 1 - b ) ) * Cscale / RGBscale; + ug = ( -0.5 * g / ( 1 - b ) ) * Cscale / RGBscale; + ub = ( 0.5 * Cscale / RGBscale); + /* vr = ub so UbVr = ub*i = vr*i */ + vg = ( -0.5 * g / ( 1 - r ) ) * Cscale / RGBscale; + vb = ( -0.5 * b / ( 1 - r ) ) * Cscale / RGBscale; + + for( i = 0 ; i < 256 ; i++ ) { - for (i = 0; i < 256; i++) - Yr[i] = (2104.0 * i) / 8192.0 + 8.0; - for (i = 0; i < 256; i++) - Yg[i] = (4130.0 * i) / 8192.0 + 8.0; - for (i = 0; i < 256; i++) - Yb[i] = (802.0 * i) / 8192.0; + Yr[i] = (unsigned char) roundf( Yoffset + yr * i ); + Yg[i] = (unsigned char) roundf( yg * i ); + Yb[i] = (unsigned char) roundf( yb * i ); - for (i = 0; i < 256; i++) - Ur[i] = 37.8 - (1204.0 * i) / 8192.0 + 8.0; - for (i = 0; i < 256; i++) - Ug[i] = 74.2 - (2384.0 * i) / 8192.0 + 8.0; - for (i = 0; i < 256; i++) - UbVr[i] = (3598.0 * i) / 8192.0 ; + Ur[i] = (unsigned char) roundf( Coffset + ur * i ); + Ug[i] = (unsigned char) roundf( ug * i ); + UbVr[i] = (unsigned char) roundf( ub * i ); - for (i = 0; i < 256; i++) - Vg[i] = 93.8 - (3013.0 * i) / 8192.0 + 8.0; - for (i = 0; i < 256; i++) - Vb[i] = 18.2 - (585.0 * i) / 8192.0 + 8.0; + Vg[i] = (unsigned char) roundf( vg * i ); + Vb[i] = (unsigned char) roundf( Coffset + vb * i ); + + } + } + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |