camorama r351 - in trunk: . src
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: camorama r351 - in trunk: . src
- Date: Wed, 28 May 2008 14:19:33 +0000 (UTC)
Author: herzi
Date: Wed May 28 14:19:33 2008
New Revision: 351
URL: http://svn.gnome.org/viewvc/camorama?rev=351&view=rev
Log:
2008-05-28 Sven Herzberg <sven imendio com>
Added a capture strategy field to the application structure
* src/main.c: (main): assign a mmap or read based capture strategy
* src/v4l.h: added the field
Modified:
trunk/ChangeLog
trunk/src/main.c
trunk/src/v4l.h
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Wed May 28 14:19:33 2008
@@ -244,9 +244,11 @@
/* initialize cam and create the window */
if (cam->read == FALSE) {
+ cam->capture = capture_strategy_mmap_new ();
pt2Function = timeout_func;
init_cam (cam);
} else {
+ cam->capture = capture_strategy_read_new ();
printf ("using read()\n");
cam->pic =
realloc (cam->pic,
@@ -287,6 +289,7 @@
gtk_main ();
gtk_idle_remove (cam->idle_id);
+ g_object_unref (cam->capture);
return 0;
}
Modified: trunk/src/v4l.h
==============================================================================
--- trunk/src/v4l.h (original)
+++ trunk/src/v4l.h Wed May 28 14:19:33 2008
@@ -19,7 +19,10 @@
#include <glade/glade.h>
#include <gconf/gconf-client.h>
+typedef struct camera cam;
+
#include "camorama-filter-chain.h"
+#include "capture-strategy.h"
typedef enum {
PICMAX = 0,
@@ -33,7 +36,8 @@
PPM = 2
};
-typedef struct camera {
+struct camera {
+ CaptureStrategy* capture;
int dev;
int x;
int y;
@@ -70,7 +74,7 @@
GtkStatusIcon *tray_icon;
CamoramaFilterChain* filter_chain;
-} cam;
+};
void camera_cap (cam *);
void set_win_info (cam * cam);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]