[gstreamermm] TaskPool: Use 'protected' for the wrapped default constructor.
- From: José Alburquerque <jaalburqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gstreamermm] TaskPool: Use 'protected' for the wrapped default constructor.
- Date: Fri, 12 Feb 2010 00:45:44 +0000 (UTC)
commit e552023cdde9a25e15d5ade599be5d7ab155b946
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Thu Feb 11 19:39:49 2010 -0500
TaskPool: Use 'protected' for the wrapped default constructor.
* gstreamer/src/taskpool.hg: Make sure the default constructor is
protected and not accidentally private from the generation process.
* gstreamer/src/message.ccg: Be a bit more verbose about why the extra
reference is taken in the wrap_new() method.
ChangeLog | 9 +++++++++
gstreamer/src/message.ccg | 4 +++-
gstreamer/src/taskpool.hg | 2 ++
3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7e78254..94efc96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-02-11 José Alburquerque <jaalburqu svn gnome org>
+
+ TaskPool: Use 'protected' for the wrapped default constructor.
+
+ * gstreamer/src/taskpool.hg: Make sure the default constructor is
+ protected and not accidentally private from the generation process.
+ * gstreamer/src/message.ccg: Be a bit more verbose about why the extra
+ reference is taken in the wrap_new() method.
+
2010-02-08 José Alburquerque <jaalburqu svn gnome org>
Message: Use a custom wrap_new() to generate correct Message class.
diff --git a/gstreamer/src/message.ccg b/gstreamer/src/message.ccg
index ef09ca3..b93e9bf 100644
--- a/gstreamer/src/message.ccg
+++ b/gstreamer/src/message.ccg
@@ -1159,7 +1159,9 @@ Glib::RefPtr<Gst::Message> Message::wrap(GstMessage* message, bool take_copy)
Gst::MiniObject* Message_Class::wrap_new(GstMiniObject* object)
{
// Use the Gst::Message wrap() method to get the right type of Message class
- // and return the underlying object in the refptr.
+ // and return the underlying object in the refptr. The extra reference is
+ // needed so that the object does not loose a reference when the local
+ // refptr is destroyed.
return Gst::Message::wrap((GstMessage*)object, true).operator->();
}
diff --git a/gstreamer/src/taskpool.hg b/gstreamer/src/taskpool.hg
index c386472..b22463f 100644
--- a/gstreamer/src/taskpool.hg
+++ b/gstreamer/src/taskpool.hg
@@ -36,6 +36,8 @@ namespace Gst
class TaskPool : public Object
{
_CLASS_GOBJECT(TaskPool, GstTaskPool, GST_TASK_POOL, Object, GstObject)
+
+protected:
_CTOR_DEFAULT()
public:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]