[gstreamermm: 98/167] replaced c-style pointers with RefPtr objects
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm: 98/167] replaced c-style pointers with RefPtr objects
- Date: Tue, 3 Sep 2013 19:27:18 +0000 (UTC)
commit c0832116a1894438443ae5e7b69622878e910f39
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date: Wed Jul 31 11:49:03 2013 +0200
replaced c-style pointers with RefPtr objects
gstreamer/src/buffer.hg | 6 +++---
gstreamer/src/mapinfo.hg | 2 +-
tests/test-buffer-mapinfo.cc | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gstreamer/src/buffer.hg b/gstreamer/src/buffer.hg
index 3f4c4af..c5cc22f 100644
--- a/gstreamer/src/buffer.hg
+++ b/gstreamer/src/buffer.hg
@@ -88,10 +88,10 @@ public:
*/
_MEMBER_GET(duration, duration, ClockTime, GstClockTime)
-#m4 _CONVERSION(`Gst::MapInfo*', `GstMapInfo*', `$3->gobj()')
- _WRAP_METHOD(bool map(Gst::MapInfo* info, MapFlags flags), gst_buffer_map);
+#m4 _CONVERSION(`Glib::RefPtr<Gst::MapInfo>', `GstMapInfo*', `$3->gobj()')
+ _WRAP_METHOD(bool map(Glib::RefPtr<Gst::MapInfo> info, MapFlags flags), gst_buffer_map);
- _WRAP_METHOD(void unmap(Gst::MapInfo* info), gst_buffer_unmap);
+ _WRAP_METHOD(void unmap(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/mapinfo.hg b/gstreamer/src/mapinfo.hg
index 3952e1b..4717377 100644
--- a/gstreamer/src/mapinfo.hg
+++ b/gstreamer/src/mapinfo.hg
@@ -37,7 +37,7 @@ _WRAP_ENUM(MapFlags, GstMapFlags)
/* A structure containing the result of a map operation such as
* Memory::Map(). It contains the data and size.
*/
-class MapInfo
+class MapInfo : public Glib::Object
{
_CLASS_GENERIC(MapInfo, GstMapInfo)
public:
diff --git a/tests/test-buffer-mapinfo.cc b/tests/test-buffer-mapinfo.cc
index 5455288..bb2a946 100644
--- a/tests/test-buffer-mapinfo.cc
+++ b/tests/test-buffer-mapinfo.cc
@@ -17,12 +17,12 @@ int main(int argc, char* argv[])
int buffer_size = 15;
cout << "Creating buffer..." << endl;
Glib::RefPtr<Gst::Buffer> buffer = Gst::Buffer::create(buffer_size);
- Gst::MapInfo mapinfo ;
+ Glib::RefPtr<Gst::MapInfo> mapinfo(new Gst::MapInfo());
Gst::MapFlags flags;
- buffer->map(&mapinfo, flags);
+ buffer->map(mapinfo, flags);
- assert(mapinfo.get_size() == buffer_size);
+ assert(mapinfo->get_size() == buffer_size);
cout << "Correct!" << endl;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]