Debian Codegraph @

gstreamer/gstreamermm/videoframe.cc

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gstreamermm/videoframe.h>
7 #include <gstreamermm/private/videoframe_p.h>
8
9
10 /* gstreamermm - a C++ wrapper for gstreamer
11 *
12 * Copyright 2008-2015 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 <cstring>
30
31 namespace Gst
32 {
33
34 VideoFrame::VideoFrame()
35 {
36 std::memset(&gobject_, 0, sizeof(GstVideoFrame));
37 }
38
39 VideoFrame::VideoFrame(const GstVideoFrame* gobject)
40 {
41 if(gobject)
42 gobject_ = *gobject;
43 else
44 std::memset(&gobject_, 0, sizeof(GstVideoFrame));
45 }
46 }
47
48 namespace
49 {
50 } // anonymous namespace
51
52 // static
53 GType Glib::Value<Gst::VideoFrameFlags>::value_type()
54 {
55 return gst_video_frame_flags_get_type();
56 }
57
58 // static
59 GType Glib::Value<Gst::VideoBufferFlags>::value_type()
60 {
61 return gst_video_buffer_flags_get_type();
62 }
63
64 // static
65 GType Glib::Value<Gst::VideoFrameMapFlags>::value_type()
66 {
67 return gst_video_frame_map_flags_get_type();
68 }
69
70
71 namespace Gst
72 {
73
74
75 bool VideoFrame::map(const Gst::VideoInfo& info, const Glib::RefPtr<Gst::Buffer>& buffer, Gst::MapFlags flags)
76 {
77 return gst_video_frame_map(gobj(), const_cast<GstVideoInfo*>(info.gobj()), Glib::unwrap(buffer), ((GstMapFlags)(flags)));
78 }
79
80 bool VideoFrame::map_id(const Gst::VideoInfo& info, const Glib::RefPtr<Gst::Buffer>& buffer, gint id, Gst::MapFlags flags)
81 {
82 return gst_video_frame_map_id(gobj(), const_cast<GstVideoInfo*>(info.gobj()), Glib::unwrap(buffer), id, ((GstMapFlags)(flags)));
83 }
84
85 void VideoFrame::unmap()
86 {
87 gst_video_frame_unmap(gobj());
88 }
89
90 bool VideoFrame::copy(const Gst::VideoFrame& dest, const Gst::VideoFrame& src)
91 {
92 return gst_video_frame_copy(const_cast<GstVideoFrame*>(dest.gobj()), src.gobj());
93 }
94
95 bool VideoFrame::copy_plane(const Gst::VideoFrame& dest, const Gst::VideoFrame& src, guint plane)
96 {
97 return gst_video_frame_copy_plane(const_cast<GstVideoFrame*>(dest.gobj()), src.gobj(), plane);
98 }
99
100 void VideoFrame::set_info(const Gst::VideoInfo& value)
101 {
102 gobj()->info = *(value.gobj());
103 }
104
105 Gst::VideoInfo VideoFrame::get_info() const
106 {
107 return Gst::VideoInfo(Gst::VideoInfo(const_cast<GstVideoInfo*>(&gobj()->info), false));
108 }
109
110 void VideoFrame::set_flags(const Gst::VideoFrameFlags& value)
111 {
112 gobj()->flags = ((GstVideoFrameFlags)(value));
113 }
114
115 Gst::VideoFrameFlags VideoFrame::get_flags() const
116 {
117 return ((Gst::VideoFrameFlags)(gobj()->flags));
118 }
119
120 void VideoFrame::set_buffer(const Glib::RefPtr<Gst::Buffer>& value)
121 {
122 gobj()->buffer = Glib::unwrap(value);
123 }
124
125 Glib::RefPtr<Gst::Buffer> VideoFrame::get_buffer() const
126 {
127 return Glib::wrap(gobj()->buffer);
128 }
129
130 void VideoFrame::set_meta(const gpointer& value)
131 {
132 gobj()->meta = value;
133 }
134
135 gpointer VideoFrame::get_meta() const
136 {
137 return gobj()->meta;
138 }
139
140 void VideoFrame::set_id(const gint& value)
141 {
142 gobj()->id = value;
143 }
144
145 gint VideoFrame::get_id() const
146 {
147 return gobj()->id;
148 }
149
150
151 } // namespace Gst
152
153