| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | #ifndef _GSTREAMERMM_TYPEFINDFACTORY_H |
| 3 | #define _GSTREAMERMM_TYPEFINDFACTORY_H |
| 4 | |
| 5 | |
| 6 | #include <glibmm/ustring.h> |
| 7 | #include <sigc++/sigc++.h> |
| 8 | |
| 9 | /* gstreamermm - a C++ wrapper for gstreamer |
| 10 | * |
| 11 | * Copyright 2009-2016 The gstreamermm Development Team |
| 12 | * |
| 13 | * This library is free software; you can redistribute it and/or |
| 14 | * modify it under the terms of the GNU Lesser General Public |
| 15 | * License as published by the Free Software Foundation; either |
| 16 | * version 2.1 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * This library is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | * Lesser General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU Lesser General Public |
| 24 | * License along with this library; if not, write to the Free |
| 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 26 | */ |
| 27 | |
| 28 | #include <gst/gst.h> |
| 29 | #include <gstreamermm/pluginfeature.h> |
| 30 | #include <glibmm/arrayhandle.h> |
| 31 | |
| 32 | |
| 33 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 34 | using GstTypeFindFactory = struct _GstTypeFindFactory; |
| 35 | using GstTypeFindFactoryClass = struct _GstTypeFindFactoryClass; |
| 36 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 37 | |
| 38 | |
| 39 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 40 | namespace Gst |
| 41 | { class TypeFindFactory_Class; } // namespace Gst |
| 42 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 43 | |
| 44 | namespace Gst |
| 45 | { |
| 46 | |
| 47 | class Caps; |
| 48 | class TypeFind; |
| 49 | |
| 50 | /** A class used to get information about registered typefind functions. |
| 51 | * The methods in this class allow querying information about registered |
| 52 | * typefind functions. |
| 53 | * |
| 54 | * Writing typefinders in C++ is not possible presently. |
| 55 | * |
| 56 | * Last reviewed on 2016-08-27 (1.8.0). |
| 57 | */ |
| 58 | |
| 59 | class TypeFindFactory : public PluginFeature |
| 60 | { |
| 61 | |
| 62 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 63 | |
| 64 | public: |
| 65 | using CppObjectType = TypeFindFactory; |
| 66 | using CppClassType = TypeFindFactory_Class; |
| 67 | using BaseObjectType = GstTypeFindFactory; |
| 68 | using BaseClassType = GstTypeFindFactoryClass; |
| 69 | |
| 70 | // noncopyable |
| 71 | TypeFindFactory(const TypeFindFactory&) = delete; |
| 72 | TypeFindFactory& operator=(const TypeFindFactory&) = delete; |
| 73 | |
| 74 | private: friend class TypeFindFactory_Class; |
| 75 | static CppClassType typefindfactory_class_; |
| 76 | |
| 77 | protected: |
| 78 | explicit TypeFindFactory(const Glib::ConstructParams& construct_params); |
| 79 | explicit TypeFindFactory(GstTypeFindFactory* castitem); |
| 80 | |
| 81 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 82 | |
| 83 | public: |
| 84 | |
| 85 | TypeFindFactory(TypeFindFactory&& src) noexcept; |
| 86 | TypeFindFactory& operator=(TypeFindFactory&& src) noexcept; |
| 87 | |
| 88 | ~TypeFindFactory() noexcept override; |
| 89 | |
| 90 | /** Get the GType for this class, for use with the underlying GObject type system. |
| 91 | */ |
| 92 | static GType get_type() G_GNUC_CONST; |
| 93 | |
| 94 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 95 | |
| 96 | |
| 97 | static GType get_base_type() G_GNUC_CONST; |
| 98 | #endif |
| 99 | |
| 100 | ///Provides access to the underlying C GObject. |
| 101 | GstTypeFindFactory* gobj() { return reinterpret_cast<GstTypeFindFactory*>(gobject_); } |
| 102 | |
| 103 | ///Provides access to the underlying C GObject. |
| 104 | const GstTypeFindFactory* gobj() const { return reinterpret_cast<GstTypeFindFactory*>(gobject_); } |
| 105 | |
| 106 | ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. |
| 107 | GstTypeFindFactory* gobj_copy(); |
| 108 | |
| 109 | private: |
| 110 | |
| 111 | |
| 112 | public: |
| 113 | |
| 114 | |
| 115 | /** Gets the list of all registered typefind factories. You must free the |
| 116 | * list using Gst::PluginFeature::list_free(). |
| 117 | * |
| 118 | * The returned factories are sorted by highest rank first, and then by |
| 119 | * factory name. |
| 120 | * |
| 121 | * Free-function: gst_plugin_feature_list_free |
| 122 | * |
| 123 | * @return The list of all |
| 124 | * registered Gst::TypeFindFactory. |
| 125 | */ |
| 126 | static Glib::ListHandle< Glib::RefPtr<Gst::TypeFindFactory> > get_list(); |
| 127 | |
| 128 | |
| 129 | /** Gets the extensions associated with a Gst::TypeFindFactory. The returned |
| 130 | * array should not be changed. If you need to change stuff in it, you should |
| 131 | * copy it using Glib::strdupv(). This function may return <tt>nullptr</tt> to indicate |
| 132 | * a 0-length list. |
| 133 | * |
| 134 | * @return A <tt>nullptr</tt>-terminated array of extensions associated with this factory. |
| 135 | */ |
| 136 | std::vector<Glib::ustring> get_extensions() const; |
| 137 | |
| 138 | |
| 139 | /** Gets the Gst::Caps associated with a typefind factory. |
| 140 | * |
| 141 | * @return The Gst::Caps associated with this factory. |
| 142 | */ |
| 143 | Glib::RefPtr<Gst::Caps> get_caps(); |
| 144 | |
| 145 | /** Gets the Gst::Caps associated with a typefind factory. |
| 146 | * |
| 147 | * @return The Gst::Caps associated with this factory. |
| 148 | */ |
| 149 | Glib::RefPtr<const Gst::Caps> get_caps() const; |
| 150 | |
| 151 | /** Calls the Gst::TypeFind::SlotFind associated with this factory. |
| 152 | * |
| 153 | * @param find A properly setup Gst::TypeFind entry. The get_data and suggest_type |
| 154 | * members must be set. |
| 155 | */ |
| 156 | void call_slot(Gst::TypeFind& find); |
| 157 | |
| 158 | /** Check whether the factory has a typefind function. Typefind factories |
| 159 | * without typefind functions are a last-effort fallback mechanism to |
| 160 | * e.g. assume a certain media type based on the file extension. |
| 161 | * |
| 162 | * @return <tt>true</tt> if the factory has a typefind functions set, otherwise <tt>false</tt>. |
| 163 | */ |
| 164 | bool has_function() const; |
| 165 | |
| 166 | |
| 167 | public: |
| 168 | |
| 169 | public: |
| 170 | //C++ methods used to invoke GTK+ virtual functions: |
| 171 | |
| 172 | protected: |
| 173 | //GTK+ Virtual Functions (override these to change behaviour): |
| 174 | |
| 175 | //Default Signal Handlers:: |
| 176 | |
| 177 | |
| 178 | }; |
| 179 | |
| 180 | } // namespace Gst |
| 181 | |
| 182 | |
| 183 | namespace Glib |
| 184 | { |
| 185 | /** A Glib::wrap() method for this object. |
| 186 | * |
| 187 | * @param object The C instance. |
| 188 | * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
| 189 | * @result A C++ instance that wraps this C instance. |
| 190 | * |
| 191 | * @relates Gst::TypeFindFactory |
| 192 | */ |
| 193 | Glib::RefPtr<Gst::TypeFindFactory> wrap(GstTypeFindFactory* object, bool take_copy = false); |
| 194 | } |
| 195 | |
| 196 | |
| 197 | #endif /* _GSTREAMERMM_TYPEFINDFACTORY_H */ |
| 198 |