[gstreamermm] some warnings removed, added helper methods to a Gst::Object class
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] some warnings removed, added helper methods to a Gst::Object class
- Date: Mon, 13 Jan 2014 17:38:36 +0000 (UTC)
commit 246aa22f6d4a499fb0cf9cc04b8e11c177426da0
Author: Marcin Kolny <marcin kolny gmail com>
Date: Mon Jan 13 18:37:46 2014 +0100
some warnings removed, added helper methods to a Gst::Object class
gstreamer/gstreamermm/check.h | 2 +-
gstreamer/src/audioclock.hg | 2 +-
gstreamer/src/buffer.hg | 6 +++---
gstreamer/src/object.ccg | 25 +++++++++++++++++++++++++
gstreamer/src/object.hg | 6 ++++++
5 files changed, 36 insertions(+), 5 deletions(-)
---
diff --git a/gstreamer/gstreamermm/check.h b/gstreamer/gstreamermm/check.h
index d759ce2..df8bd47 100644
--- a/gstreamer/gstreamermm/check.h
+++ b/gstreamer/gstreamermm/check.h
@@ -50,7 +50,7 @@ class Check
* @param caps2: Second caps to compare.
* @throw Gst::Exception if caps are not equal.
*/
- void caps_equal (Glib::RefPtr<Gst::Caps> caps1, Glib::RefPtr<Gst::Caps> caps2);;
+ void caps_equal (Glib::RefPtr<Gst::Caps> caps1, Glib::RefPtr<Gst::Caps> caps2);
};
Check();
diff --git a/gstreamer/src/audioclock.hg b/gstreamer/src/audioclock.hg
index 04ef086..5b85eea 100644
--- a/gstreamer/src/audioclock.hg
+++ b/gstreamer/src/audioclock.hg
@@ -62,7 +62,7 @@ public:
*
* @return a new Gst::AudioClock.
*/
- _WRAP_CREATE(const Glib::ustring& name, const SlotGetTime& time_slot);
+ _WRAP_CREATE(const Glib::ustring& name, const SlotGetTime& time_slot)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
diff --git a/gstreamer/src/buffer.hg b/gstreamer/src/buffer.hg
index f3b6171..893fab8 100644
--- a/gstreamer/src/buffer.hg
+++ b/gstreamer/src/buffer.hg
@@ -72,7 +72,7 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gst::Memory> get_all_memory() const, gst_buffer_get_all_memory)
- _WRAP_METHOD(int memcmp(gsize offset, gconstpointer mem, gsize size), gst_buffer_memcmp);
+ _WRAP_METHOD(int memcmp(gsize offset, gconstpointer mem, gsize size), gst_buffer_memcmp)
_MEMBER_GET(pts, pts, ClockTime, GstClockTime)
_MEMBER_SET(pts, pts, ClockTime, GstClockTime)
@@ -87,9 +87,9 @@ public:
_MEMBER_GET(duration, duration, ClockTime, GstClockTime)
_MEMBER_SET(duration, duration, ClockTime, GstClockTime)
- _WRAP_METHOD(bool map(const Glib::RefPtr<Gst::MapInfo>& info, MapFlags flags), gst_buffer_map);
+ _WRAP_METHOD(bool map(const Glib::RefPtr<Gst::MapInfo>& info, MapFlags flags), gst_buffer_map)
- _WRAP_METHOD(void unmap(const Glib::RefPtr<Gst::MapInfo>& info), gst_buffer_unmap);
+ _WRAP_METHOD(void unmap(const Glib::RefPtr<Gst::MapInfo>& info), gst_buffer_unmap)
/** Get the offset of this buffer.
* @return The offset in the source file of the beginning of this buffer.
*/
diff --git a/gstreamer/src/object.ccg b/gstreamer/src/object.ccg
index 52a174b..f4af36b 100644
--- a/gstreamer/src/object.ccg
+++ b/gstreamer/src/object.ccg
@@ -44,4 +44,29 @@ Object::Object(GstObject* castitem)
}
}
+bool Object::is_element() const
+{
+ return GST_IS_ELEMENT(gobj());
+}
+
+bool Object::is_element_factory() const
+{
+ return GST_IS_ELEMENT_FACTORY(gobj());
+}
+
+bool Object::is_pad() const
+{
+ return GST_IS_PAD(gobj());
+}
+
+bool Object::is_pad_template() const
+{
+ return GST_IS_PAD_TEMPLATE(gobj());
+}
+
+bool Object::is_bin() const
+{
+ return GST_IS_BIN(gobj());
+}
+
} // namespace Gst
diff --git a/gstreamer/src/object.hg b/gstreamer/src/object.hg
index 19a8d0c..fe64ee0 100644
--- a/gstreamer/src/object.hg
+++ b/gstreamer/src/object.hg
@@ -60,6 +60,12 @@ class Object : public Glib::Object
_CUSTOM_CTOR_CAST
public:
+ bool is_element() const;
+ bool is_element_factory() const;
+ bool is_pad() const;
+ bool is_pad_template() const;
+ bool is_bin() const;
+
/** Returns the entire set of flags for the object.
*/
_MEMBER_GET(flags, flags, guint32, guint32)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]