Debian Codegraph @

gstreamer/gstreamermm/context.cc

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/context.cc`/
2
3
4 #include <glibmm.h>
5
6 #include <gstreamermm/context.h>cxx . . $ `<file>/gstreamer/gstreamermm/context.h`/
7 #include <gstreamermm/private/context_p.h>cxx . . $ `<file>/gstreamer/gstreamermm/private/context_p.h`/
8
9
10 /* gstreamermm - a C++ wrapper for gstreamer
11 *
12 * Copyright 2014-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/structure.h>cxx . . $ `<file>/gstreamer/gstreamermm/structure.h`/
30
31
32 namespacecxx . . $ `$anonymous_namespace_gstreamer/gstreamermm/context.cc`/
33 {
34 } // anonymous namespace
35
36
37 /* Why reinterpret_cast<Context*>(gobject) is needed:
38 *
39 * A Context instance is in fact always a GstContext instance.
40 * Unfortunately, GstContext cannot be a member of Context,
41 * because it is an opaque struct. Also, the C interface does not provide
42 * any hooks to install a destroy notification handler, thus we cannot
43 * wrap it dynamically either.
44 *
45 * The cast works because Context does not have any member data, and
46 * it is impossible to derive from it. This is ensured by using final on the
47 * class and by using = delete on the default constructor.
48 */
49
50 namespace Glibcxx . . $ Glib/
51 {
52
53 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Contextcxx . . $ Gst/Context#> wrapcxx . . $ Glib/wrap(f29c29259afac997).(GstContext* object, bool take_copy)
54 {
55 if(take_copy && object)
56 gst_context_ref(object);
57
58 // See the comment at the top of this file, if you want to know why the cast works.
59 return Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Contextcxx . . $ Gst/Context#>(reinterpret_cast<Gstcxx . . $ Gst/::Contextcxx . . $ Gst/Context#*>(object));
60 }
61
62 } // namespace Glib
63
64
65 namespace Gstcxx . . $ Gst/
66 {
67
68
69 void Contextcxx . . $ Gst/Context#::referencecxx . . $ Gst/Context#reference(83f5f38750778ac8).() const
70 {
71 // See the comment at the top of this file, if you want to know why the cast works.
72 gst_context_ref(reinterpret_cast<GstContext*>(const_cast<Contextcxx . . $ Gst/Context#*>(this)));
73 }
74
75 void Contextcxx . . $ Gst/Context#::unreferencecxx . . $ Gst/Context#unreference(83f5f38750778ac8).() const
76 {
77 // See the comment at the top of this file, if you want to know why the cast works.
78 gst_context_unref(reinterpret_cast<GstContext*>(const_cast<Contextcxx . . $ Gst/Context#*>(this)));
79 }
80
81 GstContext* Contextcxx . . $ Gst/Context#::gobjcxx . . $ Gst/Context#gobj(de598bd2c1f81d21).()
82 {
83 // See the comment at the top of this file, if you want to know why the cast works.
84 return reinterpret_cast<GstContext*>(this);
85 }
86
87 const GstContext* Contextcxx . . $ Gst/Context#::gobjcxx . . $ Gst/Context#gobj(b00a4f671c42af15).() const
88 {
89 // See the comment at the top of this file, if you want to know why the cast works.
90 return reinterpret_cast<const GstContext*>(this);
91 }
92
93 GstContext* Contextcxx . . $ Gst/Context#::gobj_copycxx . . $ Gst/Context#gobj_copy(a5c322f6ff58224f).() const
94 {
95 // See the comment at the top of this file, if you want to know why the cast works.
96 const auto gobject = reinterpret_cast<GstContext*>(const_cast<Contextcxx . . $ Gst/Context#*>(this));
97 gst_context_ref(gobject);
98 return gobject;
99 }
100
101
102 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Contextcxx . . $ Gst/Context#> Contextcxx . . $ Gst/Context#::createcxx . . $ Gst/Context#create(8fb1a2af50eac54e).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& context_type, bool persistent)
103 {
104 return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(f29c29259afac997).(gst_context_new(context_type.c_strcxx . . $ Glib/ustring#c_str(a9f41ea0e82d88cf).(), static_cast<int>(persistent)));
105 }
106
107 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Contextcxx . . $ Gst/Context#> Contextcxx . . $ Gst/Context#::copycxx . . $ Gst/Context#copy(b6c1d44626a0e39f).() const
108 {
109 return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(f29c29259afac997).(gst_context_copy(const_cast<GstContext*>(gobjcxx . . $ Gst/Context#gobj(b00a4f671c42af15).())));
110 }
111
112 Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# Contextcxx . . $ Gst/Context#::get_context_typecxx . . $ Gst/Context#get_context_type(fff0f585954e56f3).() const
113 {
114 return Glibcxx . . $ Glib/::convert_const_gchar_ptr_to_ustringcxx . . $ Glib/convert_const_gchar_ptr_to_ustring(cf5f32d7f0671127).(gst_context_get_context_type(const_cast<GstContext*>(gobjcxx . . $ Gst/Context#gobj(b00a4f671c42af15).())));
115 }
116
117 bool Contextcxx . . $ Gst/Context#::has_context_typecxx . . $ Gst/Context#has_context_type(51a66224d46a21f).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& context_type) const
118 {
119 return gst_context_has_context_type(const_cast<GstContext*>(gobjcxx . . $ Gst/Context#gobj(b00a4f671c42af15).()), context_type.c_strcxx . . $ Glib/ustring#c_str(a9f41ea0e82d88cf).());
120 }
121
122 bool Contextcxx . . $ Gst/Context#::is_persistentcxx . . $ Gst/Context#is_persistent(50ce9a9e25b4a850).() const
123 {
124 return gst_context_is_persistent(const_cast<GstContext*>(gobjcxx . . $ Gst/Context#gobj(b00a4f671c42af15).()));
125 }
126
127 Gstcxx . . $ Gst/::Structurecxx . . $ Gst/Structure# Contextcxx . . $ Gst/Context#::writable_structurecxx . . $ Gst/Context#writable_structure(65062218a0489aeb).() const
128 {
129 return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(51e1331ca9e65d80).(gst_context_writable_structure(const_cast<GstContext*>(gobjcxx . . $ Gst/Context#gobj(b00a4f671c42af15).())));
130 }
131
132
133 } // namespace Gst
134
135