Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 55612 Details for
Bug 76127
Gyach enhanced is a Yahoo Messenger linux client
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/pyvoice-gyach_all_1.0.7.patch
pyvoice-gyach_all_1.0.7.patch (text/plain), 26.23 KB, created by
Natanael Copa
on 2005-04-07 16:14:28 UTC
(
hide
)
Description:
files/pyvoice-gyach_all_1.0.7.patch
Filename:
MIME Type:
Creator:
Natanael Copa
Created:
2005-04-07 16:14:28 UTC
Size:
26.23 KB
patch
obsolete
>diff -bruN pyvoice-gyach-1.0.7.orig/gyach/Makefile.am pyvoice-gyach-1.0.7/gyach/Makefile.am >--- pyvoice-gyach-1.0.7.orig/gyach/Makefile.am 2005-04-08 00:09:03.977272030 +0200 >+++ pyvoice-gyach-1.0.7/gyach/Makefile.am 2005-04-08 00:10:51.499838911 +0200 >@@ -2,10 +2,9 @@ > > SUBDIRS = src > >-EXTRA_DIST = gyach.glade sample.gyachrc sample.ignore.list \ >- sample.ignore.regex BUGS depcomp scripts/my-gtk-config \ >- README.FreeBSD README.NetBSD README.MacOSX README.Win32 \ >- src/interface.c.gtk2.patch >+EXTRA_DIST = sample.gyachrc sample.ignore.list sample.ignore.regex \ >+ BUGS depcomp scripts/my-gtk-config \ >+ gyache-help-short.txt PHROZEN_SMOKE_README.txt > > install-data-local: > @$(NORMAL_INSTALL) >diff -bruN pyvoice-gyach-1.0.7.orig/gyach/configure.in pyvoice-gyach-1.0.7/gyach/configure.in >--- pyvoice-gyach-1.0.7.orig/gyach/configure.in 2005-04-08 00:09:04.016266071 +0200 >+++ pyvoice-gyach-1.0.7/gyach/configure.in 2005-04-08 00:10:51.500838758 +0200 >@@ -1,7 +1,11 @@ > dnl Process this file with autoconf to produce a configure script. > >-AC_INIT(configure.in) >-AM_INIT_AUTOMAKE(gyach, 0.9.2) >+dnl Is there actually anyone who understands how this autoconf animal works? >+dnl Feel free to clean it up if you do.... >+ >+AC_INIT >+AC_CONFIG_SRCDIR([configure.in]) >+AM_INIT_AUTOMAKE(gyache, 1.0.7) > AM_CONFIG_HEADER(config.h) > > AC_ISC_POSIX >@@ -9,83 +13,79 @@ > AM_PROG_CC_STDC > AC_HEADER_STDC > >-AC_ARG_ENABLE(gtk_v2, >- [ --disable-gtk_v2 disable gtk v2.0.x support]) >-AC_ARG_ENABLE(gdk-pixbuf, >- [ --disable-gdk-pixbuf disable use of gdk-pixbuf (with gtk v1.x)], >- gdk_pixbuf=$enableval, gdk_pixbuf=yes) >-AC_ARG_ENABLE(pixmaps, >- [ --disable-pixmaps disable remote user status pixmaps]) >+dnl configure libtool. this is for adding the -lltdl linker flag. >+AC_LIBLTDL_INSTALLABLE >+AC_PROG_LIBTOOL >+AC_SUBST(LIBLTDL) >+ >+dnl stolen from gdm (who stole it from gconf..) >+# find the actual value for $prefix that we'll end up with >+REAL_PREFIX= >+if test "x$prefix" = "xNONE"; then >+ REAL_PREFIX=$ac_default_prefix >+else >+ REAL_PREFIX=$prefix >+fi >+old_prefix=$prefix >+prefix=$REAL_PREFIX >+ >+REAL_EXEC_PREFIX= >+if test "x$exec_prefix" = "xNONE"; then >+ REAL_EXEC_PREFIX=$prefix >+else >+ REAL_EXEC_PREFIX=$exec_prefix >+fi >+old_exec_prefix=$exec_prefix >+exec_prefix=$REAL_EXEC_PREFIX >+ >+ >+dnl AC_ARG_ENABLE(gtk_v2, >+dnl [ --disable-gtk_v2 disable gtk v2.0.x support]) >+dnl AC_ARG_ENABLE(gdk-pixbuf, >+dnl [ --disable-gdk-pixbuf disable use of gdk-pixbuf (with gtk v1.x)], >+dnl gdk_pixbuf=$enableval, gdk_pixbuf=yes) >+dnl AC_ARG_ENABLE(pixmaps, >+dnl [ --disable-pixmaps disable remote user status pixmaps]) > AC_ARG_ENABLE(threads, > [ --disable-threads disable use of pthread_create]) > AC_ARG_ENABLE(debug, > [ --enable-debug=LEVEL enable debug messages at specified level]) >-dnl AC_ARG_ENABLE(interface, >-dnl [ --enable-interface=type use "type" widget for main chat text [text/xtext/html]] ) > >+dnl GTK_CFLAGS=`pkg-config --cflags gtk+-2.0 gthread-2.0 libgtkhtml-2.0 2>/dev/null` >+dnl ESD_LIBS=`esd-config --cflags` >+dnl ESD_LIBS=`esd-config --libs` >+ >+AC_SUBST(CFLAGS) >+AC_SUBST(LDFLAGS) >+ >+AC_DEFINE(USE_GTK2,[],[use GTK+ v2.x]) >+GTK_REQUIRED_VERSION=2.0 >+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION) >+AC_SUBST(GTK_CFLAGS) >+AC_SUBST(GTK_LIBS) >+ >+GTHREAD_REQUIRED_VERSION=2.0 >+PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GTHREAD_REQUIRED_VERSION) >+AC_SUBST(GHTREAD_CFLAGS) >+AC_SUBST(GTHREAD_LIBS) >+ >+GTKHTML_REQUIRED_VERSION=2.0 >+PKG_CHECK_MODULES(GTKHTML, libgtkhtml-2.0 >= $GTKHTML_REQUIRED_VERSION) >+AC_SUBST(GTKHTML_CFLAGS) >+AC_SUBST(GTKHTML_LIBS) >+ >+dnl I honsestly dont know what version is requred of esd >+dnl or if it would be better to: >+dnl ESOUND_LIBS=`esd-config --libs` >+dnl AC_SUBST(ESOUND_LIBS) >+ESOUND_REQUIRED_VERSION=0.2 >+PKG_CHECK_MODULES(ESOUND, esound >= $ESOUND_REQUIRED_VERSION) >+AC_SUBST(ESOUND_CFLAGS) >+AC_SUBST(ESOUND_LIBS) > >-if test "x$enable_gtk_v2" != "xno"; then >- printf "checking for GTK - version >= 2.0.0... " >- GTK_CFLAGS=`pkg-config --cflags gtk+-2.0 gthread-2.0 2> /dev/null` >-else >- GTK_CFLAGS="" >-fi > >-if test "x${GTK_CFLAGS}" != "x"; then >- if test "x$enable_gtk_v2" != "xno"; then >- echo yes >- fi >- if test "$enable_threads" != "no"; then >- GTK_LIBS=`pkg-config --libs gtk+-2.0 gthread-2.0 2> /dev/null` >- else >- GTK_LIBS=`pkg-config --libs gtk+-2.0 2> /dev/null` >- fi >- CFLAGS="${CFLAGS} ${GTK_CFLAGS}" >- LIBS="${LIBS} ${GTK_LIBS}" >- AC_DEFINE(USE_GTK2) >-else >- if test "x$enable_gtk_v2" != "xno"; then >- echo no >- fi >- AM_PATH_GTK(1.2.0, , >- AC_MSG_WARN(Cannot find GTK: Is gtk-config in path?), >- gthread) >-dnl AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?), gthread) >- >- if test "x${GTK_CFLAGS}" = 'x'; then >- echo "*** gtk-config not found, running scripts/my-gtk-config" >- CFLAGS="${CFLAGS} `scripts/my-gtk-config --cflags`" >- echo "*** CFLAGS now '${CFLAGS}'" >- LIBS="${LIBS} `scripts/my-gtk-config --libs`" >- echo "*** LIBS now '${LIBS}'" >- fi >- >- if test "$gdk_pixbuf" = yes; then >- AC_PATH_PROG(gdkpixbufpath, gdk-pixbuf-config) >- AC_MSG_CHECKING(for gdk-pixbuf >= 0.8) >- GDK_PIXBUF_CFLAGS=`$gdkpixbufpath --cflags 2>/dev/null` >- GDK_PIXBUF_LIBS=`$gdkpixbufpath --libs 2>/dev/null` >- if test "_$GDK_PIXBUF_CFLAGS" = _; then >- AC_MSG_RESULT([not found, will attempt to use 'convert' for images]) >- else >- vers=`$gdkpixbufpath --version` >- case $vers >- in >- gdk-pixbuf-0.[[01234567]]) gdk_pixbuf_ok=false ;; >- *) gdk_pixbuf_ok=true ;; >- esac >- if $gdk_pixbuf_ok; then >- AC_MSG_RESULT(found) >- gdk_pixbuf=yes >- AC_DEFINE(USE_GDK_PIXBUF) >- LIBS="${LIBS} $GDK_PIXBUF_LIBS" >- CFLAGS="${CFLAGS} $GDK_PIXBUF_CFLAGS" >- else >- gdk_pixbuf=no >- AC_MSG_RESULT([version too old, building without gdk-pixbuf]) >- fi >- fi >- fi >+if test "$enable_threads" != "no"; then >+ GTK_LIBS=`pkg-config --libs gtk+-2.0 gthread-2.0 libgtkhtml-2.0 2>/dev/null` > fi > > ac_system=`uname -s | cut -c1-6` >@@ -93,38 +93,67 @@ > CFLAGS="${CFLAGS} -fnative-struct" > fi > >- >+dnl Not needed really? > AC_CHECK_LIB( c_r, pthread_create, LIBS="$LIBS -lc_r", ) > >+dnl check for jasper here >+AC_CHECK_LIB(jasper, jas_init, [JASPER_LIBS="-ljasper"], [ >+ AC_MSG_ERROR(cannot find jasper library)]) >+AC_SUBST(JASPER_LIBS) >+ >+# check for libccvt >+# libccvt is a part of the camserv project but is not automatically >+# installed. You will need to manually copy libccvt.a to /usr/lib and >+# ccvt.h to /usr/include or something similar. >+AC_CHECK_HEADER(ccvt.h) >+AC_CHECK_LIB(ccvt, ccvt_420p_rgb24) >+ > dnl Set PACKAGE_DATA_DIR in config.h. >-if test "x${datadir}" = 'x${prefix}/share'; then >- if test "x${prefix}" = "xNONE"; then >- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}") >- else >- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}") >- fi >-else >- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}") >-fi >+dnl if test "x${datadir}" = 'x${prefix}/share'; then >+dnl if test "x${prefix}" = "xNONE"; then >+dnl AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", []) >+dnl else >+dnl AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", []) >+dnl fi >+dnl else >+dnl AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", []) >+dnl fi >+ >+dnl set EXPANDED_DATADIR in config.h >+DATADIR_TMP="$datadir" >+EXPANDED_DATADIR=`eval echo $DATADIR_TMP` >+AC_SUBST(EXPANDED_DATADIR) >+AC_DEFINE_UNQUOTED([EXPANDED_DATADIR],"$EXPANDED_DATADIR", [Default data dir]) >+ >+dnl set EXPANDED_LIBEXECDIR in config.h >+LIBEXECDIR_TMP="$libexecdir" >+EXPANDED_LIBEXECDIR=`eval echo $LIBEXECDIR_TMP` >+AC_SUBST(EXPANDED_LIBEXECDIR) >+AC_DEFINE_UNQUOTED([EXPANDED_LIBEXECDIR],"$EXPANDED_LIBEXECDIR", [Location for the webcam binaries]) >+ >+PACKAGE_DATA_DIR_TMP="$datadir/${PACKAGE}" >+PACKAGE_DATA_DIR=`eval echo $PACKAGE_DATA_DIR_TMP` >+AC_SUBST(PACKAGE_DATA_DIR) >+AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"$PACKAGE_DATA_DIR", [Location for package data]) > > dnl Set PACKAGE_SOURCE_DIR in config.h. > packagesrcdir=`cd $srcdir && pwd` >-AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") >+AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Location for sources]) > > if test "$enable_pixmaps" != "no"; then >- AC_DEFINE(SHOW_STATUS_PIXMAPS) >+ AC_DEFINE(SHOW_STATUS_PIXMAPS, [], [Enable status pixmaps]) > else > echo "*** status pixmaps disabled" > fi > > if test "$enable_threads" != "no"; then >- AC_DEFINE(USE_PTHREAD_CREATE) >+ AC_DEFINE(USE_PTHREAD_CREATE, [], [Enable pthread_create]) > else > echo "*** pthread_create disabled" > fi > > if test "x$enable_debug" != "x"; then >- AC_DEFINE_UNQUOTED(DBG_LEVEL, $enable_debug ) >+ AC_DEFINE_UNQUOTED(DBG_LEVEL, $enable_debug, [Set debug level] ) > echo "*** DBG_LEVEL set to ${enable_debug}" > else > AC_DEFINE(DBG_LEVEL, 0 ) >@@ -132,14 +161,17 @@ > > if test "x$enable_interface" != "x"; then > if test "x$enable_interface" = "xxtext"; then >- AC_DEFINE(GYACH_INT_XTEXT) >+ AC_DEFINE(GYACH_INT_XTEXT, [], >+ [text interface set to gtk_xtext widget]) > echo "*** gyach text interface set to gtk_xtext widget" > else > if test "x$enable_interface" = "xhtml"; then >- AC_DEFINE(GYACH_INT_HTML) >+ AC_DEFINE(GYACH_INT_HTML, [], >+ [text interface set to gtk_html widget]) > echo "*** gyach text interface set to gtk_html widget" > else >- AC_DEFINE(GYACH_INT_TEXT) >+ AC_DEFINE(GYACH_INT_TEXT, [], >+ [text interface set to gtk_text widget]) > echo "*** gyach text interface set to gtk_text widget" > fi > fi >@@ -158,8 +190,13 @@ > fi > changequote([,])dnl > >-AC_OUTPUT([ >+prefix=$old_prefix >+exec_prefix=$old_exec_prefix >+ >+AC_CONFIG_FILES([ > Makefile > src/Makefile >+src/webcam/Makefile > ]) >+AC_OUTPUT > >diff -bruN pyvoice-gyach-1.0.7.orig/gyach/src/Makefile.am pyvoice-gyach-1.0.7/gyach/src/Makefile.am >--- pyvoice-gyach-1.0.7.orig/gyach/src/Makefile.am 2005-04-08 00:09:03.958274934 +0200 >+++ pyvoice-gyach-1.0.7/gyach/src/Makefile.am 2005-04-08 00:10:51.619820573 +0200 >@@ -1,11 +1,16 @@ > ## Process this file with automake to produce Makefile.in > >+SUBDIRS = webcam >+ > INCLUDES = \ >- @GTK_CFLAGS@ >+ @GTHREAD_CFLAGS@ \ >+ @GTKHTML_CFLAGS@ \ >+ @ESOUND_CFLAGS@ \ >+ -DLOCALEDIR=\"$(localedir)\" > >-bin_PROGRAMS = gyach >+bin_PROGRAMS = gyache > >-gyach_SOURCES = \ >+gyache_SOURCES = \ > aliases.c aliases.h \ > callbacks.c callbacks.h \ > commands.c commands.h \ >@@ -23,8 +28,34 @@ > roomlist.c roomlist.h \ > users.c users.h \ > util.c util.h \ >- yahoochat.c yahoochat.h >- >+ bootprevent.c bootprevent.h \ >+ yahoochat.c yahoochat.h \ >+ ycht.c ycht.h \ >+ profname.c profname.h \ >+ packet_handler.c packet_handler.h \ >+ animations.c animations.h \ >+ conference.c conference.h \ >+ sounds.c sounds.h \ >+ fonts.c fonts.h \ >+ plugin_api.h \ >+ plugins.c plugins.h \ >+ prflang.c prflang.h \ >+ voice_chat.c \ >+ gytreeview.c gytreeview.h \ >+ webconnect.c webconnect.h \ >+ spamcheck.c \ >+ pmwindow.c \ >+ setupwindow2.c \ >+ fader.c \ >+ htmlrender.c \ >+ tuxvironments.c \ >+ yab.c \ >+ webcam.c webcam.h \ >+ trayicon.c trayicon.h \ >+ yahoo_sha.c yahoo_authenticate.h \ >+ sha.c sha.h \ >+ yahoo_fn.c yahoo_fn.h \ >+ roomui.c > >-gyach_LDADD = @GTK_LIBS@ >+gyache_LDADD = @GTHREAD_LIBS@ @GTKHTML_LIBS@ @ESOUND_LIBS@ @LIBLTDL@ > >diff -bruN pyvoice-gyach-1.0.7.orig/gyach/src/webcam/Makefile.am pyvoice-gyach-1.0.7/gyach/src/webcam/Makefile.am >--- pyvoice-gyach-1.0.7.orig/gyach/src/webcam/Makefile.am 1970-01-01 01:00:00.000000000 +0100 >+++ pyvoice-gyach-1.0.7/gyach/src/webcam/Makefile.am 2005-04-08 00:10:51.631818740 +0200 >@@ -0,0 +1,14 @@ >+libexec_PROGRAMS = gyache-webcam gyache-upload >+libexec_SCRIPTS = pywebcam.py >+ >+gyache_webcam_SOURCES = main.c gyachewebcam.c gyacheupload.h gyachewebcam.h >+gyache_upload_SOURCES = gyacheupload-main.c gyacheupload-v4l.c gyacheupload-ui.c ../gytreeview.c ../gytreeview.h gyachewebcam.h >+ >+gyache_webcam_LDADD = @GTK_LIBS@ @JASPER_LIBS@ >+gyache_upload_LDADD = @GTK_LIBS@ @JASPER_LIBS@ >+ >+EXTRA_SCRIPTS = pywebcam.py >+EXTRA_DIST = pywebcam.py >+ >+INCLUDES = $(DEPS_CFLAGS) -DLOCALEDIR=\"$(localedir)\" @GTKHTML_CFLAGS@ -I../ >+#LIBS = $(DEPS_LIBS) >diff -bruN pyvoice-gyach-1.0.7.orig/gyach/src/webcam/gyacheupload-ui.c pyvoice-gyach-1.0.7/gyach/src/webcam/gyacheupload-ui.c >--- pyvoice-gyach-1.0.7.orig/gyach/src/webcam/gyacheupload-ui.c 2005-04-08 00:09:03.974272489 +0200 >+++ pyvoice-gyach-1.0.7/gyach/src/webcam/gyacheupload-ui.c 2005-04-08 00:10:51.625819656 +0200 >@@ -48,7 +48,7 @@ > */ > > # include "gyacheupload.h" >-#include "gytreeview.h" >+#include "../gytreeview.h" > # include <jasper/jasper.h> > > #define yahoo_put32(buf, data) ( \ >diff -bruN pyvoice-gyach-1.0.7.orig/gyach/src/webcam/gyacheupload-v4l.c pyvoice-gyach-1.0.7/gyach/src/webcam/gyacheupload-v4l.c >--- pyvoice-gyach-1.0.7.orig/gyach/src/webcam/gyacheupload-v4l.c 2005-04-08 00:09:03.974272489 +0200 >+++ pyvoice-gyach-1.0.7/gyach/src/webcam/gyacheupload-v4l.c 2005-04-08 00:12:45.752377222 +0200 >@@ -47,7 +47,11 @@ > and Copyright (C) 1999-2002, Torrey Searle <tsearle@uci.edu> > */ > >-# include "gyacheupload.h" >+#ifdef HAVE_CONFIG_H >+# include "config.h" >+#endif >+ >+#include "gyacheupload.h" > > /* ******************************* */ > /* PATCHES BELOW for webcams with OV519 sensors and >@@ -71,7 +75,7 @@ > /* Uncomment the line below to enable contributed but UNTESTED patch to support > cameras with OV519 chips - includes double-buffering support */ > >- /* #define USE_VIDEO_OV519 1 */ >+#define USE_MULTICAM_SUPPORT 1 > > > /* Uncomment the following definition to enable the use of the >@@ -81,10 +85,13 @@ > * modify the definitions of INCLUDE and gyach_LDADD in the Makefile > * to refer to the ccvt source and built libraries. > */ >-/* #define USE_CCVT 1 */ > >-#ifdef USE_CCVT >-#include "ccvt.h" >+/* NC: should be detected automatically from ./configure */ >+ >+/* #define HAVE_LIBCCVT 1 */ >+ >+#ifdef HAVE_LIBCCVT >+# include "ccvt.h" > #endif > > int exit_on_error=0; >@@ -95,7 +102,7 @@ > struct video_capability grab_cap; > struct video_mmap grab_buf; > >-#ifdef USE_VIDEO_OV519 >+#ifdef USE_MULTICAM_SUPPORT > static struct video_mbuf mbuf; > #endif > >@@ -105,19 +112,19 @@ > int pnm_size; > unsigned char *rgb_buf; > >+static char webcamrc_path[256]; > extern int app_debugger; > >-/* Hard-coding my own favorite cam settings into here... >- everybody else can update theirs from the config window */ >- > int fix_color=0; >+int skip_rgb24 = 0; > >- >-#ifdef USE_VIDEO_OV519 >+/* #ifdef USE_MULTICAM_SUPPORT > int hue=32767, contrast=32767, brightness=32767, colour=32767; >-#else >+#else */ > int hue=47104, contrast=65280, brightness=65280, colour=17152; >-#endif >+/* #endif */ >+ >+#define dir_exists(x) (access((x), R_OK) == 0) > > unsigned char* grab_one(int *, int *); > int grab_init(); >@@ -183,13 +190,7 @@ > return; > } > >- >-#ifdef USE_VIDEO_OV519 > current_pixbuf=gdk_pixbuf_new_from_data(grabit,GDK_COLORSPACE_RGB,FALSE,8,x,y,x*grab_pic.depth/8,NULL,NULL); >-#else >- current_pixbuf=gdk_pixbuf_new_from_data(grabit,GDK_COLORSPACE_RGB,FALSE,8,320,240,320*grab_pic.depth/8,NULL,NULL); >-#endif >- > > gtk_image_set_from_pixbuf(GTK_IMAGE(current_image), current_pixbuf); > gdk_pixbuf_unref(current_pixbuf); >@@ -242,22 +243,107 @@ > if (brightness > -1) grab_pic.brightness=brightness; > if (colour > -1) grab_pic.colour=colour; > >-#ifdef USE_VIDEO_OV519 >- /* hardcoded... */ >+ /* first we try RGB24 */ > grab_pic.depth = 24; > grab_pic.palette = VIDEO_PALETTE_RGB24; >-#endif >+ if (ioctl(grab_fd, VIDIOCSPICT, &grab_pic) < 0 || skip_rgb24) { >+ /* RGB24 not supported we try YUV420P */ >+ grab_pic.palette = VIDEO_PALETTE_YUV420P; >+ if (ioctl(grab_fd, VIDIOCSPICT, &grab_pic) < 0) { >+ /* try other palettes here... */ >+ } else return; >+ } else return; > >- if (ioctl(grab_fd, VIDIOCSPICT, &grab_pic) == -1) { > show_error_dialog("An error occurred at 'ioctl VIDIOCSPICT'.\nCould not set camera properties."); >- return; >- } > } > > void set_video_device(char *myvdev) { > v_device=strdup(myvdev); > } > >+/* read webcamrc configuration file */ >+void read_webcamrc () { >+ FILE *f; >+ char line[256]; >+ >+ snprintf(webcamrc_path, sizeof(webcamrc_path), >+ "%s/.yahoorc/gyach/webcamrc", getenv("HOME")); >+ >+ if ((f = fopen(webcamrc_path, "r")) == NULL) { >+ /* noconfig available */ >+ return; >+ } >+ while (fgets(line, sizeof(line), f)) { >+ char *p, *key, *value; >+ /* strip comments */ >+ if ((p = strchr(line, '#'))) *p = '\0'; >+ if ( (key = strtok(line, "=")) && (value = strtok(NULL, "\n"))) { >+ if (strcmp(key,"width")==0) >+ x = atoi(value); >+ >+ else if (strcmp(key,"height") == 0) >+ y = atoi(value); >+ >+ else if (strcmp(key, "fix_color") == 0) >+ fix_color = atoi(value); >+ >+ else if (strcmp(key, "hue") == 0) >+ hue = atoi(value); >+ >+ else if (strcmp(key, "contrast") == 0) >+ contrast = atoi(value); >+ >+ else if (strcmp(key, "brightness") == 0) >+ brightness = atoi(value); >+ >+ else if (strcmp(key, "colour") == 0) >+ colour = atoi(value); >+ >+ else if (strcmp(key, "skip_rgb24") == 0) >+ skip_rgb24 = atoi(value); >+ >+ } else { >+ fprintf(stderr, "Problems in %s\n", webcamrc_path); >+ } >+ } >+ fclose(f); >+} >+ >+void write_webcamrc() { >+ FILE *f; >+ >+ /* create ~/.yahoorc/gyach dir if it does not exist (it should) */ >+ snprintf(webcamrc_path, sizeof(webcamrc_path), "%s/.yahoorc", >+ getenv("HOME")); >+ if (!dir_exists(webcamrc_path)) >+ mkdir(webcamrc_path, 0700); >+ >+ snprintf(webcamrc_path, sizeof(webcamrc_path), "%s/.yahoorc/gyach", >+ getenv("HOME")); >+ if (!dir_exists(webcamrc_path)) >+ mkdir(webcamrc_path, 0700); >+ >+ snprintf(webcamrc_path, sizeof(webcamrc_path), >+ "%s/.yahoorc/gyach/webcamrc", getenv("HOME")); >+ >+ if ((f = fopen(webcamrc_path, "w")) == NULL) { >+ fprintf(stderr, "Problems when writing configuration to %s\n", >+ webcamrc_path); >+ return; >+ } >+ fprintf(f, "width=%i\n" >+ "height=%i\n" >+ "fix_color=%i\n" >+ "hue=%i\n" >+ "contrast=%i\n" >+ "brightness=%i\n" >+ "colour=%i\n" >+ "skip_rgb24=%i\n", >+ x, y, fix_color, hue, contrast, brightness, colour, skip_rgb24); >+ fclose(f); >+} >+ >+ > void init_cam () { > signal (SIGINT, _sighandler); > if (!v_device) { >@@ -268,12 +354,13 @@ > show_error_dialog("No Video4Linux device was specified."); > return; > } >+ read_webcamrc(); > grab_init(); > set_picture(); > } > > >-#ifdef USE_VIDEO_OV519 >+#ifdef USE_MULTICAM_SUPPORT > int grab_init() { > if ((grab_fd = open(v_device,O_RDWR)) == -1 ) { > show_error_dialog("Could not open Video4Linux device.\nThe device may already be in use."); >@@ -283,33 +370,21 @@ > show_error_dialog("An error occurred at 'ioctl VIDIOCGCAP'.\nWrong device."); > return 0; > } >+ if (!(grab_cap.type & VID_TYPE_CAPTURE)) { >+ show_error_dialog("Fatal: grab device does not handle capture\n"); >+ return 0; >+ } >+ > memset (&grab_pic, 0, sizeof(struct video_picture)); >- snprintf(webcam_description, 3, "%s", ""); >- strncpy(webcam_description, grab_cap.name ,28); >- strcat(webcam_description, " V4L1"); >+ memset(webcam_description, '\0', sizeof(webcam_description)); >+ snprintf(webcam_description, sizeof(webcam_description), "%s %s", >+ grab_cap.name, " V4L1"); >+ > if (ioctl (grab_fd, VIDIOCGPICT, &grab_pic) == -1) { > show_error_dialog("An error occurred at 'ioctl VIDIOCGPICT'."); > return 0; > } > >- >- /* The line below cannot work: we must force use of RGB24 for >- PNM image creation */ >- /* grab_buf.format=grab_pic.palette; */ >- >- /* A V4L device supporting the VIDEO_PALETTE_RGB24 >- ( 24bit RGB) color palette is REQUIRED, Gdk-Pixbuf >- can only handle RGB Color spaces, so no support for >- greyscale palettes or cams using non-standard, weirdo palettes >- at this time */ >- >- grab_buf.format = VIDEO_PALETTE_RGB24; >- grab_buf.frame = 0; >- grab_buf.width = x; >- grab_buf.height = y; >- grab_size = x * y * w; >- set_picture(); >- > if (ioctl (grab_fd, VIDIOCGMBUF, &mbuf) < 0) { > show_error_dialog("An error occurred at 'ioctl VIDIOCGMBUF'."); > return 0; >@@ -322,13 +397,36 @@ > return 0; > } > >+ grab_buf.frame = 0; >+ grab_buf.width = x; >+ grab_buf.height = y; >+ grab_size = x * y * w; >+ set_picture(); >+ > /* grab first frame */ >+ grab_buf.format = VIDEO_PALETTE_RGB24; >+ if (ioctl(grab_fd,VIDIOCMCAPTURE,&grab_buf) <0 || skip_rgb24) { >+ printf("grabbing rgb24 failed\n"); >+ /* some cam's don't support grabbing RBG24. try YUV420P */ >+ grab_buf.format = VIDEO_PALETTE_YUV420P; >+ if (-1 == ioctl(grab_fd,VIDIOCMCAPTURE,&grab_buf)) { >+#ifdef HAVE_LIBCCVT >+ /* try YUV422 before we give up if we have CCVT */ >+ /* grab_buf.format = VIDEO_PALETTE_YUV422; > if (-1 == ioctl(grab_fd,VIDIOCMCAPTURE,&grab_buf)) { > show_error_dialog("An error occurred at 'ioctl VIDIOCMCAPTURE'."); > return 0; > } >- if (mbuf.frames > 1) grab_buf.frame = 1 - grab_buf.frame; >- >+ */ >+#else >+ show_error_dialog("An error occurred at 'ioctl VIDIOCMCAPTURE'."); >+ return 0; >+#endif >+ } >+ } >+ grab_buf.frame +=1; >+ if (grab_buf.frame >= mbuf.frames) grab_buf.frame = 0; >+ init_pnm_buf(); > return(1); > } > >@@ -384,9 +482,10 @@ > brightness=tbrightness; > fix_color=tfc; > set_picture(); >+ write_webcamrc(); > } > >-#ifndef USE_CCVT >+#ifndef HAVE_LIBCCVT > > /* The following conversion routines were taken from drivers/usb/ov511.c > * in the Mandrake Linux 2.4.21 kernel. >@@ -495,13 +594,14 @@ > } > } > >-#endif /* !USE_CCVT */ >+#endif /* !HAVE_LIBCCVT */ > > > >-#ifdef USE_VIDEO_OV519 >+#ifdef USE_MULTICAM_SUPPORT > > unsigned char* grab_one(int *width, int *height) { >+ char *frame_buf; > set_picture(); > > if (-1 == ioctl(grab_fd,VIDIOCMCAPTURE,&grab_buf)) { >@@ -509,15 +609,73 @@ > return NULL; > } > >- if (mbuf.frames > 1) grab_buf.frame = 1 - grab_buf.frame; >+ /* switch frame if cam support double buf */ >+ grab_buf.frame +=1; >+ if (grab_buf.frame >= mbuf.frames) grab_buf.frame = 0; >+ // if (mbuf.frames > 1) grab_buf.frame = 1 - grab_buf.frame; > if (-1 == ioctl(grab_fd,VIDIOCSYNC,&grab_buf)) { > show_error_dialog("An error occurred at 'ioctl VIDIOCSYNC'."); > return NULL; > } >- if (fix_color) {fix_colour(grab_data + mbuf.offsets[grab_buf.frame], x, y); } >+ >+ frame_buf = grab_data + mbuf.offsets[grab_buf.frame]; > *width = grab_buf.width; > *height = grab_buf.height; >- return grab_data + mbuf.offsets[grab_buf.frame]; >+ >+#ifdef HAVE_LIBCCVT >+ switch (grab_buf.format) { >+ /* if we have ccvt we must check the yuyv converting also */ >+ >+ /* >+ case VIDEO_PALETTE_YUV422: { >+ if (fix_color) >+ ccvt_yuyv_bgr24(*width, *height, frame_buf, rgb_buf); >+ else >+ ccvt_yuyv_rgb24(*width, *height, frame_buf, rgb_buf); >+ break; >+ } >+ */ >+ case VIDEO_PALETTE_YUV420P: { >+ /* let ccvt do the bgr->rgb convertion */ >+ if (fix_color) >+ ccvt_420p_bgr24(*width, *height, frame_buf, rgb_buf); >+ else >+ ccvt_420p_rgb24(*width, *height, frame_buf, rgb_buf); >+ return rgb_buf; >+ } >+ >+ case VIDEO_PALETTE_RGB24: { >+ if (fix_color) fix_colour(frame_buf, x, y); >+ return frame_buf; >+ } >+ default: { >+ printf("oups...\n"); >+ return NULL; >+ } >+ } /* switch */ >+ >+#else /* HAVE_LIBCCVT */ >+ >+ switch (grab_buf.format) { >+ case VIDEO_PALETTE_YUV420P: { >+ yuv420p_to_rgb(frame_buf, rgb_buf, 24); >+ if (fix_color) fix_colour(rgb_buf, x, y); >+ break; >+ } >+ case VIDEO_PALETTE_RGB24: { >+ if (fix_color) fix_colour(frame_buf, x, y); >+ return frame_buf; >+ } >+ default: { >+ printf("oups...\n"); >+ return NULL; >+ } >+ >+ } /* switch */ >+ >+#endif /* HAVE_LIBCCVT */ >+ >+ return rgb_buf; > } > > #else >@@ -529,6 +687,7 @@ > set_picture(); > > for (;;) { >+ grab_buf.format = VIDEO_PALETTE_RGB24; > ret = ioctl(grab_fd,VIDIOCMCAPTURE,&grab_buf); > if (ret == -1) { > /* Some drivers (such as pwc) don't support capturing >@@ -553,7 +712,7 @@ > *height = grab_buf.height; > if (grab_buf.format == VIDEO_PALETTE_YUV420P) { > /* Convert from YUV420P to RGB24. */ >-#ifdef USE_CCVT >+#ifdef HAVE_LIBCCVT > ccvt_420p_rgb24(grab_buf.width, > grab_buf.height, > grab_data, >diff -bruN pyvoice-gyach-1.0.7.orig/gyach/src/webcam.c pyvoice-gyach-1.0.7/gyach/src/webcam.c >--- pyvoice-gyach-1.0.7.orig/gyach/src/webcam.c 2005-04-08 00:09:03.512343087 +0200 >+++ pyvoice-gyach-1.0.7/gyach/src/webcam.c 2005-04-08 00:10:51.620820421 +0200 >@@ -98,7 +98,7 @@ > launcher=malloc(256); > if (!launcher) {return ;} > >- snprintf(launcher,254, "%s/webcam/gyache-upload", PACKAGE_DATA_DIR); >+ snprintf(launcher,254, EXPANDED_LIBEXECDIR "/gyache-upload"); > > if ( stat( launcher, &sbuf )) { > char wmsg[304]; >@@ -118,8 +118,8 @@ > launcher=malloc(10642); > if (!launcher) { free(myfriends); return ;} > >- snprintf(launcher,10640, "%s/webcam/gyache-upload \"%s\" \"%s\" \"%s\" \"%s\" &", >- PACKAGE_DATA_DIR, get_default_profile_name(), key, webcam_device , myfriends >+ snprintf(launcher,10640, EXPANDED_LIBEXECDIR "/gyache-upload \"%s\" \"%s\" \"%s\" \"%s\" &", >+ get_default_profile_name(), key, webcam_device , myfriends > ); > > my_system(launcher); >@@ -143,9 +143,9 @@ > > /* C-based cam viewer */ > if (! launchertype) { >- snprintf(launcher,250, "%s/webcam/gyache-webcam", PACKAGE_DATA_DIR); >+ snprintf(launcher,250, EXPANDED_LIBEXECDIR "/gyache-webcam"); > } else { /* Python-based viewer */ >- snprintf(launcher,250, "%s/webcam/pywebcam.py", PACKAGE_DATA_DIR); >+ snprintf(launcher,250, EXPANDED_LIBEXECDIR "/pywebcam.py"); > } > > if ( stat( launcher, &sbuf )) { >@@ -157,12 +157,12 @@ > > > if (! launchertype) { /* C-based viewer */ >- snprintf(launcher,382, "%s/webcam/gyache-webcam \"%s\" \"%s\" \"%s\" &", >- PACKAGE_DATA_DIR, lastcamwho, get_default_profile_name(), key >+ snprintf(launcher,382, EXPANDED_LIBEXECDIR "/gyache-webcam \"%s\" \"%s\" \"%s\" &", >+ lastcamwho, get_default_profile_name(), key > ); > } else { /* Python-based viewer */ >- snprintf(launcher,382, "python %s/webcam/pywebcam.py \"%s\" \"%s\" \"%s\" &", >- PACKAGE_DATA_DIR, lastcamwho, get_default_profile_name(), key >+ snprintf(launcher,382, "python " EXPANDED_LIBEXECDIR "/pywebcam.py \"%s\" \"%s\" \"%s\" &", >+ lastcamwho, get_default_profile_name(), key > ); > } > >diff -bruN pyvoice-gyach-1.0.7.orig/setup.py pyvoice-gyach-1.0.7/setup.py >--- pyvoice-gyach-1.0.7.orig/setup.py 1970-01-01 01:00:00.000000000 +0100 >+++ pyvoice-gyach-1.0.7/setup.py 2005-04-08 00:17:07.454380219 +0200 >@@ -0,0 +1,26 @@ >+#~/usr/bin/env python >+ >+from distutils.core import setup, Extension >+ >+setup(name="pyvoice", >+ version="0.9", >+ ext_modules=[Extension('pyesd', ['pytsp/pyesd.c','pytsp/pyesd.i'], >+ library_dirs=['/usr/lib64'], >+ libraries=['esd', >+ 'audiofile', >+ 'm', >+ 'asound' >+ ] >+ ), >+ Extension('pytsp',['pytsp/pytruespeech.c','pytsp/pytsp.i'], >+ library_dirs=['/usr/lib64'], >+ libraries=['esd', >+ 'audiofile', >+ 'm', >+ 'asound' >+ ] >+ ) >+ ], >+ package_dir = {"":"pyvoice"}, >+ py_modules=["pyvoice","pyvoiceui"] >+ )
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 76127
:
51178
|
53246
|
53247
|
53248
|
53659
|
53660
|
54911
|
54914
|
55611
|
55612
|
55613
|
55628
|
55629
|
55630
|
55631
|
55698
|
55699
|
55700
|
55830
|
57052
|
57054
|
57684
|
60349
|
60350
|
60351
|
60353
|
62038