Debian Codegraph @

gstreamer/gstreamermm/encodingprofile.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_ENCODINGPROFILE_H
3 #define _GSTREAMERMM_ENCODINGPROFILE_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-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
28 #include <gst/gst.h>
29 #include <gstreamermm/object.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 using GstEncodingProfile = struct _GstEncodingProfile;
34 using GstEncodingProfileClass = struct _GstEncodingProfileClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 namespace Gst
40 { class EncodingProfile_Class; } // namespace Gst
41 #endif //DOXYGEN_SHOULD_SKIP_THIS
42
43 namespace Gst
44 {
45
46 class Caps;
47
48 /** Gst::EncodingProfile can be provided to the 'encodebin' element, which will take
49 * care of selecting and setting up the required elements to produce an output stream
50 * conforming to the specifications of the profile.
51 *
52 * TODO update example
53 *
54 * Last reviewed on 2016-05-21 (1.8.0).
55 *
56 */
57
58 class EncodingProfile : public Gst::Object
59 {
60
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62
63 public:
64 using CppObjectType = EncodingProfile;
65 using CppClassType = EncodingProfile_Class;
66 using BaseObjectType = GstEncodingProfile;
67 using BaseClassType = GstEncodingProfileClass;
68
69 // noncopyable
70 EncodingProfile(const EncodingProfile&) = delete;
71 EncodingProfile& operator=(const EncodingProfile&) = delete;
72
73 private: friend class EncodingProfile_Class;
74 static CppClassType encodingprofile_class_;
75
76 protected:
77 explicit EncodingProfile(const Glib::ConstructParams& construct_params);
78 explicit EncodingProfile(GstEncodingProfile* castitem);
79
80 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
81
82 public:
83
84 EncodingProfile(EncodingProfile&& src) noexcept;
85 EncodingProfile& operator=(EncodingProfile&& src) noexcept;
86
87 ~EncodingProfile() noexcept override;
88
89 /** Get the GType for this class, for use with the underlying GObject type system.
90 */
91 static GType get_type() G_GNUC_CONST;
92
93 #ifndef DOXYGEN_SHOULD_SKIP_THIS
94
95
96 static GType get_base_type() G_GNUC_CONST;
97 #endif
98
99 ///Provides access to the underlying C GObject.
100 GstEncodingProfile* gobj() { return reinterpret_cast<GstEncodingProfile*>(gobject_); }
101
102 ///Provides access to the underlying C GObject.
103 const GstEncodingProfile* gobj() const { return reinterpret_cast<GstEncodingProfile*>(gobject_); }
104
105 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
106 GstEncodingProfile* gobj_copy();
107
108 private:
109
110
111 public:
112
113 /** @return The name of the profile, can be <tt>nullptr</tt>.
114 */
115 Glib::ustring get_name() const;
116
117 /** @return The description of the profile, can be <tt>nullptr</tt>.
118 */
119 Glib::ustring get_description() const;
120
121 /** @return The Gst::Caps corresponding to the media format used
122 * in the profile. Unref after usage.
123 */
124 Glib::RefPtr<Gst::Caps> get_format();
125
126 /** @return The Gst::Caps corresponding to the media format used
127 * in the profile. Unref after usage.
128 */
129 Glib::RefPtr<const Gst::Caps> get_format() const;
130
131 /** @return The name of the Gst::Preset to be used in the profile.
132 * This is the name that has been set when saving the preset.
133 */
134 Glib::ustring get_preset() const;
135
136 /** @return The name of the Gst::Preset factory to be used in the profile.
137 */
138 Glib::ustring get_preset_name() const;
139
140 /** @return The number of times the profile is used in its parent
141 * container profile. If 0, it is not a mandatory stream.
142 */
143 guint get_presence() const;
144
145 /** @return The restriction Gst::Caps to apply before the encoder
146 * that will be used in the profile. The fields present in restriction caps are
147 * properties of the raw stream (that is before encoding), such as height and
148 * width for video and depth and sampling rate for audio. Does not apply to
149 * Gst::EncodingContainerProfile (since there is no corresponding raw stream).
150 * Can be <tt>nullptr</tt>. Unref after usage.
151 */
152 Glib::RefPtr<Gst::Caps> get_restriction();
153
154 /** @return The restriction Gst::Caps to apply before the encoder
155 * that will be used in the profile. The fields present in restriction caps are
156 * properties of the raw stream (that is before encoding), such as height and
157 * width for video and depth and sampling rate for audio. Does not apply to
158 * Gst::EncodingContainerProfile (since there is no corresponding raw stream).
159 * Can be <tt>nullptr</tt>. Unref after usage.
160 */
161 Glib::RefPtr<const Gst::Caps> get_restriction() const;
162
163 /** @return A suitable file extension for @a profile, or <tt>nullptr</tt>.
164 */
165 Glib::ustring get_file_extension() const;
166
167 /** Set @a name as the given name for the @a profile. A copy of @a name will be made
168 * internally.
169 *
170 * @param name The name to set on the profile.
171 */
172 void set_name(const Glib::ustring& name);
173
174 /** Set @a name as the given description for the @a profile. A copy of
175 * @a name will be made internally.
176 *
177 * @param name The description to set on the profile.
178 */
179 void set_description(const Glib::ustring& name);
180
181 /** Set whether the profile should be used or not.
182 *
183 * @param enabled <tt>false</tt> to disable #profile, <tt>true</tt> to enable it.
184 */
185 void set_enabled(bool enabled);
186
187 /** Sets the media format used in the profile.
188 *
189 * @param format The media format to use in the profile.
190 */
191 void set_format(const Glib::RefPtr<Gst::Caps>& format);
192
193 /** Sets the name of the Gst::Element that implements the Gst::Preset interface
194 * to use for the profile.
195 * This is the name that has been set when saving the preset.
196 *
197 * @param preset The element preset to use.
198 */
199 void set_preset(const Glib::ustring& preset);
200
201 /** Sets the name of the Gst::Preset's factory to be used in the profile.
202 *
203 * @param preset_name The name of the preset to use in this @a profile.
204 */
205 void set_preset_name(const Glib::ustring& preset_name);
206
207 /** Set the restriction Gst::Caps to apply before the encoder
208 * that will be used in the profile. See gst_encoding_profile_get_restriction()
209 * for more about restrictions. Does not apply to Gst::EncodingContainerProfile.
210 *
211 * @param restriction The restriction to apply.
212 */
213 void set_restriction(const Glib::RefPtr<Gst::Caps>& restriction);
214
215 /** Set the number of time the profile is used in its parent
216 * container profile. If 0, it is not a mandatory stream
217 *
218 * @param presence The number of time the profile can be used.
219 */
220 void set_presence(guint presence);
221
222 /** Checks whether the two Gst::EncodingProfile are equal
223 *
224 * @param profile2 A Gst::EncodingProfile.
225 * @return <tt>true</tt> if @a a and @a profile2 are equal, else <tt>false</tt>.
226 */
227 bool is_equal(const Glib::RefPtr<Gst::EncodingProfile>& profile2) const;
228
229 bool is_enabled() const;
230
231 /** Computes the full output caps that this @a profile will be able to consume.
232 *
233 * @return The full caps the given @a profile can consume. Call
234 * Gst::Caps::unref() when you are done with the caps.
235 */
236 Glib::RefPtr<Gst::Caps> get_input_caps() const;
237
238 /** @return The human-readable name of the type of @a profile.
239 */
240 Glib::ustring get_type_nick() const;
241
242
243 /** Get whether the format that has been negotiated in at some point can be renegotiated
244 * later during the encoding.
245 */
246 bool get_allow_dynamic_output() const;
247
248 /** Sets whether the format that has been negotiated in at some point can be renegotiated
249 * later during the encoding.
250 *
251 * @param allow_dynamic_output Whether the format that has been negotiated first can be renegotiated
252 * during the encoding.
253 */
254 void set_allow_dynamic_output(bool allow_dynamic_output);
255
256 //gtkmmproc error: restriction-caps : property defs lookup failed.
257
258
259 public:
260
261 public:
262 //C++ methods used to invoke GTK+ virtual functions:
263
264 protected:
265 //GTK+ Virtual Functions (override these to change behaviour):
266
267 //Default Signal Handlers::
268
269
270 };
271
272 } // namespace Gst
273
274
275 namespace Glib
276 {
277 /** A Glib::wrap() method for this object.
278 *
279 * @param object The C instance.
280 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
281 * @result A C++ instance that wraps this C instance.
282 *
283 * @relates Gst::EncodingProfile
284 */
285 Glib::RefPtr<Gst::EncodingProfile> wrap(GstEncodingProfile* object, bool take_copy = false);
286 }
287
288
289 #endif /* _GSTREAMERMM_ENCODINGPROFILE_H */
290