summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-14 15:34:23 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-14 15:34:23 +0200
commit92264fbeb06ffecfa99aad948c465f9bfdb4fcfa (patch)
tree19307ca3ad376a1b762ffd201570002db960bce6
parentaddeb7c21246e922c44d8ba48dede2a80676e837 (diff)
QGst::Allocator: remove unnecessary methods provided by other mechanisms
The cast operators are provided by RefPointer (AllocatorPtr is cast-able to GstAllocator*) and the constructor is provided by RefPointer::wrap()
-rw-r--r--src/QGst/allocator.cpp17
-rw-r--r--src/QGst/allocator.h5
2 files changed, 1 insertions, 21 deletions
diff --git a/src/QGst/allocator.cpp b/src/QGst/allocator.cpp
index 05f01ae..9578527 100644
--- a/src/QGst/allocator.cpp
+++ b/src/QGst/allocator.cpp
@@ -91,25 +91,10 @@ void AllocationParams::setPadding(size_t padding)
d->padding = padding;
}
-Allocator::Allocator(GstAllocator *g_alloc)
-{
- m_object = static_cast<void *>(g_alloc);
-}
-
-Allocator::operator GstAllocator *()
-{
- return static_cast<GstAllocator *>(m_object);
-}
-
-Allocator::operator GstAllocator *() const
-{
- return static_cast<GstAllocator *>(m_object);
-}
-
AllocatorPtr Allocator::find(const char *name)
{
- return AllocatorPtr(new Allocator(gst_allocator_find(name)));
+ return AllocatorPtr::wrap(gst_allocator_find(name), false);
}
void Allocator::registerAllocator(const char *name)
diff --git a/src/QGst/allocator.h b/src/QGst/allocator.h
index ac9eaf0..1f52ad9 100644
--- a/src/QGst/allocator.h
+++ b/src/QGst/allocator.h
@@ -60,11 +60,6 @@ class QTGSTREAMER_EXPORT Allocator : public Object
{
QGST_WRAPPER(Allocator)
public:
- explicit Allocator(GstAllocator *g_alloc);
-
- operator GstAllocator *();
- operator GstAllocator *() const;
-
/*! search for an already registered allocator. */
static AllocatorPtr find(const char *name);
/*! this corresponds to gst_allocator_register. */