camorama r364 - in trunk: . src
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: camorama r364 - in trunk: . src
- Date: Wed, 28 May 2008 14:20:52 +0000 (UTC)
Author: herzi
Date: Wed May 28 14:20:52 2008
New Revision: 364
URL: http://svn.gnome.org/viewvc/camorama?rev=364&view=rev
Log:
2008-05-28  Sven Herzberg  <sven imendio com>
	Moved the code to initialize cam->pic into the read strategy
	* src/capture-strategy-read.c: (read_constructed): added the code
	* src/main.c: (main): dropped the code
Modified:
   trunk/ChangeLog
   trunk/src/capture-strategy-read.c
   trunk/src/main.c
Modified: trunk/src/capture-strategy-read.c
==============================================================================
--- trunk/src/capture-strategy-read.c	(original)
+++ trunk/src/capture-strategy-read.c	Wed May 28 14:20:52 2008
@@ -54,11 +54,17 @@
 static void
 read_constructed (GObject* object)
 {
+	cam* cam = PRIV(object)->cam;
+
 	if (G_OBJECT_CLASS (capture_strategy_read_parent_class)->constructed) {
 		G_OBJECT_CLASS (capture_strategy_read_parent_class)->constructed (object);
 	}
 
 	g_return_if_fail (PRIV (object)->cam);
+
+        cam->pic =
+            realloc (cam->pic,
+                     (cam->vid_cap.maxwidth * cam->vid_cap.maxheight * 3));
 }
 
 static void
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Wed May 28 14:20:52 2008
@@ -249,9 +249,6 @@
     } else {
 	cam->capture = capture_strategy_read_new (cam);
         printf ("using read()\n");
-        cam->pic =
-            realloc (cam->pic,
-                     (cam->vid_cap.maxwidth * cam->vid_cap.maxheight * 3));
     }
     cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]