// Generated by gmmproc 2.50.1 -- DO NOT MODIFY! #include #include #include /* 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. */ #include #include #include namespace { extern "C" { static gboolean Registry_Plugin_Filter_gstreamermm_callback(GstPlugin* plugin, void* data) { Gst::Plugin::SlotFilter* the_slot = static_cast(data); try { bool result = (*the_slot)(Glib::wrap(plugin, true)); return result; } catch(...) { Glib::exception_handlers_invoke(); } return false; } static gboolean Registry_PluginFeature_Filter_gstreamermm_callback(GstPluginFeature* feature, void* data) { Gst::PluginFeature::SlotFilter* the_slot = static_cast(data); try { bool result = (*the_slot)(Glib::wrap(feature, true)); return result; } catch(...) { Glib::exception_handlers_invoke(); } return false; } } // extern "C" } // anonymous namespace namespace Gst { Glib::ListHandle< Glib::RefPtr > Registry::get_plugin_list(const Plugin::SlotFilter& filter, bool first) { GList* list = gst_registry_plugin_filter(gobj(), &Registry_Plugin_Filter_gstreamermm_callback, first, const_cast(&filter)); return Glib::ListHandle< Glib::RefPtr >(list, Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_plugin_list(const Plugin::SlotFilter& filter, bool first) const { GList* list = gst_registry_plugin_filter(const_cast(gobj()), &Registry_Plugin_Filter_gstreamermm_callback, first, const_cast(&filter)); return Glib::ListHandle< Glib::RefPtr >(list, Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_feature_list(const PluginFeature::SlotFilter& filter, bool first) { GList* list = gst_registry_feature_filter(gobj(), &Registry_PluginFeature_Filter_gstreamermm_callback, first, const_cast(&filter)); return Glib::ListHandle< Glib::RefPtr >(list, Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_feature_list(const PluginFeature::SlotFilter& filter, bool first) const { GList* list = gst_registry_feature_filter(const_cast(gobj()), &Registry_PluginFeature_Filter_gstreamermm_callback, first, const_cast(&filter)); return Glib::ListHandle< Glib::RefPtr >(list, Glib::OWNERSHIP_DEEP); } Glib::RefPtr Registry::get() { return Glib::wrap(gst_registry_get(), true); } void Registry::add_feature(const Glib::RefPtr& feature) { feature->reference(); gst_registry_add_feature(gobj(), feature->gobj()); } void Registry::add_plugin(const Glib::RefPtr& plugin) { plugin->reference(); gst_registry_add_plugin(gobj(), plugin->gobj()); } } //namespace Gst namespace { } // anonymous namespace namespace Glib { Glib::RefPtr wrap(GstRegistry* object, bool take_copy) { return Glib::RefPtr( dynamic_cast (Glib::wrap_auto ((GObject*)(object), take_copy)) ); //We use dynamic_cast<> in case of multiple inheritance. } } /* namespace Glib */ namespace Gst { /* The *_Class implementation: */ const Glib::Class& Registry_Class::init() { if(!gtype_) // create the GType if necessary { // Glib::Class has to know the class init function to clone custom types. class_init_func_ = &Registry_Class::class_init_function; // This is actually just optimized away, apparently with no harm. // Make sure that the parent type has been created. //CppClassParent::CppObjectType::get_type(); // Create the wrapper type, with the same class/instance size as the base type. register_derived_type(gst_registry_get_type()); // Add derived versions of interfaces, if the C type implements any interfaces: } return *this; } void Registry_Class::class_init_function(void* g_class, void* class_data) { const auto klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); } Glib::ObjectBase* Registry_Class::wrap_new(GObject* object) { return new Registry((GstRegistry*)object); } /* The implementation: */ GstRegistry* Registry::gobj_copy() { reference(); return gobj(); } Registry::Registry(const Glib::ConstructParams& construct_params) : Gst::Object(construct_params) { } Registry::Registry(GstRegistry* castitem) : Gst::Object((GstObject*)(castitem)) {} Registry::Registry(Registry&& src) noexcept : Gst::Object(std::move(src)) {} Registry& Registry::operator=(Registry&& src) noexcept { Gst::Object::operator=(std::move(src)); return *this; } Registry::~Registry() noexcept {} Registry::CppClassType Registry::registry_class_; // initialize static member GType Registry::get_type() { return registry_class_.init().get_type(); } GType Registry::get_base_type() { return gst_registry_get_type(); } Glib::ListHandle< Glib::RefPtr > Registry::get_feature_list(GType type) { return Glib::ListHandle< Glib::RefPtr >(gst_registry_get_feature_list(gobj(), type), Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_feature_list(GType type) const { return Glib::ListHandle< Glib::RefPtr >(gst_registry_get_feature_list(const_cast(gobj()), type), Glib::OWNERSHIP_DEEP); } guint32 Registry::get_feature_list_cookie() const { return gst_registry_get_feature_list_cookie(const_cast(gobj())); } Glib::ListHandle< Glib::RefPtr > Registry::get_feature_list(const Glib::ustring& name) { return Glib::ListHandle< Glib::RefPtr >(gst_registry_get_feature_list_by_plugin(gobj(), name.c_str()), Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_feature_list(const Glib::ustring& name) const { return Glib::ListHandle< Glib::RefPtr >(gst_registry_get_feature_list_by_plugin(const_cast(gobj()), name.c_str()), Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_plugin_list() { return Glib::ListHandle< Glib::RefPtr >(gst_registry_get_plugin_list(gobj()), Glib::OWNERSHIP_DEEP); } Glib::ListHandle< Glib::RefPtr > Registry::get_plugin_list() const { return Glib::ListHandle< Glib::RefPtr >(gst_registry_get_plugin_list(const_cast(gobj())), Glib::OWNERSHIP_DEEP); } void Registry::remove_plugin(const Glib::RefPtr& plugin) { gst_registry_remove_plugin(gobj(), Glib::unwrap(plugin)); } bool Registry::add_plugin(Glib::RefPtr&& plugin) { return gst_registry_add_plugin(gobj(), (plugin) ? plugin.release()->gobj() : nullptr); } Glib::RefPtr Registry::find_plugin(const Glib::ustring& name) { return Glib::wrap(gst_registry_find_plugin(gobj(), name.c_str())); } Glib::RefPtr Registry::find_plugin(const Glib::ustring& name) const { return const_cast(this)->find_plugin(name); } Glib::RefPtr Registry::find_feature(const Glib::ustring& name, GType type) { return Glib::wrap(gst_registry_find_feature(gobj(), name.c_str(), type)); } Glib::RefPtr Registry::find_feature(const Glib::ustring& name, GType type) const { return const_cast(this)->find_feature(name, type); } Glib::RefPtr Registry::lookup_feature(const Glib::ustring& name) { return Glib::wrap(gst_registry_lookup_feature(gobj(), name.c_str())); } Glib::RefPtr Registry::lookup_feature(const Glib::ustring& name) const { return const_cast(this)->lookup_feature(name); } bool Registry::scan_path(const Glib::ustring& path) { return gst_registry_scan_path(gobj(), path.c_str()); } Glib::RefPtr Registry::lookup(const Glib::ustring& filename) { return Glib::wrap(gst_registry_lookup(gobj(), filename.c_str())); } Glib::RefPtr Registry::lookup(const Glib::ustring& filename) const { return const_cast(this)->lookup(filename); } void Registry::remove_feature(const Glib::RefPtr& feature) { gst_registry_remove_feature(gobj(), Glib::unwrap(feature)); } void Registry::add_feature(Glib::RefPtr&& feature) { gst_registry_add_feature(gobj(), (feature) ? feature.release()->gobj() : nullptr); } bool Registry::check_feature_version(const Glib::ustring& feature_name, guint min_major, guint min_minor, guint min_micro) { return gst_registry_check_feature_version(gobj(), feature_name.c_str(), min_major, min_minor, min_micro); } } // namespace Gst