Debian Codegraph @

gstreamer/gstreamermm/sample.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_SAMPLE_H
3 #define _GSTREAMERMM_SAMPLE_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /*
10 * sample.hg
11 *
12 * Created on: Jul 30, 2013
13 * Author: m.kolny
14 */
15 /* gstreamermm - a C++ wrapper for gstreamer
16 *
17 * Copyright 2008-2016 The gstreamermm Development Team
18 *
19 * This library is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU Lesser General Public
21 * License as published by the Free Software Foundation; either
22 * version 2.1 of the License, or (at your option) any later version.
23 *
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free
31 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32 */
33
34 #include <gst/gst.h>
35 #include <gstreamermm/miniobject.h>
36 #include <gstreamermm/buffer.h>
37 #include <gstreamermm/caps.h>
38 #include <gstreamermm/segment.h>
39 #include <gstreamermm/structure.h>
40
41
42 namespace Gst
43 {
44
45 /**
46 * A Gst::Sample is a small object containing data, a type, timing and
47 * extra arbitrary information.
48 *
49 * Last reviewed on 2016-09-14 (1.8.0).
50 */
51 class Sample : public MiniObject
52 {
53 public:
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55 using CppObjectType = Sample;
56 using BaseObjectType = GstSample;
57 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
58
59
60 /** Increment the reference count for this object.
61 * You should never need to do this manually - use the object via a RefPtr instead.
62 */
63 void reference() const;
64
65 /** Decrement the reference count for this object.
66 * You should never need to do this manually - use the object via a RefPtr instead.
67 */
68 void unreference() const;
69
70 ///Provides access to the underlying C instance.
71 GstSample* gobj();
72
73 ///Provides access to the underlying C instance.
74 const GstSample* gobj() const;
75
76 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
77 GstSample* gobj_copy() const;
78
79 Sample() = delete;
80
81 // noncopyable
82 Sample(const Sample&) = delete;
83 Sample& operator=(const Sample&) = delete;
84
85 protected:
86 // Do not derive this. Gst::Sample can neither be constructed nor deleted.
87
88 void operator delete(void*, std::size_t);
89
90 private:
91
92
93 public:
94 static Glib::RefPtr<Gst::Sample> create(const Glib::RefPtr<Gst::Buffer>& buffer, const Glib::RefPtr<Gst::Caps>& caps, const Gst::Segment& segment, Gst::Structure&& info);
95
96
97 /** Get the buffer associated with @a sample
98 *
99 * @return The buffer of @a sample or <tt>nullptr</tt>
100 * when there is no buffer. The buffer remains valid as long as
101 * @a sample is valid. If you need to hold on to it for longer than
102 * that, take a ref to the buffer with Gst::Buffer::ref().
103 */
104 Glib::RefPtr<Gst::Buffer> get_buffer();
105
106 /** Get the buffer associated with @a sample
107 *
108 * @return The buffer of @a sample or <tt>nullptr</tt>
109 * when there is no buffer. The buffer remains valid as long as
110 * @a sample is valid. If you need to hold on to it for longer than
111 * that, take a ref to the buffer with Gst::Buffer::ref().
112 */
113 Glib::RefPtr<const Gst::Buffer> get_buffer() const;
114
115 /** Get the caps associated with @a sample
116 *
117 * @return The caps of @a sample or <tt>nullptr</tt>
118 * when there is no caps. The caps remain valid as long as @a sample is
119 * valid. If you need to hold on to the caps for longer than that,
120 * take a ref to the caps with Gst::Caps::ref().
121 */
122 Glib::RefPtr<Gst::Caps> get_caps();
123
124 /** Get the caps associated with @a sample
125 *
126 * @return The caps of @a sample or <tt>nullptr</tt>
127 * when there is no caps. The caps remain valid as long as @a sample is
128 * valid. If you need to hold on to the caps for longer than that,
129 * take a ref to the caps with Gst::Caps::ref().
130 */
131 Glib::RefPtr<const Gst::Caps> get_caps() const;
132
133 /** Get extra information associated with @a sample.
134 *
135 * @return The extra info of @a sample.
136 * The info remains valid as long as @a sample is valid.
137 */
138 Gst::Structure get_info() const;
139
140 /** Create a copy of the given sample. This will also make a newly allocated
141 * copy of the data the source sample contains.
142 *
143 * @return A new copy of @a buf.
144 */
145 Glib::RefPtr<Gst::Sample> copy() const;
146
147
148 /** Get the segment associated with @a sample
149 *
150 * @return The segment of @a sample.
151 * The segment remains valid as long as @a sample is valid.
152 */
153 Gst::Segment get_segment() const;
154
155
156 };
157
158 }//namespace Gst
159
160
161 namespace Glib
162 {
163
164 /** A Glib::wrap() method for this object.
165 *
166 * @param object The C instance.
167 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
168 * @result A C++ instance that wraps this C instance.
169 *
170 * @relates Gst::Sample
171 */
172 Glib::RefPtr<Gst::Sample> wrap(GstSample* object, bool take_copy = false);
173
174 } // namespace Glib
175
176
177 #endif /* _GSTREAMERMM_SAMPLE_H */
178