// Generated by gmmproc 2.50.1 -- DO NOT MODIFY! #include #include #include #include // std::memset() /* gstreamermm - a C++ wrapper for gstreamer * * Copyright 2009 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 void TypeFind_Find_gstreamermm_callback(GstTypeFind*, void* data) { Gst::TypeFind::SlotFind& slot_find = *static_cast(data); try { slot_find(); } catch (...) { Glib::exception_handlers_invoke(); } } static void TypeFind_Find_gstreamermm_callback_destroy(void* data) { delete static_cast(data); } } // extern "C" } // anonymous namespace namespace Gst { bool TypeFind::register_slot(const Glib::RefPtr& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions, const Glib::RefPtr& caps) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(Glib::unwrap(plugin), name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, (gchar*)extensions.data(), const_cast(Glib::unwrap(caps)), slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::RefPtr& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::RefPtr& caps) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(Glib::unwrap(plugin), name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, nullptr, const_cast(Glib::unwrap(caps)), slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::RefPtr& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(Glib::unwrap(plugin), name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, (gchar*)extensions.data(), nullptr, slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::RefPtr& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(Glib::unwrap(plugin), name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, nullptr, nullptr, slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions, const Glib::RefPtr& caps) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(nullptr, name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, (gchar*)extensions.data(), const_cast(Glib::unwrap(caps)), slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::RefPtr& caps) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(nullptr, name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, nullptr, const_cast(Glib::unwrap(caps)), slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(nullptr, name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, (gchar*)extensions.data(), nullptr, slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } bool TypeFind::register_slot(const Glib::ustring& name, guint rank, const SlotFind& find_slot) { SlotFind* slot_copy = new SlotFind(find_slot); return gst_type_find_register(nullptr, name.c_str(), rank, &TypeFind_Find_gstreamermm_callback, nullptr, nullptr, slot_copy, &TypeFind_Find_gstreamermm_callback_destroy); } } // namespace Gst namespace { } // anonymous namespace // static GType Glib::Value::value_type() { return gst_type_find_probability_get_type(); } namespace Glib { Gst::TypeFind& wrap(GstTypeFind* object) { return *reinterpret_cast(object); } const Gst::TypeFind& wrap(const GstTypeFind* object) { return *reinterpret_cast(object); } } // namespace Glib namespace Gst { TypeFind::TypeFind(const TypeFind& other) noexcept : gobject_(other.gobject_) { } TypeFind& TypeFind::operator=(const TypeFind& other) noexcept { gobject_ = other.gobject_; return *this; } TypeFind::TypeFind(TypeFind&& other) noexcept : gobject_(std::move(other.gobject_)) { //We could wipe other.gobject_ via memset, //but that is not really necessary: //other.gobject_ = nullptr; } TypeFind& TypeFind::operator=(TypeFind&& other) noexcept { gobject_ = std::move(other.gobject_); return *this; } // static GType TypeFind::get_type() { return gst_type_find_get_type(); } TypeFind::TypeFind() { std::memset(&gobject_, 0, sizeof(GstTypeFind)); } TypeFind::TypeFind(const GstTypeFind* gobject) { if(gobject) gobject_ = *gobject; else std::memset(&gobject_, 0, sizeof(GstTypeFind)); } std::vector TypeFind::peek(gint64 offset, guint size) const { return Glib::ArrayHandler::array_to_vector(gst_type_find_peek(const_cast(gobj()), offset, size), Glib::OWNERSHIP_NONE); } void TypeFind::suggest(guint probability, const Glib::RefPtr& caps) const { gst_type_find_suggest(const_cast(gobj()), probability, const_cast(Glib::unwrap(caps))); } guint64 TypeFind::get_length() const { return gst_type_find_get_length(const_cast(gobj())); } } // namespace Gst