/* gstreamermm - a C++ wrapper for gstreamer * * Copyright 2008 The gstreamermm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ namespace Gst { bool VideoOrientation::get_hflip(bool& flip) const { gboolean gst_flip = 0; const bool result = gst_video_orientation_get_hflip(const_cast(gobj()), &gst_flip); flip = gst_flip; return result; } bool VideoOrientation::get_vflip(bool& flip) const { gboolean gst_flip = 0; const bool result = gst_video_orientation_get_vflip(const_cast(gobj()), &gst_flip); flip = gst_flip; return result; } gboolean VideoOrientation_Class::get_hflip_vfunc_callback(GstVideoOrientation* self, gboolean* flip) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { try // Trap C++ exceptions which would normally be lost because this is a C callback. { // Call the virtual member method, which derived classes might override. bool cpp_flip = false; const gboolean result = static_cast(obj->get_hflip_vfunc(cpp_flip)); *flip = cpp_flip; return result; } catch(...) { Glib::exception_handlers_invoke(); } } } BaseClassType *const base = static_cast( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. ) ); // Call the original underlying C function: if(base && base->get_hflip) return (*base->get_hflip)(self, flip); typedef gboolean RType; return RType(); } bool Gst::VideoOrientation::get_hflip_vfunc(bool& flip) const { BaseClassType *const base = static_cast( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. ) ); if(base && base->get_hflip) { gboolean gst_flip = 0; const bool result = (*base->get_hflip)(const_cast(gobj()),&gst_flip); flip = gst_flip; return result; } typedef bool RType; return RType(); } gboolean VideoOrientation_Class::get_vflip_vfunc_callback(GstVideoOrientation* self, gboolean* flip) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { try // Trap C++ exceptions which would normally be lost because this is a C callback. { // Call the virtual member method, which derived classes might override. bool cpp_flip = false; const gboolean result = static_cast(obj->get_vflip_vfunc(cpp_flip)); *flip = cpp_flip; return result; } catch(...) { Glib::exception_handlers_invoke(); } } } BaseClassType *const base = static_cast( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. ) ); // Call the original underlying C function: if(base && base->get_vflip) return (*base->get_vflip)(self, flip); typedef gboolean RType; return RType(); } bool Gst::VideoOrientation::get_vflip_vfunc(bool& flip) const { BaseClassType *const base = static_cast( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. ) ); if(base && base->get_vflip) { gboolean gst_flip = 0; const bool result = (*base->get_vflip)(const_cast(gobj()),&gst_flip); flip = gst_flip; return result; } typedef bool RType; return RType(); } } // namespace Gst