camorama r348 - in trunk: . src



Author: herzi
Date: Wed May 28 14:19:11 2008
New Revision: 348
URL: http://svn.gnome.org/viewvc/camorama?rev=348&view=rev

Log:
2008-05-28  Sven Herzberg  <sven imendio com>

	Implemented the capture strategy interface

	* src/capture-strategy.c: (capture_strategy_get_type):
	* src/capture-strategy.h:


Modified:
   trunk/ChangeLog
   trunk/src/capture-strategy.c
   trunk/src/capture-strategy.h

Modified: trunk/src/capture-strategy.c
==============================================================================
--- trunk/src/capture-strategy.c	(original)
+++ trunk/src/capture-strategy.c	Wed May 28 14:19:11 2008
@@ -1,4 +1,4 @@
-/* This file is part of ...
+/* This file is part of camorama
  *
  * AUTHORS
  *     Sven Herzberg  <sven imendio com>
@@ -23,3 +23,25 @@
 
 #include "capture-strategy.h"
 
+GType
+capture_strategy_get_type (void)
+{
+	static GType type = 0;
+
+	if (G_UNLIKELY(!type)) {
+		static const GTypeInfo info = {
+			sizeof (CaptureStrategyIface),
+			NULL,
+			NULL,
+			(GClassInitFunc)NULL
+		};
+
+		type = g_type_register_static (G_TYPE_INTERFACE,
+					       "CaptureStrategy",
+					       &info,
+					       0);
+	}
+
+	return type;
+}
+

Modified: trunk/src/capture-strategy.h
==============================================================================
--- trunk/src/capture-strategy.h	(original)
+++ trunk/src/capture-strategy.h	Wed May 28 14:19:11 2008
@@ -1,4 +1,4 @@
-/* This file is part of ...
+/* This file is part of camorama
  *
  * AUTHORS
  *     Sven Herzberg  <sven imendio com>
@@ -24,5 +24,32 @@
 #ifndef CAPTURE_STRATEGY_H
 #define CAPTURE_STRATEGY_H
 
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _CaptureStrategy      CaptureStrategy;
+typedef struct _CaptureStrategyIface CaptureStrategyIface;
+
+G_END_DECLS
+
+#include "v4l.h"
+
+G_BEGIN_DECLS
+
+#define CAMORAMA_TYPE_CAPTURE_STRATEGY         (capture_strategy_get_type ())
+#define CAMORAMA_CAPTURE_STRATEGY(i)           (G_TYPE_CHECK_INSTANCE_CAST ((i), CAMORAMA_TYPE_CAPTURE_STRATEGY, CaptureStrategy))
+#define CAMORAMA_CAPTURE_STRATEGY_GET_IFACE(i) (G_TYPE_INSTANCE_GET_INTERFACE ((i), CAMORAMA_TYPE_CAPTURE_STRATEGY, CaptureStrategyIface))
+
+GType capture_strategy_get_type (void);
+
+struct _CaptureStrategyIface {
+	GTypeInterface base_interfase;
+
+	/* vtable */
+	gboolean (*capture_timeout) (cam* cam);
+};
+
+G_END_DECLS
 
 #endif /* !CAPTURE_STRATEGY_H */



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