[gstreamermm] Virtual functions: const corrections.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Virtual functions: const corrections.
- Date: Fri, 15 Oct 2010 00:25:04 +0000 (UTC)
commit 5efd6c99b34b9b03c2861587c1f3b9c78649db8a
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Thu Oct 14 19:53:01 2010 -0400
Virtual functions: const corrections.
* gstreamer/src/audiosink.hg:
* gstreamer/src/audiosrc.hg:
* gstreamer/src/cddabasesrc.hg:
* gstreamer/src/preset.ccg:
* gstreamer/src/preset.hg: Const corrections.
* gstreamer/src/bin.hg: Typo.
ChangeLog | 11 +++++++++++
gstreamer/src/audiosink.hg | 2 +-
gstreamer/src/audiosrc.hg | 2 +-
gstreamer/src/bin.hg | 1 -
gstreamer/src/cddabasesrc.hg | 2 +-
gstreamer/src/preset.ccg | 5 +++--
gstreamer/src/preset.hg | 2 +-
7 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 619bcce..217ad01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-14 José Alburquerque <jaalburqu svn gnome org>
+
+ Virtual functions: const corrections.
+
+ * gstreamer/src/audiosink.hg:
+ * gstreamer/src/audiosrc.hg:
+ * gstreamer/src/cddabasesrc.hg:
+ * gstreamer/src/preset.ccg:
+ * gstreamer/src/preset.hg: Const corrections.
+ * gstreamer/src/bin.hg: Typo.
+
2010-09-02 José Alburquerque <jaalburqu svn gnome org>
AudioSrc, BaseSrc: Wrap boolean virtual functions.
diff --git a/gstreamer/src/audiosink.hg b/gstreamer/src/audiosink.hg
index 0ba91b5..6718b7c 100644
--- a/gstreamer/src/audiosink.hg
+++ b/gstreamer/src/audiosink.hg
@@ -76,7 +76,7 @@ public:
/** vfunc to return how many samples are still in the device. This is used to
* drive the synchronisation.
*/
- _WRAP_VFUNC(guint get_delay(), "delay")
+ _WRAP_VFUNC(guint get_delay() const, "delay")
/** vfunc to return as quickly as possible from a write and flush any pending
* samples from the device.
diff --git a/gstreamer/src/audiosrc.hg b/gstreamer/src/audiosrc.hg
index 2941603..8bf7ee6 100644
--- a/gstreamer/src/audiosrc.hg
+++ b/gstreamer/src/audiosrc.hg
@@ -74,7 +74,7 @@ public:
/** vfunc to get the number of samples queued in the device.
*/
- _WRAP_VFUNC(guint get_delay(), "delay")
+ _WRAP_VFUNC(guint get_delay() const, "delay")
/** vfunc to unblock a read to the device and reset.
*/
diff --git a/gstreamer/src/bin.hg b/gstreamer/src/bin.hg
index 7d61a72..4a3c8fd 100644
--- a/gstreamer/src/bin.hg
+++ b/gstreamer/src/bin.hg
@@ -244,7 +244,6 @@ public:
_WRAP_SIGNAL(void element_removed(const Glib::RefPtr<Gst::Element>& element), "element-removed")
//TODO: The default signal handler is marked as private in the C header. Is that intendend?
- //The docs suggest that the signal can be used, so apparently it is for public use. It looks like a typo.
_WRAP_SIGNAL(bool do_latency(), "do-latency")
_WRAP_PROPERTY("async-handling", bool)
diff --git a/gstreamer/src/cddabasesrc.hg b/gstreamer/src/cddabasesrc.hg
index e40764d..c929223 100644
--- a/gstreamer/src/cddabasesrc.hg
+++ b/gstreamer/src/cddabasesrc.hg
@@ -99,7 +99,7 @@ public:
/** Virtual function to get default device. It is optional and may return
* an empty string.
*/
- _WRAP_VFUNC(std::string get_default_device(), "get_default_device")
+ _WRAP_VFUNC(std::string get_default_device() const, "get_default_device")
/** Virtual function to return array of CD devices. It is optional and may
* return an empty array.
diff --git a/gstreamer/src/preset.ccg b/gstreamer/src/preset.ccg
index 5d69683..5bb3876 100644
--- a/gstreamer/src/preset.ccg
+++ b/gstreamer/src/preset.ccg
@@ -182,7 +182,8 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
typedef Glib::StringArrayHandle RType;
return Glib::StringArrayHandle(0, Glib::OWNERSHIP_NONE);
}
-bool Gst::Preset::get_meta_vfunc(const Glib::ustring& name, const Glib::ustring& tag, Glib::ustring& value)
+bool Gst::Preset::get_meta_vfunc(const Glib::ustring& name,
+ const Glib::ustring& tag, Glib::ustring& value) const
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
@@ -192,7 +193,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
if(base && base->get_meta)
{
gchar* gst_value;
- const bool result = (*base->get_meta)(gobj(),((name).c_str()),((tag).c_str()), &gst_value);
+ const bool result = (*base->get_meta)(const_cast<GstPreset*>(gobj()),((name).c_str()),((tag).c_str()), &gst_value);
value = gst_value;
g_free(gst_value);
return result;
diff --git a/gstreamer/src/preset.hg b/gstreamer/src/preset.hg
index 3e129d9..0593670 100644
--- a/gstreamer/src/preset.hg
+++ b/gstreamer/src/preset.hg
@@ -69,7 +69,7 @@ public:
_WRAP_VFUNC(bool set_meta(const Glib::ustring& name, const Glib::ustring& tag, const Glib::ustring& value), "set_meta")
virtual bool get_meta_vfunc(const Glib::ustring& name,
- const Glib::ustring& tag, Glib::ustring& value);
+ const Glib::ustring& tag, Glib::ustring& value) const;
protected:
#m4begin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]