Debian Codegraph @

gstreamer/gstreamermm/appsink.cc

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2
3
4 #include <gstreamermmconfig.h>
5 #ifndef GSTREAMERMM_DISABLE_DEPRECATED
6
7
8 #include <glibmm.h>
9
10 #include <gstreamermm/appsink.h>
11 #include <gstreamermm/private/appsink_p.h>
12
13
14 // Generated by generate_plugin_gmmproc_file. Don't edit this file.
15
16
17 extern "C"
18 {
19
20 GType gst_app_sink_gstreamermm_get_type()
21 {
22 static GType type = 0;
23 GstElementFactory* factory = 0;
24 GstPluginFeature* feature = 0;
25
26 if(!type)
27 {
28 factory = gst_element_factory_find("appsink");
29 // Make sure that the feature is actually loaded:
30 if(factory)
31 {
32 feature =
33 gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));
34
35 g_object_unref(factory);
36 factory = GST_ELEMENT_FACTORY(feature);
37 type = gst_element_factory_get_element_type(factory);
38 g_object_unref(factory);
39 }
40 }
41
42 return type;
43 }
44
45 } // extern "C"
46
47 namespace Gst
48 {
49
50 AppSink::AppSink()
51 : // Mark this class as non-derived to allow C++ vfuncs to be skipped.
52 Glib::ObjectBase(nullptr),
53 Gst::BaseSink(Glib::ConstructParams(appsink_class_.init(), "name",static_cast<char*>(0), nullptr))
54 {}
55
56 AppSink::AppSink(const Glib::ustring& name)
57 : // Mark this class as non-derived to allow C++ vfuncs to be skipped.
58 Glib::ObjectBase(nullptr),
59 Gst::BaseSink(Glib::ConstructParams(appsink_class_.init(), "name",name.c_str(), nullptr))
60 {}
61
62 Glib::RefPtr<Gst::Sample> AppSink::pull_preroll()
63 {
64 GstSample* result;
65 g_signal_emit_by_name(gobj(), "pull-preroll", &result, static_cast<void*>(0));
66 return Glib::wrap(result);
67 }
68
69 Glib::RefPtr<Gst::Sample> AppSink::pull_sample()
70 {
71 GstSample* result;
72 g_signal_emit_by_name(gobj(), "pull-sample", &result, static_cast<void*>(0));
73 return Glib::wrap(result);
74 }
75
76 Glib::RefPtr<Gst::Sample> AppSink::try_pull_preroll(guint64 arg0)
77 {
78 GstSample* result;
79 g_signal_emit_by_name(gobj(), "try-pull-preroll", arg0, &result, static_cast<void*>(0));
80 return Glib::wrap(result);
81 }
82
83 Glib::RefPtr<Gst::Sample> AppSink::try_pull_sample(guint64 arg0)
84 {
85 GstSample* result;
86 g_signal_emit_by_name(gobj(), "try-pull-sample", arg0, &result, static_cast<void*>(0));
87 return Glib::wrap(result);
88 }
89
90 }
91
92 namespace
93 {
94
95
96 static const Glib::SignalProxyInfo AppSink_signal_eos_info =
97 {
98 "eos",
99 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
100 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
101 };
102
103
104 static GstFlowReturn AppSink_signal_new_preroll_callback(GstAppSink* self, void* data)
105 {
106 using namespace Gst;
107 using SlotType = sigc::slot< Gst::FlowReturn >;
108
109 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
110 // Do not try to call a signal on a disassociated wrapper.
111 if(obj)
112 {
113 try
114 {
115 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
116 return ((GstFlowReturn)((*static_cast<SlotType*>(slot))()));
117 }
118 catch(...)
119 {
120 Glib::exception_handlers_invoke();
121 }
122 }
123
124 using RType = GstFlowReturn;
125 return RType();
126 }
127
128 static GstFlowReturn AppSink_signal_new_preroll_notify_callback(GstAppSink* self, void* data)
129 {
130 using namespace Gst;
131 using SlotType = sigc::slot< void >;
132
133 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
134 // Do not try to call a signal on a disassociated wrapper.
135 if(obj)
136 {
137 try
138 {
139 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
140 (*static_cast<SlotType*>(slot))();
141 }
142 catch(...)
143 {
144 Glib::exception_handlers_invoke();
145 }
146 }
147
148 using RType = GstFlowReturn;
149 return RType();
150 }
151
152 static const Glib::SignalProxyInfo AppSink_signal_new_preroll_info =
153 {
154 "new-preroll",
155 (GCallback) &AppSink_signal_new_preroll_callback,
156 (GCallback) &AppSink_signal_new_preroll_notify_callback
157 };
158
159
160 static GstFlowReturn AppSink_signal_new_sample_callback(GstAppSink* self, void* data)
161 {
162 using namespace Gst;
163 using SlotType = sigc::slot< Gst::FlowReturn >;
164
165 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
166 // Do not try to call a signal on a disassociated wrapper.
167 if(obj)
168 {
169 try
170 {
171 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
172 return ((GstFlowReturn)((*static_cast<SlotType*>(slot))()));
173 }
174 catch(...)
175 {
176 Glib::exception_handlers_invoke();
177 }
178 }
179
180 using RType = GstFlowReturn;
181 return RType();
182 }
183
184 static GstFlowReturn AppSink_signal_new_sample_notify_callback(GstAppSink* self, void* data)
185 {
186 using namespace Gst;
187 using SlotType = sigc::slot< void >;
188
189 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
190 // Do not try to call a signal on a disassociated wrapper.
191 if(obj)
192 {
193 try
194 {
195 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
196 (*static_cast<SlotType*>(slot))();
197 }
198 catch(...)
199 {
200 Glib::exception_handlers_invoke();
201 }
202 }
203
204 using RType = GstFlowReturn;
205 return RType();
206 }
207
208 static const Glib::SignalProxyInfo AppSink_signal_new_sample_info =
209 {
210 "new-sample",
211 (GCallback) &AppSink_signal_new_sample_callback,
212 (GCallback) &AppSink_signal_new_sample_notify_callback
213 };
214
215
216 static GstSample* AppSink_signal_pull_preroll_callback(GstAppSink* self, void* data)
217 {
218 using namespace Gst;
219 using SlotType = sigc::slot< Glib::RefPtr<Gst::Sample> >;
220
221 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
222 // Do not try to call a signal on a disassociated wrapper.
223 if(obj)
224 {
225 try
226 {
227 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
228 return ((*static_cast<SlotType*>(slot))())->gobj_copy();
229 }
230 catch(...)
231 {
232 Glib::exception_handlers_invoke();
233 }
234 }
235
236 using RType = GstSample*;
237 return RType();
238 }
239
240 static GstSample* AppSink_signal_pull_preroll_notify_callback(GstAppSink* self, void* data)
241 {
242 using namespace Gst;
243 using SlotType = sigc::slot< void >;
244
245 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
246 // Do not try to call a signal on a disassociated wrapper.
247 if(obj)
248 {
249 try
250 {
251 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
252 (*static_cast<SlotType*>(slot))();
253 }
254 catch(...)
255 {
256 Glib::exception_handlers_invoke();
257 }
258 }
259
260 using RType = GstSample*;
261 return RType();
262 }
263
264 static const Glib::SignalProxyInfo AppSink_signal_pull_preroll_info =
265 {
266 "pull-preroll",
267 (GCallback) &AppSink_signal_pull_preroll_callback,
268 (GCallback) &AppSink_signal_pull_preroll_notify_callback
269 };
270
271
272 static GstSample* AppSink_signal_pull_sample_callback(GstAppSink* self, void* data)
273 {
274 using namespace Gst;
275 using SlotType = sigc::slot< Glib::RefPtr<Gst::Sample> >;
276
277 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
278 // Do not try to call a signal on a disassociated wrapper.
279 if(obj)
280 {
281 try
282 {
283 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
284 return ((*static_cast<SlotType*>(slot))())->gobj_copy();
285 }
286 catch(...)
287 {
288 Glib::exception_handlers_invoke();
289 }
290 }
291
292 using RType = GstSample*;
293 return RType();
294 }
295
296 static GstSample* AppSink_signal_pull_sample_notify_callback(GstAppSink* self, void* data)
297 {
298 using namespace Gst;
299 using SlotType = sigc::slot< void >;
300
301 auto obj = dynamic_cast<AppSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
302 // Do not try to call a signal on a disassociated wrapper.
303 if(obj)
304 {
305 try
306 {
307 if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
308 (*static_cast<SlotType*>(slot))();
309 }
310 catch(...)
311 {
312 Glib::exception_handlers_invoke();
313 }
314 }
315
316 using RType = GstSample*;
317 return RType();
318 }
319
320 static const Glib::SignalProxyInfo AppSink_signal_pull_sample_info =
321 {
322 "pull-sample",
323 (GCallback) &AppSink_signal_pull_sample_callback,
324 (GCallback) &AppSink_signal_pull_sample_notify_callback
325 };
326
327
328 } // anonymous namespace
329
330
331 namespace Glib
332 {
333
334 Glib::RefPtr<Gst::AppSink> wrap(GstAppSink* object, bool take_copy)
335 {
336 return Glib::RefPtr<Gst::AppSink>( dynamic_cast<Gst::AppSink*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
337 //We use dynamic_cast<> in case of multiple inheritance.
338 }
339
340 } /* namespace Glib */
341
342
343 namespace Gst
344 {
345
346
347 /* The *_Class implementation: */
348
349 const Glib::Class& AppSink_Class::init()
350 {
351 if(!gtype_) // create the GType if necessary
352 {
353 // Glib::Class has to know the class init function to clone custom types.
354 class_init_func_ = &AppSink_Class::class_init_function;
355
356 // This is actually just optimized away, apparently with no harm.
357 // Make sure that the parent type has been created.
358 //CppClassParent::CppObjectType::get_type();
359
360 // Create the wrapper type, with the same class/instance size as the base type.
361 register_derived_type(gst_app_sink_gstreamermm_get_type());
362
363 // Add derived versions of interfaces, if the C type implements any interfaces:
364 Gst::URIHandler::add_interface(get_type());
365
366 }
367
368 return *this;
369 }
370
371
372 void AppSink_Class::class_init_function(void* g_class, void* class_data)
373 {
374 const auto klass = static_cast<BaseClassType*>(g_class);
375 CppClassParent::class_init_function(klass, class_data);
376
377
378 }
379
380
381 Glib::ObjectBase* AppSink_Class::wrap_new(GObject* object)
382 {
383 return new AppSink((GstAppSink*)object);
384 }
385
386
387 /* The implementation: */
388
389 GstAppSink* AppSink::gobj_copy()
390 {
391 reference();
392 return gobj();
393 }
394
395 AppSink::AppSink(const Glib::ConstructParams& construct_params)
396 :
397 Gst::BaseSink(construct_params)
398 {
399
400 }
401
402 AppSink::AppSink(GstAppSink* castitem)
403 :
404 Gst::BaseSink((GstBaseSink*)(castitem))
405 {}
406
407
408 AppSink::AppSink(AppSink&& src) noexcept
409 : Gst::BaseSink(std::move(src))
410 , Gst::URIHandler(std::move(src))
411 {}
412
413 AppSink& AppSink::operator=(AppSink&& src) noexcept
414 {
415 Gst::BaseSink::operator=(std::move(src));
416 Gst::URIHandler::operator=(std::move(src));
417 return *this;
418 }
419
420
421 AppSink::~AppSink() noexcept
422 {}
423
424
425 AppSink::CppClassType AppSink::appsink_class_; // initialize static member
426
427 GType AppSink::get_type()
428 {
429 return appsink_class_.init().get_type();
430 }
431
432
433 GType AppSink::get_base_type()
434 {
435 return gst_app_sink_gstreamermm_get_type();
436 }
437
438
439 Glib::RefPtr<AppSink> AppSink::create()
440 {
441 return Glib::RefPtr<AppSink>( new AppSink() );
442 }
443
444 Glib::RefPtr<AppSink> AppSink::create(const Glib::ustring& name)
445 {
446 return Glib::RefPtr<AppSink>( new AppSink(name) );
447 }
448
449
450 Glib::SignalProxy< void > AppSink::signal_eos()
451 {
452 return Glib::SignalProxy< void >(this, &AppSink_signal_eos_info);
453 }
454
455
456 Glib::SignalProxy< Gst::FlowReturn > AppSink::signal_new_preroll()
457 {
458 return Glib::SignalProxy< Gst::FlowReturn >(this, &AppSink_signal_new_preroll_info);
459 }
460
461
462 Glib::SignalProxy< Gst::FlowReturn > AppSink::signal_new_sample()
463 {
464 return Glib::SignalProxy< Gst::FlowReturn >(this, &AppSink_signal_new_sample_info);
465 }
466
467
468 Glib::SignalProxy< Glib::RefPtr<Gst::Sample> > AppSink::signal_pull_preroll()
469 {
470 return Glib::SignalProxy< Glib::RefPtr<Gst::Sample> >(this, &AppSink_signal_pull_preroll_info);
471 }
472
473
474 Glib::SignalProxy< Glib::RefPtr<Gst::Sample> > AppSink::signal_pull_sample()
475 {
476 return Glib::SignalProxy< Glib::RefPtr<Gst::Sample> >(this, &AppSink_signal_pull_sample_info);
477 }
478
479
480 Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> > AppSink::property_caps()
481 {
482 return Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> >(this, "caps");
483 }
484
485 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > AppSink::property_caps() const
486 {
487 return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> >(this, "caps");
488 }
489
490 Glib::PropertyProxy_ReadOnly< bool > AppSink::property_eos() const
491 {
492 return Glib::PropertyProxy_ReadOnly< bool >(this, "eos");
493 }
494
495 Glib::PropertyProxy< bool > AppSink::property_emit_signals()
496 {
497 return Glib::PropertyProxy< bool >(this, "emit-signals");
498 }
499
500 Glib::PropertyProxy_ReadOnly< bool > AppSink::property_emit_signals() const
501 {
502 return Glib::PropertyProxy_ReadOnly< bool >(this, "emit-signals");
503 }
504
505 Glib::PropertyProxy< guint > AppSink::property_max_buffers()
506 {
507 return Glib::PropertyProxy< guint >(this, "max-buffers");
508 }
509
510 Glib::PropertyProxy_ReadOnly< guint > AppSink::property_max_buffers() const
511 {
512 return Glib::PropertyProxy_ReadOnly< guint >(this, "max-buffers");
513 }
514
515 Glib::PropertyProxy< bool > AppSink::property_drop()
516 {
517 return Glib::PropertyProxy< bool >(this, "drop");
518 }
519
520 Glib::PropertyProxy_ReadOnly< bool > AppSink::property_drop() const
521 {
522 return Glib::PropertyProxy_ReadOnly< bool >(this, "drop");
523 }
524
525 Glib::PropertyProxy< bool > AppSink::property_wait_on_eos()
526 {
527 return Glib::PropertyProxy< bool >(this, "wait-on-eos");
528 }
529
530 Glib::PropertyProxy_ReadOnly< bool > AppSink::property_wait_on_eos() const
531 {
532 return Glib::PropertyProxy_ReadOnly< bool >(this, "wait-on-eos");
533 }
534
535
536 } // namespace Gst
537
538 #endif // GSTREAMERMM_DISABLE_DEPRECATED
539
540