rpms/camorama/F-11 camorama-0.19-desktop.patch, NONE, 1.1 camorama-0.19-fixes.patch, NONE, 1.1 camorama-0.19-libv4l.patch, NONE, 1.1 camorama.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Hans de Goede
jwrdegoede at fedoraproject.org
Mon Aug 31 11:26:12 UTC 2009
- Previous message (by thread): rpms/camorama/devel camorama-0.19-desktop.patch, NONE, 1.1 camorama-0.19-fixes.patch, NONE, 1.1 camorama-0.19-libv4l.patch, NONE, 1.1 camorama.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/arora/devel arora-0.9.0-fedorabookmarks.patch, NONE, 1.1 arora-0.9.0-gitversion.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 arora.spec, 1.18, 1.19 sources, 1.9, 1.10 arora-0.6-fedorabookmarks.patch, 1.1, NONE arora-0.8.0-gitversion.patch, 1.1, NONE arora.xml, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwrdegoede
Update of /cvs/extras/rpms/camorama/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3813
Modified Files:
.cvsignore sources
Added Files:
camorama-0.19-desktop.patch camorama-0.19-fixes.patch
camorama-0.19-libv4l.patch camorama.spec
Log Message:
* Fri Aug 28 2009 Hans de Goede <hdegoede at redhat.com> 0.19-2
- Don't install gconf files during build (#507830)
- Add comments describing the patches (#507830)
camorama-0.19-desktop.patch:
camorama.desktop.in | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- NEW FILE camorama-0.19-desktop.patch ---
diff -up camorama-0.19/camorama.desktop.in~ camorama-0.19/camorama.desktop.in
--- camorama-0.19/camorama.desktop.in~ 2007-06-14 16:05:33.000000000 +0200
+++ camorama-0.19/camorama.desktop.in 2009-06-23 19:58:16.000000000 +0200
@@ -4,10 +4,9 @@ _Comment=View, alter and save images fro
Exec=camorama
Terminal=0
Type=Application
-Icon=camorama.png
-Categories=Application;Graphics
+Icon=camorama
+Categories=GNOME;AudioVideo;
StartupNotify=true
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=camorama
X-GNOME-Bugzilla-Component=General
-X-GNOME-Bugzilla-Component=User Interface
camorama-0.19-fixes.patch:
camorama-0.19/src/camorama-window.c | 6 +-----
src/callbacks.c | 14 +++++++++++---
src/filter.c | 4 ++--
src/main.c | 3 +--
src/v4l.c | 6 ++++--
5 files changed, 19 insertions(+), 14 deletions(-)
--- NEW FILE camorama-0.19-fixes.patch ---
--- camorama-0.19/src/callbacks.c 2007-09-16 15:36:55.000000000 +0200
+++ camorama-0.19.new/src/callbacks.c 2008-06-29 22:22:44.000000000 +0200
@@ -387,9 +387,6 @@
}
}
- cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
- gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
- cam->x, cam->y);
/*
* if(cam->read == FALSE) {
@@ -441,6 +438,11 @@
* * }
*/
get_win_info (cam);
+
+ cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
+ gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
+ cam->x, cam->y);
+
frame = 0;
gtk_window_resize (GTK_WINDOW
(glade_xml_get_widget (cam->xml, "main_window")), 320,
@@ -520,8 +522,14 @@
gtk_widget_show (about);
}
+void
+camorama_filter_color_filter(void* filter, guchar *image, int x, int y, int depth);
+
static void
apply_filters(cam* cam) {
+ /* v4l has reverse rgb order from what camora expect so call the color
+ filter to fix things up before running the user selected filters */
+ camorama_filter_color_filter(NULL, cam->pic_buf, cam->x, cam->y, cam->depth);
camorama_filter_chain_apply(cam->filter_chain, cam->pic_buf, cam->x, cam->y, cam->depth);
#warning "FIXME: enable the threshold channel filter"
// if((effect_mask & CAMORAMA_FILTER_THRESHOLD_CHANNEL) != 0)
--- camorama-0.19/src/filter.c 2007-09-16 14:48:50.000000000 +0200
+++ camorama-0.19.new/src/filter.c 2008-06-29 22:11:42.000000000 +0200
@@ -151,12 +151,12 @@
static void
camorama_filter_color_init(CamoramaFilterColor* self) {}
-static void
+void
camorama_filter_color_filter(CamoramaFilterColor* filter, guchar *image, int x, int y, int depth) {
int i;
char tmp;
i = x * y;
- while (--i) {
+ while (i--) {
tmp = image[0];
image[0] = image[2];
image[2] = tmp;
--- camorama-0.19/src/main.c 2007-09-16 15:36:55.000000000 +0200
+++ camorama-0.19.new/src/main.c 2008-06-29 22:20:04.000000000 +0200
@@ -224,8 +224,7 @@
/* get picture attributes */
get_pic_info (cam);
-// set_pic_info(cam);
- /* set_pic_info(cam); */
+ set_pic_info (cam);
cam->contrast = cam->vid_pic.contrast;
cam->brightness = cam->vid_pic.brightness;
cam->colour = cam->vid_pic.colour;
--- camorama-0.19/src/v4l.c 2007-09-16 14:48:05.000000000 +0200
+++ camorama-0.19.new/src/v4l.c 2008-06-29 22:20:23.000000000 +0200
@@ -158,8 +158,8 @@
if(cam->debug) {
g_message("SET PIC");
}
- //cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
- //cam->vid_pic.depth = 24;
+ cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
+ cam->vid_pic.depth = 24;
//cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
if(cam->debug) {
@@ -232,6 +232,8 @@
exit(0);
}
+ cam->x = cam->vid_win.width;
+ cam->y = cam->vid_win.height;
}
void set_buffer(cam * cam)
--- camorama-0.19/src/camorama-window.c~ 2007-09-16 15:36:55.000000000 +0200
+++ camorama-0.19/src/camorama-window.c 2009-06-23 20:19:16.000000000 +0200
@@ -209,11 +209,7 @@ load_interface(cam* cam) {
logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), CAMORAMA_STOCK_WEBCAM, 24, 0, NULL);
gtk_window_set_default_icon(logo);
- logo = (GdkPixbuf *) create_pixbuf (PACKAGE_DATA_DIR "/pixmaps/camorama.png");
- if (logo == NULL) {
- printf ("\n\nLOGO NO GO\n\n");
- }
-
+ logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), "camorama", 48, 0, NULL);
if (cam->show_adjustments == FALSE) {
gtk_widget_hide (glade_xml_get_widget
(cam->xml, "adjustments_table"));
camorama-0.19-libv4l.patch:
Makefile.am | 2 +-
Makefile.in | 2 +-
callbacks.c | 17 +++++++++--------
main.c | 6 +++++-
v4l.c | 13 +++++++------
5 files changed, 23 insertions(+), 17 deletions(-)
--- NEW FILE camorama-0.19-libv4l.patch ---
--- camorama-0.19/src/Makefile.am 2007-09-16 14:48:05.000000000 +0200
+++ camorama-0.19.new/src/Makefile.am 2009-06-24 15:01:37.000000000 +0200
@@ -36,7 +36,7 @@
filter.h \
$(BUILT_SOURCES)\
$(NULL)
-camorama_LDADD = $(PACKAGE_LIBS)
+camorama_LDADD = $(PACKAGE_LIBS) -lv4l1
DISTCLEANFILES=$(BUILT_SOURCES)
--- camorama-0.19/src/Makefile.in 2007-10-06 21:06:28.000000000 +0200
+++ camorama-0.19.new/src/Makefile.in 2009-06-24 15:01:50.000000000 +0200
@@ -248,7 +248,7 @@
$(BUILT_SOURCES)\
$(NULL)
-camorama_LDADD = $(PACKAGE_LIBS)
+camorama_LDADD = $(PACKAGE_LIBS) -lv4l1
DISTCLEANFILES = $(BUILT_SOURCES)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
--- camorama-0.19/src/callbacks.c 2009-06-24 15:01:55.000000000 +0200
+++ camorama-0.19.new/src/callbacks.c 2009-06-24 14:55:42.000000000 +0200
@@ -9,6 +9,7 @@
#include <libgnomeui/gnome-propertybox.h>
#include <libgnomeui/gnome-window-icon.h>
#include <pthread.h>
+#include <libv4l1.h>
extern GtkWidget *main_window, *prefswindow;
//extern state func_state;
@@ -390,7 +391,7 @@
/*
* if(cam->read == FALSE) {
- * cam->pic = mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0);
+ * cam->pic = v4l1_mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0);
*
* if((unsigned char *) -1 == (unsigned char *) cam->pic) {
* if(cam->debug == TRUE) {
@@ -401,7 +402,7 @@
* }
* }else{
* cam->pic_buf = malloc(cam->x * cam->y * cam->depth);
- * read(cam->dev,cam->pic,(cam->x * cam->y * 3));
+ * v4l1_read(cam->dev,cam->pic,(cam->x * cam->y * 3));
* }
*/
@@ -427,7 +428,7 @@
* if(cam->read == FALSE) {
* * for(frame = 0; frame < cam->vid_buf.frames; frame++) {
* * cam->vid_map.frame = frame;
- * * if(ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+ * * if(v4l1_ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
* * if(cam->debug == TRUE) {
* * fprintf(stderr, "Unable to capture image (VIDIOCMCAPTURE) during resize.\n");
* * }
@@ -547,7 +548,7 @@
int i, count = 0;
GdkGC *gc;
- read (cam->dev, cam->pic, (cam->x * cam->y * 3));
+ v4l1_read (cam->dev, cam->pic, (cam->x * cam->y * 3));
frames2++;
/*
* update_rec.x = 0;
@@ -588,7 +589,7 @@
i = -1;
while (i < 0) {
- i = ioctl (cam->dev, VIDIOCSYNC, &frame);
+ i = v4l1_ioctl (cam->dev, VIDIOCSYNC, &frame);
if (i < 0 && errno == EINTR) {
if (cam->debug == TRUE) {
@@ -630,7 +631,7 @@
0, cam->x, cam->y);
cam->vid_map.frame = frame;
- if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+ if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
if (cam->debug == TRUE) {
fprintf (stderr, "Unable to capture image (VIDIOCMCAPTURE)\n");
}
@@ -677,7 +678,7 @@
void init_cam (GtkWidget * capture, cam * cam)
{
cam->pic =
- mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE,
+ v4l1_mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE,
MAP_SHARED, cam->dev, 0);
if ((unsigned char *) -1 == (unsigned char *) cam->pic) {
@@ -692,7 +693,7 @@
cam->vid_map.format = cam->vid_pic.palette;
for (frame = 0; frame < cam->vid_buf.frames; frame++) {
cam->vid_map.frame = frame;
- if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+ if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
if (cam->debug == TRUE) {
fprintf (stderr,
"Unable to capture image (VIDIOCMCAPTURE).\n");
--- camorama-0.19/src/main.c 2009-06-24 15:01:55.000000000 +0200
+++ camorama-0.19.new/src/main.c 2009-06-24 14:59:35.000000000 +0200
@@ -9,6 +9,7 @@
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
#include <locale.h>
+#include <libv4l1.h>
#include "camorama-display.h"
#include "camorama-stock-items.h"
@@ -206,7 +207,7 @@
gdk_pixbuf_xlib_init (display, 0);
cam->desk_depth = xlib_rgb_get_depth ();
- cam->dev = open (cam->video_dev, O_RDWR);
+ cam->dev = v4l1_open (cam->video_dev, O_RDWR);
camera_cap (cam);
get_win_info (cam);
@@ -284,5 +285,8 @@
gtk_timeout_add (2000, (GSourceFunc) fps, cam->status);
gtk_main ();
+ v4l1_munmap(cam->pic, cam->vid_buf.size);
+ v4l1_close(cam->dev);
+
return 0;
}
--- camorama-0.19/src/v4l.c 2009-06-24 15:01:55.000000000 +0200
+++ camorama-0.19.new/src/v4l.c 2009-06-24 14:54:09.000000000 +0200
@@ -2,6 +2,7 @@
#include<time.h>
#include<errno.h>
#include<gnome.h>
+#include <libv4l1.h>
#include "support.h"
extern int frame_number;
@@ -87,7 +88,7 @@
void camera_cap(cam * cam)
{
char *msg;
- if(ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
+ if(v4l1_ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
if(cam->debug == TRUE) {
fprintf(stderr, "VIDIOCGCAP -- could not get camera capabilities, exiting.....\n");
}
@@ -161,7 +162,7 @@
cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
cam->vid_pic.depth = 24;
//cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
- if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
+ if(v4l1_ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
if(cam->debug) {
g_message("VIDIOCSPICT -- could not set picture info, exiting....");
}
@@ -176,7 +177,7 @@
//set_pic_info(cam);
char *msg;
- if(ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) {
+ if(v4l1_ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) {
msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
error_dialog(msg);
if(cam->debug == TRUE) {
@@ -201,7 +202,7 @@
void get_win_info(cam * cam)
{
gchar *msg;
- if(ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) {
+ if(v4l1_ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) {
msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
error_dialog(msg);
if(cam->debug == TRUE) {
@@ -222,7 +223,7 @@
void set_win_info(cam * cam)
{
gchar *msg;
- if(ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) {
+ if(v4l1_ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) {
msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
error_dialog(msg);
if(cam->debug == TRUE) {
@@ -239,7 +240,7 @@
void set_buffer(cam * cam)
{
char *msg;
- if(ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
+ if(v4l1_ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
error_dialog(msg);
if(cam->debug == TRUE) {
--- NEW FILE camorama.spec ---
Name: camorama
Version: 0.19
Release: 2%{?dist}
Summary: Gnome webcam viewer
Group: Amusements/Graphics
License: GPLv2+
URL: http://camorama.fixedgear.org/
Source0: http://ftp.gnome.org/pub/GNOME/sources/camorama/0.19/camorama-0.19.tar.bz2
# None of these patches are going upstream as upstream is dead
# camorama has some bad (not always true) assumptions about which resolutions
# it can get from a device, this fixes camorama to actualy check what it got
Patch0: camorama-0.19-fixes.patch
# Update the desktop file to todays standards
Patch1: camorama-0.19-desktop.patch
# Make it use libv4l1 so it will work with v4l2 devices too
Patch2: camorama-0.19-libv4l.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libgnomeui-devel ORBit2-devel gettext-devel libv4l-devel
BuildRequires: intltool desktop-file-utils
Requires: hicolor-icon-theme
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
%description
A simple Gnome webcam viewer, with the ability to apply some video effects.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
# below is the desktop file and icon stuff.
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{name}.desktop
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/devices
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/devices
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}-webcam-16.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/devices/%{name}-webcam.png
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}-webcam-24.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/devices/%{name}-webcam.png
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if [ "$1" -gt 1 ] ; then
export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
gconftool-2 --makefile-uninstall-rule \
%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
fi
%post
export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
gconftool-2 --makefile-install-rule \
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%preun
if [ "$1" -eq 0 ] ; then
export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
gconftool-2 --makefile-uninstall-rule \
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
fi
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%{_sysconfdir}/gconf/schemas/camorama.schemas
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/camorama.desktop
%{_datadir}/icons/hicolor/*x*/devices/%{name}-webcam.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%changelog
* Fri Aug 28 2009 Hans de Goede <hdegoede at redhat.com> 0.19-2
- Don't install gconf files during build (#507830)
- Add comments describing the patches (#507830)
* Tue Jun 23 2009 Hans de Goede <hdegoede at redhat.com> 0.19-1
- Initial Fedora package
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/camorama/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 28 Aug 2009 14:41:07 -0000 1.1
+++ .cvsignore 31 Aug 2009 11:26:12 -0000 1.2
@@ -0,0 +1 @@
+camorama-0.19.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/camorama/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 28 Aug 2009 14:41:08 -0000 1.1
+++ sources 31 Aug 2009 11:26:12 -0000 1.2
@@ -0,0 +1 @@
+75025ba37d1dd1c398d92ba2dbef43ee camorama-0.19.tar.bz2
- Previous message (by thread): rpms/camorama/devel camorama-0.19-desktop.patch, NONE, 1.1 camorama-0.19-fixes.patch, NONE, 1.1 camorama-0.19-libv4l.patch, NONE, 1.1 camorama.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/arora/devel arora-0.9.0-fedorabookmarks.patch, NONE, 1.1 arora-0.9.0-gitversion.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 arora.spec, 1.18, 1.19 sources, 1.9, 1.10 arora-0.6-fedorabookmarks.patch, 1.1, NONE arora-0.8.0-gitversion.patch, 1.1, NONE arora.xml, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list