[gstreamermm] Gst::Allocator: wrap methods using gtkmmproc macros
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Gst::Allocator: wrap methods using gtkmmproc macros
- Date: Wed, 26 Aug 2015 13:09:40 +0000 (UTC)
commit cf9d2498a5185f1f9cc135c723dca32bc02a33f5
Author: Marcin Kolny <marcin kolny gmail com>
Date: Wed Aug 26 13:07:11 2015 +0000
Gst::Allocator: wrap methods using gtkmmproc macros
* gstreamer/src/allocator.{ccg|hg}: make register_allocator static
method, wrap gst_allocator_find using _WRAP_METHOD macro.
gstreamer/src/allocator.ccg | 15 ++-------------
gstreamer/src/allocator.hg | 26 +++++---------------------
2 files changed, 7 insertions(+), 34 deletions(-)
---
diff --git a/gstreamer/src/allocator.ccg b/gstreamer/src/allocator.ccg
index 5cd861d..6008a58 100644
--- a/gstreamer/src/allocator.ccg
+++ b/gstreamer/src/allocator.ccg
@@ -1,6 +1,6 @@
/* gstreamermm - a C++ wrapper for gstreamer
*
- * Copyright 2014 The gstreamermm Development Team
+ * Copyright 2014-2015 The gstreamermm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,7 +17,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gstreamermm/allocator.h>
+#include <gstreamermm/object.h>
_PINCLUDE(gstreamermm/private/object_p.h)
@@ -30,17 +30,6 @@ AllocationParams::AllocationParams()
gobject_ = gst_allocation_params_copy(¶ms);
}
-Glib::RefPtr<Allocator> Allocator::find(const Glib::ustring& name)
-{
- return Glib::wrap(gst_allocator_find(name.c_str()), false);
-}
-
-void Allocator::register_allocator(const Glib::ustring& name)
-{
- reference();
- gst_allocator_register(name.c_str(), gobj());
-}
-
Glib::RefPtr<Gst::Allocator> Allocator::get_default_allocator()
{
return Glib::wrap(gst_allocator_find(nullptr), false);
diff --git a/gstreamer/src/allocator.hg b/gstreamer/src/allocator.hg
index 1656315..3145e61 100644
--- a/gstreamer/src/allocator.hg
+++ b/gstreamer/src/allocator.hg
@@ -1,6 +1,6 @@
/* gstreamermm - a C++ wrapper for gstreamer
*
- * Copyright 2014 The gstreamermm Development Team
+ * Copyright 2014-2015 The gstreamermm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,15 +17,15 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gst/gst.h>
#include <gstreamermm/memory.h>
-#include <gstreamermm/object.h>
_DEFS(gstreamermm,gst)
namespace Gst
{
+class Object;
+
class AllocationParams
{
_CLASS_BOXEDTYPE(AllocationParams, GstAllocationParams, NONE, gst_allocation_params_copy,
gst_allocation_params_free)
@@ -55,24 +55,8 @@ class Allocator : public Gst::Object
_CLASS_GOBJECT(Allocator, GstAllocator, GST_ALLOCATOR, Gst::Object, GstObject)
public:
- /**
- * Find a previously registered allocator with @name.
- *
- * @name: the name of the allocator
- *
- * @return: a #Glib::RefPtr<Gst::Allocator>.
- */
- static Glib::RefPtr<Gst::Allocator> find(const Glib::ustring& name);
- _IGNORE(gst_allocator_find)
-
- /**
- * Registers the memory @allocator with @name.
- *
- * @name: the name of the allocator
- * @allocator: (transfer full): #GstAllocator
- */
- void register_allocator(const Glib::ustring& name);
- _IGNORE(gst_allocator_register)
+ _WRAP_METHOD(static Glib::RefPtr<Gst::Allocator> find(const Glib::ustring& name), gst_allocator_find)
+ _WRAP_METHOD(static void register_allocator(const Glib::ustring& name, Glib::RefPtr<Gst::Allocator>&&
allocator), gst_allocator_register)
/**
* Set the default allocator.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]