Debian Codegraph @

gstreamer/gstreamermm/appsrc.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_APPSRC_H
3 #define _GSTREAMERMM_APPSRC_H
4
5 #include <gstreamermmconfig.h>
6
7 #ifndef GSTREAMERMM_DISABLE_DEPRECATED
8
9
10 #include <glibmm/ustring.h>
11 #include <sigc++/sigc++.h>
12
13 // Generated by generate_plugin_gmmproc_file. Don't edit this file.
14
15
16 #include <gstreamermm/basesrc.h>
17 #include <gstreamermm/caps.h>
18 #include <gstreamermm/format.h>
19 #include <gstreamermm/pad.h>
20 #include <gstreamermm/buffer.h>
21 #include <gstreamermm/sample.h>
22 #include <gstreamermm/urihandler.h>
23
24
25 // Plug-in C enums used in signals:
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 using GstAppSrc = struct _GstAppSrc;
28 using GstAppSrcClass = struct _GstAppSrcClass;
29 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 namespace Gst
34 { class AppSrc_Class; } // namespace Gst
35 #endif //DOXYGEN_SHOULD_SKIP_THIS
36
37 namespace Gst
38 {
39
40 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
41
42 /**
43 * @var AppStreamType APP_STREAM_TYPE_STREAM
44 * No seeking is supported in the stream, such as a
45 * live stream.
46 *
47 * @var AppStreamType APP_STREAM_TYPE_SEEKABLE
48 * The stream is seekable but seeking might not
49 * be very fast, such as data from a webserver.
50 *
51 * @var AppStreamType APP_STREAM_TYPE_RANDOM_ACCESS
52 * The stream is seekable and seeking is fast,
53 * such as in a local file.
54 *
55 * @enum AppStreamType
56 *
57 * The stream type.
58 *
59 * @ingroup gstreamermmEnums
60 */
61 enum AppStreamType
62 {
63 APP_STREAM_TYPE_STREAM,
64 APP_STREAM_TYPE_SEEKABLE,
65 APP_STREAM_TYPE_RANDOM_ACCESS
66 };
67
68 } // namespace Gst
69
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 namespace Glib
72 {
73
74 template <>
75 class Value<Gst::AppStreamType> : public Glib::Value_Enum<Gst::AppStreamType>
76 {
77 public:
78 static GType value_type() G_GNUC_CONST;
79 };
80
81 } // namespace Glib
82 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
83
84 namespace Gst
85 {
86
87
88 /** A Wrapper for the appsrc plugin.
89 * Please note that not all plug-ins are available on all systems so care
90 * must be taken that they exist before they are used otherwise there will
91 * be errors and possibly a crash.
92 *
93 * @ingroup GstPlugins
94 * @deprecated Plugins API is deprecated, and should not be used in a new code.
95 */
96
97 class AppSrc
98 : public Gst::BaseSrc, public Gst::URIHandler
99 {
100
101 #ifndef DOXYGEN_SHOULD_SKIP_THIS
102
103 public:
104 using CppObjectType = AppSrc;
105 using CppClassType = AppSrc_Class;
106 using BaseObjectType = GstAppSrc;
107 using BaseClassType = GstAppSrcClass;
108
109 // noncopyable
110 AppSrc(const AppSrc&) = delete;
111 AppSrc& operator=(const AppSrc&) = delete;
112
113 private: friend class AppSrc_Class;
114 static CppClassType appsrc_class_;
115
116 protected:
117 explicit AppSrc(const Glib::ConstructParams& construct_params);
118 explicit AppSrc(GstAppSrc* castitem);
119
120 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
121
122 public:
123
124 AppSrc(AppSrc&& src) noexcept;
125 AppSrc& operator=(AppSrc&& src) noexcept;
126
127 ~AppSrc() noexcept override;
128
129 /** Get the GType for this class, for use with the underlying GObject type system.
130 */
131 static GType get_type() G_GNUC_CONST;
132
133 #ifndef DOXYGEN_SHOULD_SKIP_THIS
134
135
136 static GType get_base_type() G_GNUC_CONST;
137 #endif
138
139 ///Provides access to the underlying C GObject.
140 GstAppSrc* gobj() { return reinterpret_cast<GstAppSrc*>(gobject_); }
141
142 ///Provides access to the underlying C GObject.
143 const GstAppSrc* gobj() const { return reinterpret_cast<GstAppSrc*>(gobject_); }
144
145 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
146 GstAppSrc* gobj_copy();
147
148 private:
149
150
151 protected:
152 AppSrc();
153 explicit AppSrc(const Glib::ustring& name);
154
155 public:
156 /** Creates a new appsrc plugin with a unique name.
157 */
158
159 static Glib::RefPtr<AppSrc> create();
160
161
162 /** Creates a new appsrc plugin with the given name.
163 */
164
165 static Glib::RefPtr<AppSrc> create(const Glib::ustring& name);
166
167
168 /** This is a convenience method for the action signal
169 * signal_push_buffer().
170 */
171 Gst::FlowReturn push_buffer(const Glib::RefPtr<Gst::Buffer>& arg0);
172
173 /** This is a convenience method for the action signal
174 * signal_push_sample().
175 */
176 Gst::FlowReturn push_sample(const Glib::RefPtr<Gst::Sample>& arg0);
177
178 /** This is a convenience method for the action signal
179 * signal_end_of_stream().
180 */
181 Gst::FlowReturn end_of_stream();
182
183
184 /** The allowed caps for the src pad.
185 *
186 * @return A PropertyProxy that allows you to get or set the value of the property,
187 * or receive notification when the value of the property changes.
188 */
189 Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> > property_caps() ;
190
191 /** The allowed caps for the src pad.
192 *
193 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
194 * or receive notification when the value of the property changes.
195 */
196 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > property_caps() const;
197
198 /** The size of the data stream in bytes (-1 if unknown).
199 *
200 * @return A PropertyProxy that allows you to get or set the value of the property,
201 * or receive notification when the value of the property changes.
202 */
203 Glib::PropertyProxy< gint64 > property_size() ;
204
205 /** The size of the data stream in bytes (-1 if unknown).
206 *
207 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
208 * or receive notification when the value of the property changes.
209 */
210 Glib::PropertyProxy_ReadOnly< gint64 > property_size() const;
211
212 /** the type of the stream.
213 *
214 * @return A PropertyProxy that allows you to get or set the value of the property,
215 * or receive notification when the value of the property changes.
216 */
217 Glib::PropertyProxy< Gst::AppStreamType > property_stream_type() ;
218
219 /** the type of the stream.
220 *
221 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
222 * or receive notification when the value of the property changes.
223 */
224 Glib::PropertyProxy_ReadOnly< Gst::AppStreamType > property_stream_type() const;
225
226 /** The maximum number of bytes to queue internally (0 = unlimited).
227 *
228 * @return A PropertyProxy that allows you to get or set the value of the property,
229 * or receive notification when the value of the property changes.
230 */
231 Glib::PropertyProxy< guint64 > property_max_bytes() ;
232
233 /** The maximum number of bytes to queue internally (0 = unlimited).
234 *
235 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
236 * or receive notification when the value of the property changes.
237 */
238 Glib::PropertyProxy_ReadOnly< guint64 > property_max_bytes() const;
239
240 /** The format of the segment events and seek.
241 *
242 * @return A PropertyProxy that allows you to get or set the value of the property,
243 * or receive notification when the value of the property changes.
244 */
245 Glib::PropertyProxy< Gst::Format > property_format() ;
246
247 /** The format of the segment events and seek.
248 *
249 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
250 * or receive notification when the value of the property changes.
251 */
252 Glib::PropertyProxy_ReadOnly< Gst::Format > property_format() const;
253
254 /** Block push-buffer when max-bytes are queued.
255 *
256 * @return A PropertyProxy that allows you to get or set the value of the property,
257 * or receive notification when the value of the property changes.
258 */
259 Glib::PropertyProxy< bool > property_block() ;
260
261 /** Block push-buffer when max-bytes are queued.
262 *
263 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
264 * or receive notification when the value of the property changes.
265 */
266 Glib::PropertyProxy_ReadOnly< bool > property_block() const;
267
268 /** Whether to act as a live source.
269 *
270 * @return A PropertyProxy that allows you to get or set the value of the property,
271 * or receive notification when the value of the property changes.
272 */
273 Glib::PropertyProxy< bool > property_is_live() ;
274
275 /** Whether to act as a live source.
276 *
277 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
278 * or receive notification when the value of the property changes.
279 */
280 Glib::PropertyProxy_ReadOnly< bool > property_is_live() const;
281
282 /** The minimum latency (-1 = default).
283 *
284 * @return A PropertyProxy that allows you to get or set the value of the property,
285 * or receive notification when the value of the property changes.
286 */
287 Glib::PropertyProxy< gint64 > property_min_latency() ;
288
289 /** The minimum latency (-1 = default).
290 *
291 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
292 * or receive notification when the value of the property changes.
293 */
294 Glib::PropertyProxy_ReadOnly< gint64 > property_min_latency() const;
295
296 /** The maximum latency (-1 = unlimited).
297 *
298 * @return A PropertyProxy that allows you to get or set the value of the property,
299 * or receive notification when the value of the property changes.
300 */
301 Glib::PropertyProxy< gint64 > property_max_latency() ;
302
303 /** The maximum latency (-1 = unlimited).
304 *
305 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
306 * or receive notification when the value of the property changes.
307 */
308 Glib::PropertyProxy_ReadOnly< gint64 > property_max_latency() const;
309
310 /** Emit need-data, enough-data and seek-data signals.
311 *
312 * @return A PropertyProxy that allows you to get or set the value of the property,
313 * or receive notification when the value of the property changes.
314 */
315 Glib::PropertyProxy< bool > property_emit_signals() ;
316
317 /** Emit need-data, enough-data and seek-data signals.
318 *
319 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
320 * or receive notification when the value of the property changes.
321 */
322 Glib::PropertyProxy_ReadOnly< bool > property_emit_signals() const;
323
324 /** Emit need-data when queued bytes drops below this percent of max-bytes.
325 *
326 * @return A PropertyProxy that allows you to get or set the value of the property,
327 * or receive notification when the value of the property changes.
328 */
329 Glib::PropertyProxy< guint > property_min_percent() ;
330
331 /** Emit need-data when queued bytes drops below this percent of max-bytes.
332 *
333 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
334 * or receive notification when the value of the property changes.
335 */
336 Glib::PropertyProxy_ReadOnly< guint > property_min_percent() const;
337
338 /** The number of currently queued bytes.
339 *
340 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
341 * or receive notification when the value of the property changes.
342 */
343 Glib::PropertyProxy_ReadOnly< guint64 > property_current_level_bytes() const;
344
345
346 //gtkmmproc error: duration : property defs lookup failed.
347
348
349 /**
350 * @par Slot Prototype:
351 * <tt>void on_my_%need_data(guint arg0)</tt>
352 *
353 * Signal that the source needs more data. In the callback or from another
354 * thread you should call push-buffer or end-of-stream.
355 *
356 * @a arg0 is just a hint and when it is set to -1, any number of bytes can be
357 * pushed into @a appsrc.
358 *
359 * You can call push-buffer multiple times until the enough-data signal is
360 * fired.
361 *
362 * @param arg0 The amount of bytes needed.
363 */
364
365 Glib::SignalProxy< void,guint > signal_need_data();
366
367
368 /**
369 * @par Slot Prototype:
370 * <tt>void on_my_%enough_data()</tt>
371 *
372 * Signal that the source has enough data. It is recommended that the
373 * application stops calling push-buffer until the need-data signal is
374 * emitted again to avoid excessive buffer queueing.
375 */
376
377 Glib::SignalProxy< void > signal_enough_data();
378
379
380 /**
381 * @par Slot Prototype:
382 * <tt>bool on_my_%seek_data(guint64 arg0)</tt>
383 *
384 * Seek to the given offset. The next push-buffer should produce buffers from
385 * the new @a arg0.
386 * This callback is only called for seekable stream types.
387 *
388 * @param arg0 The offset to seek to.
389 * @return <tt>true</tt> if the seek succeeded.
390 */
391
392 Glib::SignalProxy< bool,guint64 > signal_seek_data();
393
394
395 /** This is an action signal which is designed to be used as a method. To
396 * do that, use its convenience method, push_buffer().
397 *
398 * @par Slot Prototype:
399 * <tt>Gst::FlowReturn on_my_%push_buffer(const Glib::RefPtr<Gst::Buffer>& arg0)</tt>
400 *
401 * Adds a buffer to the queue of buffers that the appsrc element will
402 * push to its source pad. This function does not take ownership of the
403 * buffer so the buffer needs to be unreffed after calling this function.
404 *
405 * When the block property is <tt>true</tt>, this function can block until free space
406 * becomes available in the queue.
407 *
408 * @param arg0 A buffer to push.
409 */
410
411 Glib::SignalProxy< Gst::FlowReturn,const Glib::RefPtr<Gst::Buffer>& > signal_push_buffer();
412
413
414 /** This is an action signal which is designed to be used as a method. To
415 * do that, use its convenience method, push_sample().
416 *
417 * @par Slot Prototype:
418 * <tt>Gst::FlowReturn on_my_%push_sample(const Glib::RefPtr<Gst::Sample>& arg0)</tt>
419 *
420 * Extract a buffer from the provided sample and adds the extracted buffer
421 * to the queue of buffers that the appsrc element will
422 * push to its source pad. This function set the appsrc caps based on the caps
423 * in the sample and reset the caps if they change.
424 * Only the caps and the buffer of the provided sample are used and not
425 * for example the segment in the sample.
426 * This function does not take ownership of the
427 * sample so the sample needs to be unreffed after calling this function.
428 *
429 * When the block property is <tt>true</tt>, this function can block until free space
430 * becomes available in the queue.
431 *
432 * @param arg0 A sample from which extract buffer to push.
433 */
434
435 Glib::SignalProxy< Gst::FlowReturn,const Glib::RefPtr<Gst::Sample>& > signal_push_sample();
436
437
438 /** This is an action signal which is designed to be used as a method. To
439 * do that, use its convenience method, end_of_stream().
440 *
441 * @par Slot Prototype:
442 * <tt>Gst::FlowReturn on_my_%end_of_stream()</tt>
443 *
444 * Notify @a appsrc that no more buffer are available.
445 */
446
447 Glib::SignalProxy< Gst::FlowReturn > signal_end_of_stream();
448
449
450 public:
451
452 public:
453 //C++ methods used to invoke GTK+ virtual functions:
454
455 protected:
456 //GTK+ Virtual Functions (override these to change behaviour):
457
458 //Default Signal Handlers::
459
460
461 };
462
463 } // namespace Gst
464
465
466 namespace Glib
467 {
468 /** A Glib::wrap() method for this object.
469 *
470 * @param object The C instance.
471 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
472 * @result A C++ instance that wraps this C instance.
473 *
474 * @relates Gst::AppSrc
475 */
476 Glib::RefPtr<Gst::AppSrc> wrap(GstAppSrc* object, bool take_copy = false);
477 }
478
479
480 #endif // GSTREAMERMM_DISABLE_DEPRECATED
481
482
483 #endif /* _GSTREAMERMM_APPSRC_H */
484