Debian Codegraph @

gstreamer/gstreamermm/mapinfo.cc

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gstreamermm/mapinfo.h>
7 #include <gstreamermm/private/mapinfo_p.h>
8
9
10 /* gstreamermm - a C++ wrapper for gstreamer
11 *
12 * Copyright 2013-2016 The gstreamermm Development Team
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29 #include <gstreamermm/memory.h>
30
31 namespace Gst
32 {
33
34 static GstMapInfo empty_map_info()
35 {
36 // TODO: GST_MAP_INFO_INIT has been fixed in the further GStreamer version (1.8.x)
37 static GstMapInfo info = { NULL, (GstMapFlags) 0, NULL, 0, 0, { NULL, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL}};
38 return info;
39 }
40
41 MapInfo::MapInfo()
42 : m_spec(empty_map_info())
43 {
44 }
45
46 MapInfo::MapInfo(const GstMapInfo& castitem)
47 : m_spec(castitem)
48 {
49 }
50
51 MapInfo::MapInfo(MapInfo&& other)
52 {
53 m_spec = other.m_spec;
54 other.m_spec = empty_map_info();
55 }
56
57 MapInfo& MapInfo::operator=(MapInfo&& other)
58 {
59 m_spec = other.m_spec;
60 other.m_spec = empty_map_info();
61 return *this;
62 }
63
64 }
65
66
67 namespace
68 {
69 } // anonymous namespace
70
71 // static
72 GType Glib::Value<Gst::MapFlags>::value_type()
73 {
74 return gst_map_flags_get_type();
75 }
76
77
78 namespace Gst
79 {
80
81
82 MapFlags MapInfo::get_flags() const
83 {
84 return ((MapFlags)(gobj()->flags));
85 }
86
87 guint8* MapInfo::get_data()
88 {
89 return gobj()->data;
90 }
91
92 const guint8* MapInfo::get_data() const
93 {
94 return gobj()->data;
95 }
96
97 gsize MapInfo::get_maxsize() const
98 {
99 return gobj()->maxsize;
100 }
101
102 gsize MapInfo::get_size() const
103 {
104 return gobj()->size;
105 }
106
107 Glib::RefPtr<Gst::Memory> MapInfo::get_memory()
108 {
109 Glib::RefPtr<Gst::Memory> ref_ptr(Glib::wrap(gobj()->memory));
110
111 if(ref_ptr)
112 ref_ptr->reference();
113
114 return ref_ptr;
115 }
116
117 Glib::RefPtr<const Gst::Memory> MapInfo::get_memory() const
118 {
119 Glib::RefPtr<const Gst::Memory> ref_ptr(Glib::wrap(gobj()->memory));
120
121 if(ref_ptr)
122 ref_ptr->reference();
123
124 return ref_ptr;
125 }
126
127
128 } // namespace Gst
129
130