Debian Codegraph @

gstreamer/gstreamermm/allocator.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/allocator.h`/
2 #ifndef _GSTREAMERMM_ALLOCATOR_H
3 #define _GSTREAMERMM_ALLOCATOR_Hcxx . . $ `gstreamer/gstreamermm/allocator.h:3:9`!
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2014-2016 The gstreamermm Development Team
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 *
27 * Last reviewed on 2016-04-22 (1.8.0)
28 */
29
30 #include <gstreamermm/object.h>cxx . . $ `<file>/gstreamer/gstreamermm/object.h`/
31 #include <gstreamermm/memory.h>cxx . . $ `<file>/gstreamer/gstreamermm/memory.h`/
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 extern "C" { typedef struct _GstAllocationParamscxx . . $ _GstAllocationParams# GstAllocationParams; }
36 #endif
37
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 using GstAllocatorcxx . . $ GstAllocator# = struct _GstAllocatorcxx . . $ _GstAllocator#;
40 using GstAllocatorClasscxx . . $ GstAllocatorClass# = struct _GstAllocatorClasscxx . . $ _GstAllocatorClass#;
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
42
43
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45 namespace Gstcxx . . $ Gst/
46 { class Allocator_Classcxx . . $ Gst/Allocator_Class#; } // namespace Gst
47 #endif //DOXYGEN_SHOULD_SKIP_THIS
48
49 namespace Gstcxx . . $ Gst/
50 {
51
52 /** Parameters to control the allocation of memory.
53 */
54 class AllocationParamscxx . . $ Gst/AllocationParams#
55 {
56 public:
57 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 using CppObjectTypecxx . . $ Gst/AllocationParams#CppObjectType# = AllocationParamscxx . . $ Gst/AllocationParams#;
59 using BaseObjectTypecxx . . $ Gst/AllocationParams#BaseObjectType# = GstAllocationParams;
60 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
61
62 /** Get the GType for this class, for use with the underlying GObject type system.
63 */
64 static GType get_typecxx . . $ Gst/AllocationParams#get_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
65
66
67 explicit AllocationParamscxx . . $ Gst/AllocationParams#AllocationParams(91bc6c6596cf7bca).(GstAllocationParams* gobject, bool make_a_copy = true);
68
69 AllocationParamscxx . . $ Gst/AllocationParams#AllocationParams(d0c4619345d45aff).(const AllocationParamscxx . . $ Gst/AllocationParams#& other);
70 AllocationParamscxx . . $ Gst/AllocationParams#& operatorcxx . . $ Gst/AllocationParams#`operator=`(12bb80bc6f51799c).=(const AllocationParamscxx . . $ Gst/AllocationParams#& other);
71
72 AllocationParamscxx . . $ Gst/AllocationParams#AllocationParams(a3334af8cbed8909).(AllocationParamscxx . . $ Gst/AllocationParams#&& other) noexcept;
73 AllocationParamscxx . . $ Gst/AllocationParams#& operatorcxx . . $ Gst/AllocationParams#`operator=`(809f4fbbac6eebd).=(AllocationParamscxx . . $ Gst/AllocationParams#&& other) noexcept;
74
75 ~cxx . . $ Gst/AllocationParams#`~AllocationParams`(ced63f7c635d850d).AllocationParamscxx . . $ Gst/AllocationParams#() noexcept;
76
77 void swapcxx . . $ Gst/AllocationParams#swap(ba45fb3d12edc6fb).(AllocationParamscxx . . $ Gst/AllocationParams#& other) noexcept;
78
79 ///Provides access to the underlying C instance.
80 GstAllocationParams* gobjcxx . . $ Gst/AllocationParams#gobj(52bfd5f39dfd).() { return gobject_cxx . . $ Gst/AllocationParams#gobject_.; }
81
82 ///Provides access to the underlying C instance.
83 const GstAllocationParams* gobjcxx . . $ Gst/AllocationParams#gobj(c99b4985c5b51ade).() const { return gobject_cxx . . $ Gst/AllocationParams#gobject_.; }
84
85 ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
86 GstAllocationParams* gobj_copycxx . . $ Gst/AllocationParams#gobj_copy(5cb897513063532a).() const;
87
88 protected:
89 GstAllocationParams* gobject_cxx . . $ Gst/AllocationParams#gobject_.;
90
91 private:
92
93
94 public:
95
96
97 AllocationParamscxx . . $ Gst/AllocationParams#AllocationParams(49f6e7a06ebc5aa8).();
98
99
100 /** Initialize @a params to its default values
101 */
102 void initcxx . . $ Gst/AllocationParams#init(49f6e7a06ebc5aa8).();
103
104 MemoryFlagscxx . . $ Gst/MemoryFlags# get_flagscxx . . $ Gst/AllocationParams#get_flags(d5402c8fc0282601).() const;
105 void set_flagscxx . . $ Gst/AllocationParams#set_flags(7915e56576f217af).(const MemoryFlagscxx . . $ Gst/MemoryFlags#& value);
106
107 gsize get_aligncxx . . $ Gst/AllocationParams#get_align(fe4d2d262d4164a8).() const;
108 void set_aligncxx . . $ Gst/AllocationParams#set_align(ae19885fdae2095).(const gsize& value);
109
110 gsize get_prefixcxx . . $ Gst/AllocationParams#get_prefix(fe4d2d262d4164a8).() const;
111 void set_prefixcxx . . $ Gst/AllocationParams#set_prefix(ae19885fdae2095).(const gsize& value);
112
113 gsize get_paddingcxx . . $ Gst/AllocationParams#get_padding(fe4d2d262d4164a8).() const;
114 void set_paddingcxx . . $ Gst/AllocationParams#set_padding(ae19885fdae2095).(const gsize& value);
115
116
117 };
118
119 /** Allocate memory blocks.
120 *
121 * Memory is usually created by allocators with a alloc()
122 * method call. When nullptr is used as the allocator, the default allocator will
123 * be used.
124 *
125 * New allocators can be registered with register_allocator().
126 * Allocators are identified by name and can be retrieved with
127 * find(). set_default() can be used to change the
128 * default allocator.
129 */
130
131
132 class Allocatorcxx . . $ Gst/Allocator# : public Gstcxx . . $ Gst/::Objectcxx . . $ Gst/Object#
133 {
134
135 #ifndef DOXYGEN_SHOULD_SKIP_THIS
136
137 public:
138 using CppObjectTypecxx . . $ Gst/Allocator#CppObjectType# = Allocatorcxx . . $ Gst/Allocator#;
139 using CppClassTypecxx . . $ Gst/Allocator#CppClassType# = Allocator_Classcxx . . $ Gst/Allocator_Class#;
140 using BaseObjectTypecxx . . $ Gst/Allocator#BaseObjectType# = GstAllocatorcxx . . $ GstAllocator#;
141 using BaseClassTypecxx . . $ Gst/Allocator#BaseClassType# = GstAllocatorClasscxx . . $ GstAllocatorClass#;
142
143 // noncopyable
144 Allocatorcxx . . $ Gst/Allocator#Allocator(20deb907dfec8889).(const Allocatorcxx . . $ Gst/Allocator#&) = delete;
145 Allocatorcxx . . $ Gst/Allocator#& operatorcxx . . $ Gst/Allocator#`operator=`(ce901680a2af1b4).=(const Allocatorcxx . . $ Gst/Allocator#&) = delete;
146
147 private: friend class Allocator_Classcxx . . $ Gst/Allocator_Class#;
148 static CppClassTypecxx . . $ Gst/Allocator#CppClassType# allocator_class_cxx . . $ Gst/Allocator#allocator_class_.;
149
150 protected:
151 explicit Allocatorcxx . . $ Gst/Allocator#Allocator(237165b4a42a691a).(const Glibcxx . . $ Glib/::ConstructParamscxx . . $ Glib/ConstructParams#& construct_params);
152 explicit Allocatorcxx . . $ Gst/Allocator#Allocator(420e5e12b81d3a05).(GstAllocatorcxx . . $ GstAllocator#* castitem);
153
154 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
155
156 public:
157
158 Allocatorcxx . . $ Gst/Allocator#Allocator(b4f346d9acc916a6).(Allocatorcxx . . $ Gst/Allocator#&& src) noexcept;
159 Allocatorcxx . . $ Gst/Allocator#& operatorcxx . . $ Gst/Allocator#`operator=`(f3c7dbb55dad40da).=(Allocatorcxx . . $ Gst/Allocator#&& src) noexcept;
160
161 ~cxx . . $ Gst/Allocator#`~Allocator`(ced63f7c635d850d).Allocatorcxx . . $ Gst/Allocator#() noexcept override;
162
163 /** Get the GType for this class, for use with the underlying GObject type system.
164 */
165 static GType get_typecxx . . $ Gst/Allocator#get_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
166
167 #ifndef DOXYGEN_SHOULD_SKIP_THIS
168
169
170 static GType get_base_typecxx . . $ Gst/Allocator#get_base_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
171 #endif
172
173 ///Provides access to the underlying C GObject.
174 GstAllocatorcxx . . $ GstAllocator#* gobjcxx . . $ Gst/Allocator#gobj(421823dfa46164ec).() { return reinterpret_cast<GstAllocatorcxx . . $ GstAllocator#*>(gobject_cxx . . $ Glib/ObjectBase#gobject_.); }
175
176 ///Provides access to the underlying C GObject.
177 const GstAllocatorcxx . . $ GstAllocator#* gobjcxx . . $ Gst/Allocator#gobj(694afed9319e4fc3).() const { return reinterpret_cast<GstAllocatorcxx . . $ GstAllocator#*>(gobject_cxx . . $ Glib/ObjectBase#gobject_.); }
178
179 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
180 GstAllocatorcxx . . $ GstAllocator#* gobj_copycxx . . $ Gst/Allocator#gobj_copy(421823dfa46164ec).();
181
182 private:
183
184
185 public:
186
187 /** Find a previously registered allocator with @a name. When @a name is <tt>nullptr</tt>, the
188 * default allocator will be returned.
189 *
190 * @param name The name of the allocator.
191 * @return A Gst::Allocator or <tt>nullptr</tt> when
192 * the allocator with @a name was not registered. Use Gst::Object::unref()
193 * to release the allocator after usage.
194 */
195 static Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Allocatorcxx . . $ Gst/Allocator#> findcxx . . $ Gst/Allocator#find(71cff9fe3e876b10).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& name);
196
197 /** Registers the memory @a allocator with @a name. This function takes ownership of
198 * @a allocator.
199 *
200 * @param name The name of the allocator.
201 * @param allocator Gst::Allocator.
202 */
203 static void register_allocatorcxx . . $ Gst/Allocator#register_allocator(17780408c76efa66).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& name, Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Allocatorcxx . . $ Gst/Allocator#>&& allocator);
204
205 /** Free @a memory that was previously allocated with alloc().
206 *
207 * @param memory The memory to free.
208 */
209 void freecxx . . $ Gst/Allocator#free(63736205f3a07344).(Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Memorycxx . . $ Gst/Memory#>&& memory);
210
211 /** Use @a allocator to allocate a new memory block with memory that is at least
212 * @a size big.
213 *
214 * The optional @a params can specify the prefix and padding for the memory. If
215 * <tt>nullptr</tt> is passed, no flags, no extra prefix/padding and a default alignment is
216 * used.
217 *
218 * The prefix/padding will be filled with 0 if flags contains
219 * Gst::MEMORY_FLAG_ZERO_PREFIXED and Gst::MEMORY_FLAG_ZERO_PADDED respectively.
220 *
221 * When @a allocator is <tt>nullptr</tt>, the default allocator will be used.
222 *
223 * The alignment in @a params is given as a bitmask so that @a align + 1 equals
224 * the amount of bytes to align to. For example, to align to 8 bytes,
225 * use an alignment of 7.
226 *
227 * @param size Size of the visible memory area.
228 * @param params Optional parameters.
229 * @return A new Gst::Memory.
230 */
231 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Memorycxx . . $ Gst/Memory#> alloccxx . . $ Gst/Allocator#alloc(2e6e626aee1aec17).(gsize size, const Gstcxx . . $ Gst/::AllocationParamscxx . . $ Gst/AllocationParams#& params);
232
233 /// A alloc() convenience overload.
234 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Memorycxx . . $ Gst/Memory#> alloccxx . . $ Gst/Allocator#alloc(aaf7905c33884766).(gsize size);
235
236
237 /** Set the default allocator. This function takes ownership of @a allocator.
238 */
239
240 void set_defaultcxx . . $ Gst/Allocator#set_default(49f6e7a06ebc5aa8).();
241
242 /**
243 * Find default allocator.
244 *
245 * @return: default allocator.
246 */
247 static Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Allocatorcxx . . $ Gst/Allocator#> get_default_allocatorcxx . . $ Gst/Allocator#get_default_allocator(e013e171d5b5f839).();
248
249 virtual Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Memorycxx . . $ Gst/Memory#> alloc_vfunccxx . . $ Gst/Allocator#alloc_vfunc(2e6e626aee1aec17).(gsize size, const Gstcxx . . $ Gst/::AllocationParamscxx . . $ Gst/AllocationParams#& params);
250
251
252 // This vfunc is hand-coded because it takes reference to a memory.
253 // In generally, arguments are passed to a function by copy, so
254 // custom wrapper is necessary.
255 virtual void free_vfunccxx . . $ Gst/Allocator#free_vfunc(63736205f3a07344).(Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Memorycxx . . $ Gst/Memory#>&& memory);
256
257 protected:
258
259
260 public:
261
262 public:
263 //C++ methods used to invoke GTK+ virtual functions:
264
265 protected:
266 //GTK+ Virtual Functions (override these to change behaviour):
267
268 //Default Signal Handlers::
269
270
271 };
272 }
273
274
275 namespace Gstcxx . . $ Gst/
276 {
277
278 /** @relates Gst::AllocationParams
279 * @param lhs The left-hand side
280 * @param rhs The right-hand side
281 */
282 inline void swapcxx . . $ Gst/swap(b21ad8ebc43cb424).(AllocationParamscxx . . $ Gst/AllocationParams#& lhs, AllocationParamscxx . . $ Gst/AllocationParams#& rhs) noexcept
283 { lhs.swapcxx . . $ Gst/AllocationParams#swap(ba45fb3d12edc6fb).(rhs); }
284
285 } // namespace Gst
286
287 namespace Glibcxx . . $ Glib/
288 {
289
290 /** A Glib::wrap() method for this object.
291 *
292 * @param object The C instance.
293 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
294 * @result A C++ instance that wraps this C instance.
295 *
296 * @relates Gst::AllocationParams
297 */
298 Gstcxx . . $ Gst/::AllocationParamscxx . . $ Gst/AllocationParams# wrapcxx . . $ Glib/wrap(fefc17215cafd38c).(GstAllocationParams* object, bool take_copy = false);
299
300 #ifndef DOXYGEN_SHOULD_SKIP_THIS
301 template <>
302 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::AllocationParamscxx . . $ Gst/AllocationParams#> : public Glibcxx . . $ Glib/::Value_Boxedcxx . . $ Glib/Value_Boxed#<Gstcxx . . $ Gst/::AllocationParamscxx . . $ Gst/AllocationParams#>
303 {};
304 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
305
306 } // namespace Glib
307
308
309 namespace Glibcxx . . $ Glib/
310 {
311 /** A Glib::wrap() method for this object.
312 *
313 * @param object The C instance.
314 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
315 * @result A C++ instance that wraps this C instance.
316 *
317 * @relates Gst::Allocator
318 */
319 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Allocatorcxx . . $ Gst/Allocator#> wrapcxx . . $ Glib/wrap(c608c0ab6ce247e5).(GstAllocatorcxx . . $ GstAllocator#* object, bool take_copy = false);
320 }
321
322
323 #endif /* _GSTREAMERMM_ALLOCATOR_H */
324