| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/basesink.h> |
| 7 | #include <gstreamermm/private/basesink_p.h> |
| 8 | |
| 9 | |
| 10 | /* gstreamermm - a C++ wrapper for gstreamer |
| 11 | * |
| 12 | * Copyright 2008-2016 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 | |
| 30 | #define IGNORE_RESULT(x) { auto release_value = x; (void)release_value; } |
| 31 | |
| 32 | namespace Gst { |
| 33 | |
| 34 | gboolean BaseSink_Class::query_vfunc_callback(GstBaseSink* self, GstQuery* query) |
| 35 | { |
| 36 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 37 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 38 | |
| 39 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 40 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 41 | // generated classes can use this optimisation, which avoids the unnecessary |
| 42 | // parameter conversions if there is no possibility of the virtual function |
| 43 | // being overridden: |
| 44 | if(obj_base && obj_base->is_derived_()) |
| 45 | { |
| 46 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 47 | if(obj) // This can be NULL during destruction. |
| 48 | { |
| 49 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 50 | { |
| 51 | // Call the virtual member method, which derived classes might override. |
| 52 | auto qurery_wrapper = Glib::wrap(query, false); |
| 53 | int retval = static_cast<int>(obj->base_sink_query_vfunc(qurery_wrapper)); |
| 54 | IGNORE_RESULT(qurery_wrapper.release()); |
| 55 | return retval; |
| 56 | } |
| 57 | catch(...) |
| 58 | { |
| 59 | Glib::exception_handlers_invoke(); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 65 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 66 | ); |
| 67 | |
| 68 | // Call the original underlying C function: |
| 69 | if(base && base->query) |
| 70 | { |
| 71 | gboolean retval = (*base->query)(self, query); |
| 72 | return retval; |
| 73 | } |
| 74 | |
| 75 | typedef gboolean RType; |
| 76 | return RType(); |
| 77 | } |
| 78 | |
| 79 | bool Gst::BaseSink::base_sink_query_vfunc(const Glib::RefPtr<Gst::Query>& query) |
| 80 | { |
| 81 | const auto base = static_cast<BaseClassType*>( |
| 82 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 83 | ); |
| 84 | |
| 85 | if(base && base->query) |
| 86 | { |
| 87 | bool retval((*base->query)(gobj(),Glib::unwrap(query))); |
| 88 | return retval; |
| 89 | } |
| 90 | |
| 91 | typedef bool RType; |
| 92 | return RType(); |
| 93 | } |
| 94 | |
| 95 | |
| 96 | } |
| 97 | |
| 98 | namespace |
| 99 | { |
| 100 | } // anonymous namespace |
| 101 | |
| 102 | |
| 103 | namespace Glib |
| 104 | { |
| 105 | |
| 106 | Glib::RefPtr<Gst::BaseSink> wrap(GstBaseSink* object, bool take_copy) |
| 107 | { |
| 108 | return Glib::RefPtr<Gst::BaseSink>( dynamic_cast<Gst::BaseSink*> (Glib::wrap_auto ((GObject*)(object), take_copy)) ); |
| 109 | //We use dynamic_cast<> in case of multiple inheritance. |
| 110 | } |
| 111 | |
| 112 | } /* namespace Glib */ |
| 113 | |
| 114 | |
| 115 | namespace Gst |
| 116 | { |
| 117 | |
| 118 | |
| 119 | /* The *_Class implementation: */ |
| 120 | |
| 121 | const Glib::Class& BaseSink_Class::init() |
| 122 | { |
| 123 | if(!gtype_) // create the GType if necessary |
| 124 | { |
| 125 | // Glib::Class has to know the class init function to clone custom types. |
| 126 | class_init_func_ = &BaseSink_Class::class_init_function; |
| 127 | |
| 128 | // This is actually just optimized away, apparently with no harm. |
| 129 | // Make sure that the parent type has been created. |
| 130 | //CppClassParent::CppObjectType::get_type(); |
| 131 | |
| 132 | // Create the wrapper type, with the same class/instance size as the base type. |
| 133 | register_derived_type(gst_base_sink_get_type()); |
| 134 | |
| 135 | // Add derived versions of interfaces, if the C type implements any interfaces: |
| 136 | |
| 137 | } |
| 138 | |
| 139 | return *this; |
| 140 | } |
| 141 | |
| 142 | |
| 143 | void BaseSink_Class::class_init_function(void* g_class, void* class_data) |
| 144 | { |
| 145 | const auto klass = static_cast<BaseClassType*>(g_class); |
| 146 | CppClassParent::class_init_function(klass, class_data); |
| 147 | |
| 148 | klass->get_caps = &get_caps_vfunc_callback; |
| 149 | klass->set_caps = &set_caps_vfunc_callback; |
| 150 | klass->get_times = &get_times_vfunc_callback; |
| 151 | klass->start = &start_vfunc_callback; |
| 152 | klass->stop = &stop_vfunc_callback; |
| 153 | klass->unlock = &unlock_vfunc_callback; |
| 154 | klass->event = &event_vfunc_callback; |
| 155 | klass->wait_event = &wait_event_vfunc_callback; |
| 156 | klass->preroll = &preroll_vfunc_callback; |
| 157 | klass->render = &render_vfunc_callback; |
| 158 | klass->activate_pull = &activate_pull_vfunc_callback; |
| 159 | klass->fixate = &fixate_vfunc_callback; |
| 160 | klass->unlock_stop = &unlock_stop_vfunc_callback; |
| 161 | klass->render_list = &render_list_vfunc_callback; |
| 162 | klass->prepare = &prepare_vfunc_callback; |
| 163 | klass->prepare_list = &prepare_list_vfunc_callback; |
| 164 | klass->propose_allocation = &propose_allocation_vfunc_callback; |
| 165 | klass->query = &query_vfunc_callback; |
| 166 | |
| 167 | } |
| 168 | |
| 169 | GstCaps* BaseSink_Class::get_caps_vfunc_callback(GstBaseSink* self, GstCaps* filter) |
| 170 | { |
| 171 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 172 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 173 | |
| 174 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 175 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 176 | // generated classes can use this optimisation, which avoids the unnecessary |
| 177 | // parameter conversions if there is no possibility of the virtual function |
| 178 | // being overridden: |
| 179 | if(obj_base && obj_base->is_derived_()) |
| 180 | { |
| 181 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 182 | if(obj) // This can be NULL during destruction. |
| 183 | { |
| 184 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 185 | { |
| 186 | // Call the virtual member method, which derived classes might override. |
| 187 | return Glib::unwrap_copy(obj->get_caps_vfunc(Glib::wrap(filter, true) |
| 188 | )); |
| 189 | } |
| 190 | catch(...) |
| 191 | { |
| 192 | Glib::exception_handlers_invoke(); |
| 193 | } |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 198 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 199 | ); |
| 200 | |
| 201 | // Call the original underlying C function: |
| 202 | if(base && base->get_caps) |
| 203 | return (*base->get_caps)(self, filter); |
| 204 | |
| 205 | using RType = GstCaps*; |
| 206 | return RType(); |
| 207 | } |
| 208 | gboolean BaseSink_Class::set_caps_vfunc_callback(GstBaseSink* self, GstCaps* caps) |
| 209 | { |
| 210 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 211 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 212 | |
| 213 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 214 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 215 | // generated classes can use this optimisation, which avoids the unnecessary |
| 216 | // parameter conversions if there is no possibility of the virtual function |
| 217 | // being overridden: |
| 218 | if(obj_base && obj_base->is_derived_()) |
| 219 | { |
| 220 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 221 | if(obj) // This can be NULL during destruction. |
| 222 | { |
| 223 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 224 | { |
| 225 | // Call the virtual member method, which derived classes might override. |
| 226 | return static_cast<int>(obj->set_caps_vfunc(Glib::wrap(caps, true) |
| 227 | )); |
| 228 | } |
| 229 | catch(...) |
| 230 | { |
| 231 | Glib::exception_handlers_invoke(); |
| 232 | } |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 237 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 238 | ); |
| 239 | |
| 240 | // Call the original underlying C function: |
| 241 | if(base && base->set_caps) |
| 242 | return (*base->set_caps)(self, caps); |
| 243 | |
| 244 | return static_cast<int>(true); |
| 245 | } |
| 246 | void BaseSink_Class::get_times_vfunc_callback(GstBaseSink* self, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) |
| 247 | { |
| 248 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 249 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 250 | |
| 251 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 252 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 253 | // generated classes can use this optimisation, which avoids the unnecessary |
| 254 | // parameter conversions if there is no possibility of the virtual function |
| 255 | // being overridden: |
| 256 | if(obj_base && obj_base->is_derived_()) |
| 257 | { |
| 258 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 259 | if(obj) // This can be NULL during destruction. |
| 260 | { |
| 261 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 262 | { |
| 263 | // Call the virtual member method, which derived classes might override. |
| 264 | obj->get_times_vfunc(Glib::wrap(buffer, true) |
| 265 | , *(start) |
| 266 | , *(end) |
| 267 | ); |
| 268 | return; |
| 269 | } |
| 270 | catch(...) |
| 271 | { |
| 272 | Glib::exception_handlers_invoke(); |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 278 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 279 | ); |
| 280 | |
| 281 | // Call the original underlying C function: |
| 282 | if(base && base->get_times) |
| 283 | (*base->get_times)(self, buffer, start, end); |
| 284 | } |
| 285 | gboolean BaseSink_Class::start_vfunc_callback(GstBaseSink* self) |
| 286 | { |
| 287 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 288 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 289 | |
| 290 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 291 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 292 | // generated classes can use this optimisation, which avoids the unnecessary |
| 293 | // parameter conversions if there is no possibility of the virtual function |
| 294 | // being overridden: |
| 295 | if(obj_base && obj_base->is_derived_()) |
| 296 | { |
| 297 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 298 | if(obj) // This can be NULL during destruction. |
| 299 | { |
| 300 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 301 | { |
| 302 | // Call the virtual member method, which derived classes might override. |
| 303 | return static_cast<int>(obj->start_vfunc()); |
| 304 | } |
| 305 | catch(...) |
| 306 | { |
| 307 | Glib::exception_handlers_invoke(); |
| 308 | } |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 313 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 314 | ); |
| 315 | |
| 316 | // Call the original underlying C function: |
| 317 | if(base && base->start) |
| 318 | return (*base->start)(self); |
| 319 | |
| 320 | return static_cast<int>(true); |
| 321 | } |
| 322 | gboolean BaseSink_Class::stop_vfunc_callback(GstBaseSink* self) |
| 323 | { |
| 324 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 325 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 326 | |
| 327 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 328 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 329 | // generated classes can use this optimisation, which avoids the unnecessary |
| 330 | // parameter conversions if there is no possibility of the virtual function |
| 331 | // being overridden: |
| 332 | if(obj_base && obj_base->is_derived_()) |
| 333 | { |
| 334 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 335 | if(obj) // This can be NULL during destruction. |
| 336 | { |
| 337 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 338 | { |
| 339 | // Call the virtual member method, which derived classes might override. |
| 340 | return static_cast<int>(obj->stop_vfunc()); |
| 341 | } |
| 342 | catch(...) |
| 343 | { |
| 344 | Glib::exception_handlers_invoke(); |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 350 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 351 | ); |
| 352 | |
| 353 | // Call the original underlying C function: |
| 354 | if(base && base->stop) |
| 355 | return (*base->stop)(self); |
| 356 | |
| 357 | return static_cast<int>(true); |
| 358 | } |
| 359 | gboolean BaseSink_Class::unlock_vfunc_callback(GstBaseSink* self) |
| 360 | { |
| 361 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 362 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 363 | |
| 364 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 365 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 366 | // generated classes can use this optimisation, which avoids the unnecessary |
| 367 | // parameter conversions if there is no possibility of the virtual function |
| 368 | // being overridden: |
| 369 | if(obj_base && obj_base->is_derived_()) |
| 370 | { |
| 371 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 372 | if(obj) // This can be NULL during destruction. |
| 373 | { |
| 374 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 375 | { |
| 376 | // Call the virtual member method, which derived classes might override. |
| 377 | return static_cast<int>(obj->unlock_vfunc()); |
| 378 | } |
| 379 | catch(...) |
| 380 | { |
| 381 | Glib::exception_handlers_invoke(); |
| 382 | } |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 387 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 388 | ); |
| 389 | |
| 390 | // Call the original underlying C function: |
| 391 | if(base && base->unlock) |
| 392 | return (*base->unlock)(self); |
| 393 | |
| 394 | return static_cast<int>(true); |
| 395 | } |
| 396 | gboolean BaseSink_Class::event_vfunc_callback(GstBaseSink* self, GstEvent* event) |
| 397 | { |
| 398 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 399 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 400 | |
| 401 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 402 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 403 | // generated classes can use this optimisation, which avoids the unnecessary |
| 404 | // parameter conversions if there is no possibility of the virtual function |
| 405 | // being overridden: |
| 406 | if(obj_base && obj_base->is_derived_()) |
| 407 | { |
| 408 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 409 | if(obj) // This can be NULL during destruction. |
| 410 | { |
| 411 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 412 | { |
| 413 | // Call the virtual member method, which derived classes might override. |
| 414 | return static_cast<int>(obj->event_vfunc(Glib::wrap(event, true) |
| 415 | )); |
| 416 | } |
| 417 | catch(...) |
| 418 | { |
| 419 | Glib::exception_handlers_invoke(); |
| 420 | } |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 425 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 426 | ); |
| 427 | |
| 428 | // Call the original underlying C function: |
| 429 | if(base && base->event) |
| 430 | return (*base->event)(self, event); |
| 431 | |
| 432 | return static_cast<int>(true); |
| 433 | } |
| 434 | GstFlowReturn BaseSink_Class::wait_event_vfunc_callback(GstBaseSink* self, GstEvent* event) |
| 435 | { |
| 436 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 437 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 438 | |
| 439 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 440 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 441 | // generated classes can use this optimisation, which avoids the unnecessary |
| 442 | // parameter conversions if there is no possibility of the virtual function |
| 443 | // being overridden: |
| 444 | if(obj_base && obj_base->is_derived_()) |
| 445 | { |
| 446 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 447 | if(obj) // This can be NULL during destruction. |
| 448 | { |
| 449 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 450 | { |
| 451 | // Call the virtual member method, which derived classes might override. |
| 452 | return ((GstFlowReturn)(obj->wait_event_vfunc(Glib::wrap(event, true) |
| 453 | ))); |
| 454 | } |
| 455 | catch(...) |
| 456 | { |
| 457 | Glib::exception_handlers_invoke(); |
| 458 | } |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 463 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 464 | ); |
| 465 | |
| 466 | // Call the original underlying C function: |
| 467 | if(base && base->wait_event) |
| 468 | return (*base->wait_event)(self, event); |
| 469 | |
| 470 | using RType = GstFlowReturn; |
| 471 | return RType(); |
| 472 | } |
| 473 | GstFlowReturn BaseSink_Class::preroll_vfunc_callback(GstBaseSink* self, GstBuffer* buffer) |
| 474 | { |
| 475 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 476 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 477 | |
| 478 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 479 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 480 | // generated classes can use this optimisation, which avoids the unnecessary |
| 481 | // parameter conversions if there is no possibility of the virtual function |
| 482 | // being overridden: |
| 483 | if(obj_base && obj_base->is_derived_()) |
| 484 | { |
| 485 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 486 | if(obj) // This can be NULL during destruction. |
| 487 | { |
| 488 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 489 | { |
| 490 | // Call the virtual member method, which derived classes might override. |
| 491 | return ((GstFlowReturn)(obj->preroll_vfunc(Glib::wrap(buffer, true) |
| 492 | ))); |
| 493 | } |
| 494 | catch(...) |
| 495 | { |
| 496 | Glib::exception_handlers_invoke(); |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 502 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 503 | ); |
| 504 | |
| 505 | // Call the original underlying C function: |
| 506 | if(base && base->preroll) |
| 507 | return (*base->preroll)(self, buffer); |
| 508 | |
| 509 | using RType = GstFlowReturn; |
| 510 | return RType(); |
| 511 | } |
| 512 | GstFlowReturn BaseSink_Class::render_vfunc_callback(GstBaseSink* self, GstBuffer* buffer) |
| 513 | { |
| 514 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 515 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 516 | |
| 517 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 518 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 519 | // generated classes can use this optimisation, which avoids the unnecessary |
| 520 | // parameter conversions if there is no possibility of the virtual function |
| 521 | // being overridden: |
| 522 | if(obj_base && obj_base->is_derived_()) |
| 523 | { |
| 524 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 525 | if(obj) // This can be NULL during destruction. |
| 526 | { |
| 527 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 528 | { |
| 529 | // Call the virtual member method, which derived classes might override. |
| 530 | return ((GstFlowReturn)(obj->render_vfunc(Glib::wrap(buffer, true) |
| 531 | ))); |
| 532 | } |
| 533 | catch(...) |
| 534 | { |
| 535 | Glib::exception_handlers_invoke(); |
| 536 | } |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 541 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 542 | ); |
| 543 | |
| 544 | // Call the original underlying C function: |
| 545 | if(base && base->render) |
| 546 | return (*base->render)(self, buffer); |
| 547 | |
| 548 | using RType = GstFlowReturn; |
| 549 | return RType(); |
| 550 | } |
| 551 | gboolean BaseSink_Class::activate_pull_vfunc_callback(GstBaseSink* self, gboolean active) |
| 552 | { |
| 553 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 554 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 555 | |
| 556 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 557 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 558 | // generated classes can use this optimisation, which avoids the unnecessary |
| 559 | // parameter conversions if there is no possibility of the virtual function |
| 560 | // being overridden: |
| 561 | if(obj_base && obj_base->is_derived_()) |
| 562 | { |
| 563 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 564 | if(obj) // This can be NULL during destruction. |
| 565 | { |
| 566 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 567 | { |
| 568 | // Call the virtual member method, which derived classes might override. |
| 569 | return static_cast<int>(obj->activate_pull_vfunc(active |
| 570 | )); |
| 571 | } |
| 572 | catch(...) |
| 573 | { |
| 574 | Glib::exception_handlers_invoke(); |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 580 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 581 | ); |
| 582 | |
| 583 | // Call the original underlying C function: |
| 584 | if(base && base->activate_pull) |
| 585 | return (*base->activate_pull)(self, active); |
| 586 | |
| 587 | return static_cast<int>(true); |
| 588 | } |
| 589 | GstCaps* BaseSink_Class::fixate_vfunc_callback(GstBaseSink* self, GstCaps* caps) |
| 590 | { |
| 591 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 592 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 593 | |
| 594 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 595 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 596 | // generated classes can use this optimisation, which avoids the unnecessary |
| 597 | // parameter conversions if there is no possibility of the virtual function |
| 598 | // being overridden: |
| 599 | if(obj_base && obj_base->is_derived_()) |
| 600 | { |
| 601 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 602 | if(obj) // This can be NULL during destruction. |
| 603 | { |
| 604 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 605 | { |
| 606 | // Call the virtual member method, which derived classes might override. |
| 607 | return Glib::unwrap_copy(obj->fixate_vfunc(Glib::wrap(caps, true) |
| 608 | )); |
| 609 | } |
| 610 | catch(...) |
| 611 | { |
| 612 | Glib::exception_handlers_invoke(); |
| 613 | } |
| 614 | } |
| 615 | } |
| 616 | |
| 617 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 618 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 619 | ); |
| 620 | |
| 621 | // Call the original underlying C function: |
| 622 | if(base && base->fixate) |
| 623 | return (*base->fixate)(self, caps); |
| 624 | |
| 625 | using RType = GstCaps*; |
| 626 | return RType(); |
| 627 | } |
| 628 | gboolean BaseSink_Class::unlock_stop_vfunc_callback(GstBaseSink* self) |
| 629 | { |
| 630 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 631 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 632 | |
| 633 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 634 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 635 | // generated classes can use this optimisation, which avoids the unnecessary |
| 636 | // parameter conversions if there is no possibility of the virtual function |
| 637 | // being overridden: |
| 638 | if(obj_base && obj_base->is_derived_()) |
| 639 | { |
| 640 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 641 | if(obj) // This can be NULL during destruction. |
| 642 | { |
| 643 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 644 | { |
| 645 | // Call the virtual member method, which derived classes might override. |
| 646 | return static_cast<int>(obj->unlock_stop_vfunc()); |
| 647 | } |
| 648 | catch(...) |
| 649 | { |
| 650 | Glib::exception_handlers_invoke(); |
| 651 | } |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 656 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 657 | ); |
| 658 | |
| 659 | // Call the original underlying C function: |
| 660 | if(base && base->unlock_stop) |
| 661 | return (*base->unlock_stop)(self); |
| 662 | |
| 663 | return static_cast<int>(true); |
| 664 | } |
| 665 | GstFlowReturn BaseSink_Class::render_list_vfunc_callback(GstBaseSink* self, GstBufferList* buffer_list) |
| 666 | { |
| 667 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 668 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 669 | |
| 670 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 671 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 672 | // generated classes can use this optimisation, which avoids the unnecessary |
| 673 | // parameter conversions if there is no possibility of the virtual function |
| 674 | // being overridden: |
| 675 | if(obj_base && obj_base->is_derived_()) |
| 676 | { |
| 677 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 678 | if(obj) // This can be NULL during destruction. |
| 679 | { |
| 680 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 681 | { |
| 682 | // Call the virtual member method, which derived classes might override. |
| 683 | return ((GstFlowReturn)(obj->render_list_vfunc(Glib::wrap(buffer_list, true) |
| 684 | ))); |
| 685 | } |
| 686 | catch(...) |
| 687 | { |
| 688 | Glib::exception_handlers_invoke(); |
| 689 | } |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 694 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 695 | ); |
| 696 | |
| 697 | // Call the original underlying C function: |
| 698 | if(base && base->render_list) |
| 699 | return (*base->render_list)(self, buffer_list); |
| 700 | |
| 701 | using RType = GstFlowReturn; |
| 702 | return RType(); |
| 703 | } |
| 704 | GstFlowReturn BaseSink_Class::prepare_vfunc_callback(GstBaseSink* self, GstBuffer* buffer) |
| 705 | { |
| 706 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 707 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 708 | |
| 709 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 710 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 711 | // generated classes can use this optimisation, which avoids the unnecessary |
| 712 | // parameter conversions if there is no possibility of the virtual function |
| 713 | // being overridden: |
| 714 | if(obj_base && obj_base->is_derived_()) |
| 715 | { |
| 716 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 717 | if(obj) // This can be NULL during destruction. |
| 718 | { |
| 719 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 720 | { |
| 721 | // Call the virtual member method, which derived classes might override. |
| 722 | return ((GstFlowReturn)(obj->prepare_vfunc(Glib::wrap(buffer, true) |
| 723 | ))); |
| 724 | } |
| 725 | catch(...) |
| 726 | { |
| 727 | Glib::exception_handlers_invoke(); |
| 728 | } |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 733 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 734 | ); |
| 735 | |
| 736 | // Call the original underlying C function: |
| 737 | if(base && base->prepare) |
| 738 | return (*base->prepare)(self, buffer); |
| 739 | |
| 740 | using RType = GstFlowReturn; |
| 741 | return RType(); |
| 742 | } |
| 743 | GstFlowReturn BaseSink_Class::prepare_list_vfunc_callback(GstBaseSink* self, GstBufferList* buffer_list) |
| 744 | { |
| 745 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 746 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 747 | |
| 748 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 749 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 750 | // generated classes can use this optimisation, which avoids the unnecessary |
| 751 | // parameter conversions if there is no possibility of the virtual function |
| 752 | // being overridden: |
| 753 | if(obj_base && obj_base->is_derived_()) |
| 754 | { |
| 755 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 756 | if(obj) // This can be NULL during destruction. |
| 757 | { |
| 758 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 759 | { |
| 760 | // Call the virtual member method, which derived classes might override. |
| 761 | return ((GstFlowReturn)(obj->prepare_list_vfunc(Glib::wrap(buffer_list, true) |
| 762 | ))); |
| 763 | } |
| 764 | catch(...) |
| 765 | { |
| 766 | Glib::exception_handlers_invoke(); |
| 767 | } |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 772 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 773 | ); |
| 774 | |
| 775 | // Call the original underlying C function: |
| 776 | if(base && base->prepare_list) |
| 777 | return (*base->prepare_list)(self, buffer_list); |
| 778 | |
| 779 | using RType = GstFlowReturn; |
| 780 | return RType(); |
| 781 | } |
| 782 | gboolean BaseSink_Class::propose_allocation_vfunc_callback(GstBaseSink* self, GstQuery* query) |
| 783 | { |
| 784 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 785 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 786 | |
| 787 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 788 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 789 | // generated classes can use this optimisation, which avoids the unnecessary |
| 790 | // parameter conversions if there is no possibility of the virtual function |
| 791 | // being overridden: |
| 792 | if(obj_base && obj_base->is_derived_()) |
| 793 | { |
| 794 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 795 | if(obj) // This can be NULL during destruction. |
| 796 | { |
| 797 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 798 | { |
| 799 | // Call the virtual member method, which derived classes might override. |
| 800 | return static_cast<int>(obj->propose_allocation_vfunc(Glib::wrap(query, true) |
| 801 | )); |
| 802 | } |
| 803 | catch(...) |
| 804 | { |
| 805 | Glib::exception_handlers_invoke(); |
| 806 | } |
| 807 | } |
| 808 | } |
| 809 | |
| 810 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 811 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). |
| 812 | ); |
| 813 | |
| 814 | // Call the original underlying C function: |
| 815 | if(base && base->propose_allocation) |
| 816 | return (*base->propose_allocation)(self, query); |
| 817 | |
| 818 | using RType = gboolean; |
| 819 | return RType(); |
| 820 | } |
| 821 | |
| 822 | |
| 823 | Glib::ObjectBase* BaseSink_Class::wrap_new(GObject* object) |
| 824 | { |
| 825 | return new BaseSink((GstBaseSink*)object); |
| 826 | } |
| 827 | |
| 828 | |
| 829 | /* The implementation: */ |
| 830 | |
| 831 | GstBaseSink* BaseSink::gobj_copy() |
| 832 | { |
| 833 | reference(); |
| 834 | return gobj(); |
| 835 | } |
| 836 | |
| 837 | BaseSink::BaseSink(const Glib::ConstructParams& construct_params) |
| 838 | : |
| 839 | Element(construct_params) |
| 840 | { |
| 841 | |
| 842 | } |
| 843 | |
| 844 | BaseSink::BaseSink(GstBaseSink* castitem) |
| 845 | : |
| 846 | Element((GstElement*)(castitem)) |
| 847 | {} |
| 848 | |
| 849 | |
| 850 | BaseSink::BaseSink(BaseSink&& src) noexcept |
| 851 | : Element(std::move(src)) |
| 852 | {} |
| 853 | |
| 854 | BaseSink& BaseSink::operator=(BaseSink&& src) noexcept |
| 855 | { |
| 856 | Element::operator=(std::move(src)); |
| 857 | return *this; |
| 858 | } |
| 859 | |
| 860 | |
| 861 | BaseSink::~BaseSink() noexcept |
| 862 | {} |
| 863 | |
| 864 | |
| 865 | BaseSink::CppClassType BaseSink::basesink_class_; // initialize static member |
| 866 | |
| 867 | GType BaseSink::get_type() |
| 868 | { |
| 869 | return basesink_class_.init().get_type(); |
| 870 | } |
| 871 | |
| 872 | |
| 873 | GType BaseSink::get_base_type() |
| 874 | { |
| 875 | return gst_base_sink_get_type(); |
| 876 | } |
| 877 | |
| 878 | |
| 879 | bool BaseSink::query_latency(bool& live, bool& upstream_live, Gst::ClockTime& min_latency, Gst::ClockTime& max_latency) const |
| 880 | { |
| 881 | return gst_base_sink_query_latency(const_cast<GstBaseSink*>(gobj()), ((gboolean*) &(live)), ((gboolean*) &(upstream_live)), (GstClockTime*)(&min_latency), (GstClockTime*)(&max_latency)); |
| 882 | } |
| 883 | |
| 884 | Gst::ClockTime BaseSink::get_latency() const |
| 885 | { |
| 886 | return ((Gst::ClockTime)(gst_base_sink_get_latency(const_cast<GstBaseSink*>(gobj())))); |
| 887 | } |
| 888 | |
| 889 | Gst::FlowReturn BaseSink::do_preroll(const Glib::RefPtr<Gst::MiniObject>& obj) |
| 890 | { |
| 891 | return ((Gst::FlowReturn)(gst_base_sink_do_preroll(gobj(), Glib::unwrap(obj)))); |
| 892 | } |
| 893 | |
| 894 | Gst::FlowReturn BaseSink::wait_preroll() |
| 895 | { |
| 896 | return ((Gst::FlowReturn)(gst_base_sink_wait_preroll(gobj()))); |
| 897 | } |
| 898 | |
| 899 | Gst::ClockReturn BaseSink::wait_clock(Gst::ClockTime time, Gst::ClockTimeDiff& jitter) |
| 900 | { |
| 901 | return ((Gst::ClockReturn)(gst_base_sink_wait_clock(gobj(), ((GstClockTime)(time)), (GstClockTimeDiff*)(&jitter)))); |
| 902 | } |
| 903 | |
| 904 | Gst::ClockReturn BaseSink::wait_clock(Gst::ClockTime time) |
| 905 | { |
| 906 | return ((Gst::ClockReturn)(gst_base_sink_wait_clock(gobj(), ((GstClockTime)(time)), nullptr))); |
| 907 | } |
| 908 | |
| 909 | Gst::FlowReturn BaseSink::wait(Gst::ClockTime time, Gst::ClockTimeDiff& jitter) |
| 910 | { |
| 911 | return ((Gst::FlowReturn)(gst_base_sink_wait(gobj(), ((GstClockTime)(time)), (GstClockTimeDiff*)(&jitter)))); |
| 912 | } |
| 913 | |
| 914 | Gst::FlowReturn BaseSink::wait(Gst::ClockTime time) |
| 915 | { |
| 916 | return ((Gst::FlowReturn)(gst_base_sink_wait(gobj(), ((GstClockTime)(time)), nullptr))); |
| 917 | } |
| 918 | |
| 919 | void BaseSink::set_sync(bool sync) |
| 920 | { |
| 921 | gst_base_sink_set_sync(gobj(), static_cast<int>(sync)); |
| 922 | } |
| 923 | |
| 924 | bool BaseSink::get_sync() const |
| 925 | { |
| 926 | return gst_base_sink_get_sync(const_cast<GstBaseSink*>(gobj())); |
| 927 | } |
| 928 | |
| 929 | void BaseSink::set_max_lateness(gint64 max_lateness) |
| 930 | { |
| 931 | gst_base_sink_set_max_lateness(gobj(), max_lateness); |
| 932 | } |
| 933 | |
| 934 | gint64 BaseSink::get_max_lateness() const |
| 935 | { |
| 936 | return gst_base_sink_get_max_lateness(const_cast<GstBaseSink*>(gobj())); |
| 937 | } |
| 938 | |
| 939 | void BaseSink::set_qos_enabled(bool enabled) |
| 940 | { |
| 941 | gst_base_sink_set_qos_enabled(gobj(), static_cast<int>(enabled)); |
| 942 | } |
| 943 | |
| 944 | bool BaseSink::is_qos_enabled() const |
| 945 | { |
| 946 | return gst_base_sink_is_qos_enabled(const_cast<GstBaseSink*>(gobj())); |
| 947 | } |
| 948 | |
| 949 | void BaseSink::set_async_enabled(bool enabled) |
| 950 | { |
| 951 | gst_base_sink_set_async_enabled(gobj(), static_cast<int>(enabled)); |
| 952 | } |
| 953 | |
| 954 | bool BaseSink::is_async_enabled() const |
| 955 | { |
| 956 | return gst_base_sink_is_async_enabled(const_cast<GstBaseSink*>(gobj())); |
| 957 | } |
| 958 | |
| 959 | void BaseSink::set_ts_offset(Gst::ClockTimeDiff offset) |
| 960 | { |
| 961 | gst_base_sink_set_ts_offset(gobj(), GstClockTimeDiff(offset)); |
| 962 | } |
| 963 | |
| 964 | Gst::ClockTimeDiff BaseSink::get_ts_offset() const |
| 965 | { |
| 966 | return Gst::ClockTimeDiff(gst_base_sink_get_ts_offset(const_cast<GstBaseSink*>(gobj()))); |
| 967 | } |
| 968 | |
| 969 | void BaseSink::set_render_delay(Gst::ClockTime delay) |
| 970 | { |
| 971 | gst_base_sink_set_render_delay(gobj(), ((GstClockTime)(delay))); |
| 972 | } |
| 973 | |
| 974 | Gst::ClockTime BaseSink::get_render_delay() const |
| 975 | { |
| 976 | return ((Gst::ClockTime)(gst_base_sink_get_render_delay(const_cast<GstBaseSink*>(gobj())))); |
| 977 | } |
| 978 | |
| 979 | void BaseSink::set_blocksize(guint blocksize) |
| 980 | { |
| 981 | gst_base_sink_set_blocksize(gobj(), blocksize); |
| 982 | } |
| 983 | |
| 984 | guint BaseSink::get_blocksize() const |
| 985 | { |
| 986 | return gst_base_sink_get_blocksize(const_cast<GstBaseSink*>(gobj())); |
| 987 | } |
| 988 | |
| 989 | guint64 BaseSink::get_throttle_time() const |
| 990 | { |
| 991 | return gst_base_sink_get_throttle_time(const_cast<GstBaseSink*>(gobj())); |
| 992 | } |
| 993 | |
| 994 | void BaseSink::set_throttle_time(guint64 throttle) |
| 995 | { |
| 996 | gst_base_sink_set_throttle_time(gobj(), throttle); |
| 997 | } |
| 998 | |
| 999 | Glib::RefPtr<Gst::Sample> BaseSink::get_last_sample() const |
| 1000 | { |
| 1001 | return Glib::wrap(gst_base_sink_get_last_sample(const_cast<GstBaseSink*>(gobj()))); |
| 1002 | } |
| 1003 | |
| 1004 | void BaseSink::set_max_bitrate(guint64 max_bitrate) |
| 1005 | { |
| 1006 | gst_base_sink_set_max_bitrate(gobj(), max_bitrate); |
| 1007 | } |
| 1008 | |
| 1009 | guint64 BaseSink::get_max_bitrate() const |
| 1010 | { |
| 1011 | return gst_base_sink_get_max_bitrate(const_cast<GstBaseSink*>(gobj())); |
| 1012 | } |
| 1013 | |
| 1014 | void BaseSink::set_last_sample_enabled(bool enabled) |
| 1015 | { |
| 1016 | gst_base_sink_set_last_sample_enabled(gobj(), static_cast<int>(enabled)); |
| 1017 | } |
| 1018 | |
| 1019 | bool BaseSink::is_last_sample_enabled() const |
| 1020 | { |
| 1021 | return gst_base_sink_is_last_sample_enabled(const_cast<GstBaseSink*>(gobj())); |
| 1022 | } |
| 1023 | |
| 1024 | Glib::RefPtr<Gst::Pad> BaseSink::get_sink_pad() |
| 1025 | { |
| 1026 | Glib::RefPtr<Gst::Pad> ref_ptr(Glib::wrap(gobj()->sinkpad)); |
| 1027 | |
| 1028 | if(ref_ptr) |
| 1029 | ref_ptr->reference(); |
| 1030 | |
| 1031 | return ref_ptr; |
| 1032 | } |
| 1033 | |
| 1034 | Glib::RefPtr<const Gst::Pad> BaseSink::get_sink_pad() const |
| 1035 | { |
| 1036 | Glib::RefPtr<const Gst::Pad> ref_ptr(Glib::wrap(gobj()->sinkpad)); |
| 1037 | |
| 1038 | if(ref_ptr) |
| 1039 | ref_ptr->reference(); |
| 1040 | |
| 1041 | return ref_ptr; |
| 1042 | } |
| 1043 | |
| 1044 | |
| 1045 | Glib::PropertyProxy< bool > BaseSink::property_async() |
| 1046 | { |
| 1047 | return Glib::PropertyProxy< bool >(this, "async"); |
| 1048 | } |
| 1049 | |
| 1050 | Glib::PropertyProxy_ReadOnly< bool > BaseSink::property_async() const |
| 1051 | { |
| 1052 | return Glib::PropertyProxy_ReadOnly< bool >(this, "async"); |
| 1053 | } |
| 1054 | |
| 1055 | Glib::PropertyProxy< gint64 > BaseSink::property_max_lateness() |
| 1056 | { |
| 1057 | return Glib::PropertyProxy< gint64 >(this, "max-lateness"); |
| 1058 | } |
| 1059 | |
| 1060 | Glib::PropertyProxy_ReadOnly< gint64 > BaseSink::property_max_lateness() const |
| 1061 | { |
| 1062 | return Glib::PropertyProxy_ReadOnly< gint64 >(this, "max-lateness"); |
| 1063 | } |
| 1064 | |
| 1065 | Glib::PropertyProxy< bool > BaseSink::property_qos() |
| 1066 | { |
| 1067 | return Glib::PropertyProxy< bool >(this, "qos"); |
| 1068 | } |
| 1069 | |
| 1070 | Glib::PropertyProxy_ReadOnly< bool > BaseSink::property_qos() const |
| 1071 | { |
| 1072 | return Glib::PropertyProxy_ReadOnly< bool >(this, "qos"); |
| 1073 | } |
| 1074 | |
| 1075 | Glib::PropertyProxy< bool > BaseSink::property_sync() |
| 1076 | { |
| 1077 | return Glib::PropertyProxy< bool >(this, "sync"); |
| 1078 | } |
| 1079 | |
| 1080 | Glib::PropertyProxy_ReadOnly< bool > BaseSink::property_sync() const |
| 1081 | { |
| 1082 | return Glib::PropertyProxy_ReadOnly< bool >(this, "sync"); |
| 1083 | } |
| 1084 | |
| 1085 | Glib::PropertyProxy< gint64 > BaseSink::property_ts_offset() |
| 1086 | { |
| 1087 | return Glib::PropertyProxy< gint64 >(this, "ts-offset"); |
| 1088 | } |
| 1089 | |
| 1090 | Glib::PropertyProxy_ReadOnly< gint64 > BaseSink::property_ts_offset() const |
| 1091 | { |
| 1092 | return Glib::PropertyProxy_ReadOnly< gint64 >(this, "ts-offset"); |
| 1093 | } |
| 1094 | |
| 1095 | Glib::PropertyProxy< guint64 > BaseSink::property_render_delay() |
| 1096 | { |
| 1097 | return Glib::PropertyProxy< guint64 >(this, "render-delay"); |
| 1098 | } |
| 1099 | |
| 1100 | Glib::PropertyProxy_ReadOnly< guint64 > BaseSink::property_render_delay() const |
| 1101 | { |
| 1102 | return Glib::PropertyProxy_ReadOnly< guint64 >(this, "render-delay"); |
| 1103 | } |
| 1104 | |
| 1105 | Glib::PropertyProxy< guint64 > BaseSink::property_throttle_time() |
| 1106 | { |
| 1107 | return Glib::PropertyProxy< guint64 >(this, "throttle-time"); |
| 1108 | } |
| 1109 | |
| 1110 | Glib::PropertyProxy_ReadOnly< guint64 > BaseSink::property_throttle_time() const |
| 1111 | { |
| 1112 | return Glib::PropertyProxy_ReadOnly< guint64 >(this, "throttle-time"); |
| 1113 | } |
| 1114 | |
| 1115 | Glib::PropertyProxy< guint > BaseSink::property_blocksize() |
| 1116 | { |
| 1117 | return Glib::PropertyProxy< guint >(this, "blocksize"); |
| 1118 | } |
| 1119 | |
| 1120 | Glib::PropertyProxy_ReadOnly< guint > BaseSink::property_blocksize() const |
| 1121 | { |
| 1122 | return Glib::PropertyProxy_ReadOnly< guint >(this, "blocksize"); |
| 1123 | } |
| 1124 | |
| 1125 | Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Sample> > BaseSink::property_last_sample() const |
| 1126 | { |
| 1127 | return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Sample> >(this, "last-sample"); |
| 1128 | } |
| 1129 | |
| 1130 | Glib::PropertyProxy< bool > BaseSink::property_enable_last_sample() |
| 1131 | { |
| 1132 | return Glib::PropertyProxy< bool >(this, "enable-last-sample"); |
| 1133 | } |
| 1134 | |
| 1135 | Glib::PropertyProxy_ReadOnly< bool > BaseSink::property_enable_last_sample() const |
| 1136 | { |
| 1137 | return Glib::PropertyProxy_ReadOnly< bool >(this, "enable-last-sample"); |
| 1138 | } |
| 1139 | |
| 1140 | Glib::PropertyProxy< guint64 > BaseSink::property_max_bitrate() |
| 1141 | { |
| 1142 | return Glib::PropertyProxy< guint64 >(this, "max-bitrate"); |
| 1143 | } |
| 1144 | |
| 1145 | Glib::PropertyProxy_ReadOnly< guint64 > BaseSink::property_max_bitrate() const |
| 1146 | { |
| 1147 | return Glib::PropertyProxy_ReadOnly< guint64 >(this, "max-bitrate"); |
| 1148 | } |
| 1149 | |
| 1150 | |
| 1151 | Glib::RefPtr<Gst::Caps> Gst::BaseSink::get_caps_vfunc(const Glib::RefPtr<Gst::Caps>& caps) const |
| 1152 | { |
| 1153 | const auto base = static_cast<BaseClassType*>( |
| 1154 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1155 | ); |
| 1156 | |
| 1157 | if(base && base->get_caps) |
| 1158 | { |
| 1159 | Glib::RefPtr<Gst::Caps> retval(Glib::wrap((*base->get_caps)(const_cast<GstBaseSink*>(gobj()),Glib::unwrap(caps)))); |
| 1160 | return retval; |
| 1161 | } |
| 1162 | |
| 1163 | using RType = Glib::RefPtr<Gst::Caps>; |
| 1164 | return RType(); |
| 1165 | } |
| 1166 | bool Gst::BaseSink::set_caps_vfunc(const Glib::RefPtr<Gst::Caps>& caps) |
| 1167 | { |
| 1168 | const auto base = static_cast<BaseClassType*>( |
| 1169 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1170 | ); |
| 1171 | |
| 1172 | if(base && base->set_caps) |
| 1173 | { |
| 1174 | bool retval((*base->set_caps)(gobj(),Glib::unwrap(caps))); |
| 1175 | return retval; |
| 1176 | } |
| 1177 | |
| 1178 | return true; |
| 1179 | } |
| 1180 | void Gst::BaseSink::get_times_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer, Gst::ClockTime& start, Gst::ClockTime& end) const |
| 1181 | { |
| 1182 | const auto base = static_cast<BaseClassType*>( |
| 1183 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1184 | ); |
| 1185 | |
| 1186 | if(base && base->get_times) |
| 1187 | { |
| 1188 | (*base->get_times)(const_cast<GstBaseSink*>(gobj()),Glib::unwrap(buffer),(GstClockTime*)(&start),(GstClockTime*)(&end)); |
| 1189 | } |
| 1190 | } |
| 1191 | bool Gst::BaseSink::start_vfunc() |
| 1192 | { |
| 1193 | const auto base = static_cast<BaseClassType*>( |
| 1194 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1195 | ); |
| 1196 | |
| 1197 | if(base && base->start) |
| 1198 | { |
| 1199 | bool retval((*base->start)(gobj())); |
| 1200 | return retval; |
| 1201 | } |
| 1202 | |
| 1203 | return true; |
| 1204 | } |
| 1205 | bool Gst::BaseSink::stop_vfunc() |
| 1206 | { |
| 1207 | const auto base = static_cast<BaseClassType*>( |
| 1208 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1209 | ); |
| 1210 | |
| 1211 | if(base && base->stop) |
| 1212 | { |
| 1213 | bool retval((*base->stop)(gobj())); |
| 1214 | return retval; |
| 1215 | } |
| 1216 | |
| 1217 | return true; |
| 1218 | } |
| 1219 | bool Gst::BaseSink::unlock_vfunc() |
| 1220 | { |
| 1221 | const auto base = static_cast<BaseClassType*>( |
| 1222 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1223 | ); |
| 1224 | |
| 1225 | if(base && base->unlock) |
| 1226 | { |
| 1227 | bool retval((*base->unlock)(gobj())); |
| 1228 | return retval; |
| 1229 | } |
| 1230 | |
| 1231 | return true; |
| 1232 | } |
| 1233 | bool Gst::BaseSink::event_vfunc(const Glib::RefPtr<Gst::Event>& event) |
| 1234 | { |
| 1235 | const auto base = static_cast<BaseClassType*>( |
| 1236 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1237 | ); |
| 1238 | |
| 1239 | if(base && base->event) |
| 1240 | { |
| 1241 | bool retval((*base->event)(gobj(),Glib::unwrap(event))); |
| 1242 | return retval; |
| 1243 | } |
| 1244 | |
| 1245 | return true; |
| 1246 | } |
| 1247 | FlowReturn Gst::BaseSink::wait_event_vfunc(const Glib::RefPtr<Gst::Event>& event) |
| 1248 | { |
| 1249 | const auto base = static_cast<BaseClassType*>( |
| 1250 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1251 | ); |
| 1252 | |
| 1253 | if(base && base->wait_event) |
| 1254 | { |
| 1255 | FlowReturn retval(((FlowReturn)((*base->wait_event)(gobj(),Glib::unwrap(event))))); |
| 1256 | return retval; |
| 1257 | } |
| 1258 | |
| 1259 | using RType = FlowReturn; |
| 1260 | return RType(); |
| 1261 | } |
| 1262 | FlowReturn Gst::BaseSink::preroll_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer) |
| 1263 | { |
| 1264 | const auto base = static_cast<BaseClassType*>( |
| 1265 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1266 | ); |
| 1267 | |
| 1268 | if(base && base->preroll) |
| 1269 | { |
| 1270 | FlowReturn retval(((FlowReturn)((*base->preroll)(gobj(),Glib::unwrap(buffer))))); |
| 1271 | return retval; |
| 1272 | } |
| 1273 | |
| 1274 | using RType = FlowReturn; |
| 1275 | return RType(); |
| 1276 | } |
| 1277 | FlowReturn Gst::BaseSink::render_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer) |
| 1278 | { |
| 1279 | const auto base = static_cast<BaseClassType*>( |
| 1280 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1281 | ); |
| 1282 | |
| 1283 | if(base && base->render) |
| 1284 | { |
| 1285 | FlowReturn retval(((FlowReturn)((*base->render)(gobj(),Glib::unwrap(buffer))))); |
| 1286 | return retval; |
| 1287 | } |
| 1288 | |
| 1289 | using RType = FlowReturn; |
| 1290 | return RType(); |
| 1291 | } |
| 1292 | bool Gst::BaseSink::activate_pull_vfunc(bool active) |
| 1293 | { |
| 1294 | const auto base = static_cast<BaseClassType*>( |
| 1295 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1296 | ); |
| 1297 | |
| 1298 | if(base && base->activate_pull) |
| 1299 | { |
| 1300 | bool retval((*base->activate_pull)(gobj(),static_cast<int>(active))); |
| 1301 | return retval; |
| 1302 | } |
| 1303 | |
| 1304 | return true; |
| 1305 | } |
| 1306 | Glib::RefPtr<Gst::Caps> Gst::BaseSink::fixate_vfunc(const Glib::RefPtr<Gst::Caps>& caps) |
| 1307 | { |
| 1308 | const auto base = static_cast<BaseClassType*>( |
| 1309 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1310 | ); |
| 1311 | |
| 1312 | if(base && base->fixate) |
| 1313 | { |
| 1314 | Glib::RefPtr<Gst::Caps> retval(Glib::wrap((*base->fixate)(gobj(),Glib::unwrap(caps)))); |
| 1315 | return retval; |
| 1316 | } |
| 1317 | |
| 1318 | using RType = Glib::RefPtr<Gst::Caps>; |
| 1319 | return RType(); |
| 1320 | } |
| 1321 | bool Gst::BaseSink::unlock_stop_vfunc() |
| 1322 | { |
| 1323 | const auto base = static_cast<BaseClassType*>( |
| 1324 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1325 | ); |
| 1326 | |
| 1327 | if(base && base->unlock_stop) |
| 1328 | { |
| 1329 | bool retval((*base->unlock_stop)(gobj())); |
| 1330 | return retval; |
| 1331 | } |
| 1332 | |
| 1333 | return true; |
| 1334 | } |
| 1335 | FlowReturn Gst::BaseSink::render_list_vfunc(const Glib::RefPtr<Gst::BufferList>& buffer_list) |
| 1336 | { |
| 1337 | const auto base = static_cast<BaseClassType*>( |
| 1338 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1339 | ); |
| 1340 | |
| 1341 | if(base && base->render_list) |
| 1342 | { |
| 1343 | FlowReturn retval(((FlowReturn)((*base->render_list)(gobj(),Glib::unwrap(buffer_list))))); |
| 1344 | return retval; |
| 1345 | } |
| 1346 | |
| 1347 | using RType = FlowReturn; |
| 1348 | return RType(); |
| 1349 | } |
| 1350 | FlowReturn Gst::BaseSink::prepare_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer) |
| 1351 | { |
| 1352 | const auto base = static_cast<BaseClassType*>( |
| 1353 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1354 | ); |
| 1355 | |
| 1356 | if(base && base->prepare) |
| 1357 | { |
| 1358 | FlowReturn retval(((FlowReturn)((*base->prepare)(gobj(),Glib::unwrap(buffer))))); |
| 1359 | return retval; |
| 1360 | } |
| 1361 | |
| 1362 | using RType = FlowReturn; |
| 1363 | return RType(); |
| 1364 | } |
| 1365 | FlowReturn Gst::BaseSink::prepare_list_vfunc(const Glib::RefPtr<Gst::BufferList>& buffer_list) |
| 1366 | { |
| 1367 | const auto base = static_cast<BaseClassType*>( |
| 1368 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1369 | ); |
| 1370 | |
| 1371 | if(base && base->prepare_list) |
| 1372 | { |
| 1373 | FlowReturn retval(((FlowReturn)((*base->prepare_list)(gobj(),Glib::unwrap(buffer_list))))); |
| 1374 | return retval; |
| 1375 | } |
| 1376 | |
| 1377 | using RType = FlowReturn; |
| 1378 | return RType(); |
| 1379 | } |
| 1380 | bool Gst::BaseSink::propose_allocation_vfunc(const Glib::RefPtr<Gst::Query>& query) |
| 1381 | { |
| 1382 | const auto base = static_cast<BaseClassType*>( |
| 1383 | g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). |
| 1384 | ); |
| 1385 | |
| 1386 | if(base && base->propose_allocation) |
| 1387 | { |
| 1388 | bool retval((*base->propose_allocation)(gobj(),Glib::unwrap(query))); |
| 1389 | return retval; |
| 1390 | } |
| 1391 | |
| 1392 | using RType = bool; |
| 1393 | return RType(); |
| 1394 | } |
| 1395 | |
| 1396 | |
| 1397 | } // namespace Gst |
| 1398 | |
| 1399 |