[SCM] gsequencer/upstream: adding AgsMutexManager skelleton
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Sun Jun 14 16:06:58 UTC 2015
The following commit has been merged in the upstream branch:
commit e1d1486d386f10110fbf08756e533c68f3f936d1
Author: Joël Krähemann <weedlight at gmail.com>
Date: Thu Apr 9 17:30:57 2015 +0000
adding AgsMutexManager skelleton
diff --git a/src/ags/audio/ags_devout.c b/src/ags/audio/ags_devout.c
index cc96e89..b0afa2d 100644
--- a/src/ags/audio/ags_devout.c
+++ b/src/ags/audio/ags_devout.c
@@ -1402,6 +1402,18 @@ ags_devout_alsa_free(AgsDevout *devout)
devout->out.alsa.handle = NULL;
}
+void
+ags_devout_add_audio(AgsDevout *devout,
+ AgsAudio *audio)
+{
+}
+
+void
+ags_devout_remove_audio(AgsDevout *devout,
+ AgsAudio *audio)
+{
+}
+
/**
* ags_devout_new:
* @ags_main: the #AgsMain
diff --git a/src/ags/thread/ags_mutex_manager.c b/src/ags/thread/ags_mutex_manager.c
new file mode 100644
index 0000000..a137df0
--- /dev/null
+++ b/src/ags/thread/ags_mutex_manager.c
@@ -0,0 +1,135 @@
+/* AGS - Advanced GTK Sequencer
+ * Copyright (C) 2015 Joël Krähemann
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <ags/thread/ags_mutex_manager.h>
+
+#include <ags-lib/object/ags_connectable.h>
+
+void ags_mutex_manager_class_init(AgsMutexManagerClass *mutex_manager);
+void ags_mutex_manager_connectable_interface_init(AgsConnectableInterface *connectable);
+void ags_mutex_manager_init(AgsMutexManager *mutex_manager);
+void ags_mutex_manager_connect(AgsConnectable *connectable);
+void ags_mutex_manager_disconnect(AgsConnectable *connectable);
+void ags_mutex_manager_finalize(GObject *gobject);
+
+static gpointer ags_mutex_manager_parent_class = NULL;
+static guint mutex_manager_signals[LAST_SIGNAL];
+
+__mutex_manager AgsMutexManager *ags_mutex_manager_self = NULL;
+
+GType
+ags_mutex_manager_get_type()
+{
+ static GType ags_type_mutex_manager = 0;
+
+ if(!ags_type_mutex_manager){
+ const GTypeInfo ags_mutex_manager_info = {
+ sizeof (AgsMutexManagerClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) ags_mutex_manager_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (AgsMutexManager),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) ags_mutex_manager_init,
+ };
+
+ const GInterfaceInfo ags_connectable_interface_info = {
+ (GInterfaceInitFunc) ags_mutex_manager_connectable_interface_init,
+ NULL, /* interface_finalize */
+ NULL, /* interface_data */
+ };
+
+ ags_type_mutex_manager = g_type_register_static(G_TYPE_OBJECT,
+ "AgsMutexManager\0",
+ &ags_mutex_manager_info,
+ 0);
+
+ g_type_add_interface_static(ags_type_mutex_manager,
+ AGS_TYPE_CONNECTABLE,
+ &ags_connectable_interface_info);
+ }
+
+ return(ags_type_mutex_manager);
+}
+
+void
+ags_mutex_manager_class_init(AgsMutexManagerClass *mutex_manager)
+{
+ GObjectClass *gobject;
+ GParamSpec *param_spec;
+
+ ags_mutex_manager_parent_class = g_type_class_peek_parent(mutex_manager);
+
+ /* GObject */
+ gobject = (GObjectClass *) mutex_manager;
+
+ gobject->finalize = ags_mutex_manager_finalize;
+}
+
+void
+ags_mutex_manager_init(AgsMutexManager *mutex_manager)
+{
+ mutex_manager->entry = NULL;
+}
+
+void
+ags_mutex_manager_connect(AgsConnectable *connectable)
+{
+ /* empty */
+}
+
+void
+ags_mutex_manager_disconnect(AgsConnectable *connectable)
+{
+ /* empty */
+}
+
+void
+ags_mutex_manager_finalize(GObject *gobject)
+{
+ AgsMutexManager *mutex_manager;
+
+ mutex_manager = AGS_MUTEX_MANAGER(gobject);
+}
+
+AgsMutexEntry*
+ags_mutex_manager_find(AgsMutexManager *mutex_manager,
+ GObject *lock_object)
+{
+ //TODO:JK: implement me
+}
+
+AgsMutexManager*
+ags_mutex_manager_get_instance()
+{
+ //TODO:JK: implement me
+}
+
+AgsMutexManager*
+ags_mutex_manager_new()
+{
+ AgsMutexManager *mutex_manager;
+
+ mutex_manager = (AgsMutexManager *) g_object_new(AGS_TYPE_MUTEX_MANAGER,
+ NULL);
+
+ return(mutex_manager);
+}
+
diff --git a/src/ags/thread/ags_mutex_manager.h b/src/ags/thread/ags_mutex_manager.h
new file mode 100644
index 0000000..b024dc4
--- /dev/null
+++ b/src/ags/thread/ags_mutex_manager.h
@@ -0,0 +1,62 @@
+/* AGS - Advanced GTK Sequencer
+ * Copyright (C) 2015 Joël Krähemann
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __AGS_MUTEX_MANAGER_H__
+#define __AGS_MUTEX_MANAGER_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+#define AGS_TYPE_MUTEX_MANAGER (ags_mutex_manager_get_type())
+#define AGS_MUTEX_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTEX_MANAGER, AgsMutexManager))
+#define AGS_MUTEX_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MUTEX_MANAGER, AgsMutexManagerClass))
+#define AGS_IS_MUTEX_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTEX_MANAGER))
+#define AGS_IS_MUTEX_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTEX_MANAGER))
+#define AGS_MUTEX_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MUTEX_MANAGER, AgsMutexManagerClass))
+
+typedef struct _AgsMutexManager AgsMutexManager;
+typedef struct _AgsMutexManagerClass AgsMutexManagerClass;
+typedef struct _AgsMutexEntry AgsMutexEntry;
+
+struct _AgsMutexManager
+{
+ GObject object;
+};
+
+struct _AgsMutexManagerClass
+{
+ GObjectClass object;
+
+ GList *entry;
+};
+
+struct _AgsMutexEntry
+{
+ GObject *lock_object;
+ pthread_mutex_t mutex;
+};
+
+GType ags_mutex_manager_get_type();
+
+AgsMutexEntry* ags_mutex_manager_find(AgsMutexManager *mutex_manager,
+ GObject *lock_object);
+
+AgsMutexManager* ags_mutex_manager_get_instance();
+AgsMutexManager* ags_mutex_manager_new();
+
+#endif /*__AGS_MUTEX_MANAGER_H__*/
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list