gegl r2340 - in branches/branch_zhangjb: . gegl/buffer gegl/graph operations/external



Author: zhangjb
Date: Fri May 23 05:12:57 2008
New Revision: 2340
URL: http://svn.gnome.org/viewvc/gegl?rev=2340&view=rev

Log:
Merged from HEAD trunk.
* configure.ac:
* gegl/buffer/gegl-buffer-load.c:
* gegl/buffer/gegl-tile-backend-file.c:
* gegl/graph/gegl-node.c:
* operations/external/Makefile.am:


Modified:
   branches/branch_zhangjb/ChangeLog
   branches/branch_zhangjb/configure.ac
   branches/branch_zhangjb/gegl/buffer/gegl-buffer-load.c
   branches/branch_zhangjb/gegl/buffer/gegl-tile-backend-file.c
   branches/branch_zhangjb/gegl/graph/gegl-node.c
   branches/branch_zhangjb/operations/external/Makefile.am

Modified: branches/branch_zhangjb/configure.ac
==============================================================================
--- branches/branch_zhangjb/configure.ac	(original)
+++ branches/branch_zhangjb/configure.ac	Fri May 23 05:12:57 2008
@@ -756,6 +756,15 @@
 AC_SUBST(AVFORMAT_LIBS) 
 
 
+###############
+# Check for V4L
+###############
+ 
+have_v4l=no
+AC_CHECK_HEADER(linux/videodev.h, have_v4l=yes)
+
+AM_CONDITIONAL(HAVE_V4L, test "x$have_v4l" = "xyes")
+
 
 
 ################
@@ -874,4 +883,5 @@
   avcodec:        $have_libavcodec
   avformat:       $have_libavformat
   FFTW:           $have_fftw3
+  V4L:            $have_v4l
 ]);

Modified: branches/branch_zhangjb/gegl/buffer/gegl-buffer-load.c
==============================================================================
--- branches/branch_zhangjb/gegl/buffer/gegl-buffer-load.c	(original)
+++ branches/branch_zhangjb/gegl/buffer/gegl-buffer-load.c	Fri May 23 05:12:57 2008
@@ -365,8 +365,8 @@
                       "format", info->format,
                       "tile-width", info->header.tile_width,
                       "tile-height", info->header.tile_height,
-                      "height", info->header.width,
-                      "width", info->header.height,
+                      "height", info->header.height,
+                      "width", info->header.width,
                       "path", path,
                       NULL);
 

Modified: branches/branch_zhangjb/gegl/buffer/gegl-tile-backend-file.c
==============================================================================
--- branches/branch_zhangjb/gegl/buffer/gegl-tile-backend-file.c	(original)
+++ branches/branch_zhangjb/gegl/buffer/gegl-tile-backend-file.c	Fri May 23 05:12:57 2008
@@ -684,12 +684,12 @@
 #else
       if (self->i != -1) 
 	    {
-          close(self->i);
+          close (self->i);
           self->i = -1;
         }
       if (self->o != -1) 
 	    {
-          close(self->o);
+          close (self->o);
 		  self->o = -1;
         }
 #endif
@@ -907,7 +907,7 @@
 #endif
 #else
 	  self->o = open (self->path, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
-	  self->i = self->o;
+	  self->i = dup (self->o);
 #endif
       /*self->i = G_INPUT_STREAM (g_file_read (self->file, NULL, NULL));*/
       self->header = gegl_buffer_read_header (self->i, &offset)->header;
@@ -923,8 +923,13 @@
       /* insert each of the entries into the hash table */
       load_index (self, TRUE);
       self->exist = TRUE;
+#if HAVE_GIO
       g_assert (self->i);
       g_assert (self->o);
+#else
+      g_assert (self->i != -1);
+      g_assert (self->o != -1);
+#endif
 
       /* to autoflush gegl_buffer_set */
       backend->shared = TRUE;
@@ -974,7 +979,7 @@
       self->o = G_OUTPUT_STREAM (g_file_replace (self->file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL));
       g_output_stream_flush (self->o, NULL, NULL);
 #else
-	  self->o = open (self->path, O_RDWR);
+	  self->o = open (self->path, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
 #endif
 
       self->next_pre_alloc = 256;  /* reserved space for header */
@@ -994,7 +999,7 @@
       self->i = G_INPUT_STREAM (g_file_read (self->file, NULL, NULL));
 #else
       fsync (self->o);
-      self->i = open (self->path, O_RDONLY);  
+      self->i = dup (self->o);
 #endif
 
 #endif

Modified: branches/branch_zhangjb/gegl/graph/gegl-node.c
==============================================================================
--- branches/branch_zhangjb/gegl/graph/gegl-node.c	(original)
+++ branches/branch_zhangjb/gegl/graph/gegl-node.c	Fri May 23 05:12:57 2008
@@ -1231,13 +1231,6 @@
       GParamSpec *pspec;
       gchar      *error;
 
-      if (!strcmp (property_name, "class"))
-        {
-          g_warning ("Getting a deprecated property \"class\" "
-                     "use \"operation\" instead");
-          property_name = "operation";
-        }
-
       if (!strcmp (property_name, "operation") ||
           !strcmp (property_name, "name"))
         {
@@ -1305,14 +1298,6 @@
   g_return_if_fail (property_name != NULL);
   g_return_if_fail (value != NULL);
 
-  if (!strcmp (property_name, "class"))
-    {
-      g_warning ("Setting a deprecated property \"class\", "
-                 "use \"operation\" instead.");
-
-      g_object_set_property (G_OBJECT (self), "operation", value);
-    }
-
   if (!strcmp (property_name, "operation") ||
       !strcmp (property_name, "name"))
     {

Modified: branches/branch_zhangjb/operations/external/Makefile.am
==============================================================================
--- branches/branch_zhangjb/operations/external/Makefile.am	(original)
+++ branches/branch_zhangjb/operations/external/Makefile.am	Fri May 23 05:12:57 2008
@@ -60,11 +60,11 @@
 display_la_CFLAGS = $(SDL_CFLAGS)
 endif
 
-#if HAVE_V4L
+if HAVE_V4L
 ops += v4l.la
 v4l_la_SOURCES = v4l.c
 v4l_la_LIBADD = $(op_libs)
-#endif
+endif
 
 EXTRA_DIST=v4lutils/v4lutils.c v4lutils/v4lutils.h
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]