| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | #ifndef _GSTREAMERMM_PLUGINFEATURE_H |
| 3 | #define _GSTREAMERMM_PLUGINFEATURE_H |
| 4 | |
| 5 | |
| 6 | #include <glibmm/ustring.h> |
| 7 | #include <sigc++/sigc++.h> |
| 8 | |
| 9 | /* gstreamermm - a C++ wrapper for gstreamer |
| 10 | * |
| 11 | * Copyright 2008-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/object.h> |
| 30 | #include <gstreamermm/plugin.h> |
| 31 | |
| 32 | |
| 33 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 34 | using GstPluginFeature = struct _GstPluginFeature; |
| 35 | using GstPluginFeatureClass = struct _GstPluginFeatureClass; |
| 36 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 37 | |
| 38 | |
| 39 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 40 | namespace Gst |
| 41 | { class PluginFeature_Class; } // namespace Gst |
| 42 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 43 | |
| 44 | namespace Gst |
| 45 | { |
| 46 | |
| 47 | /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */ |
| 48 | |
| 49 | /** |
| 50 | * @var Rank RANK_NONE |
| 51 | * Will be chosen last or not at all. |
| 52 | * |
| 53 | * @var Rank RANK_MARGINAL |
| 54 | * Unlikely to be chosen. |
| 55 | * |
| 56 | * @var Rank RANK_SECONDARY |
| 57 | * Likely to be chosen. |
| 58 | * |
| 59 | * @var Rank RANK_PRIMARY |
| 60 | * Will be chosen first. |
| 61 | * |
| 62 | * @enum Rank |
| 63 | * |
| 64 | * Element priority ranks. Defines the order in which the autoplugger (or |
| 65 | * similar rank-picking mechanisms, such as e.g. Gst::Element::make_from_uri()) |
| 66 | * will choose this element over an alternative one with the same function. |
| 67 | * |
| 68 | * These constants serve as a rough guidance for defining the rank of a |
| 69 | * Gst::PluginFeature. Any value is valid, including values bigger than |
| 70 | * @a GST_RANK_PRIMARY. |
| 71 | * |
| 72 | * @ingroup gstreamermmEnums |
| 73 | */ |
| 74 | enum Rank |
| 75 | { |
| 76 | RANK_NONE = 0, |
| 77 | RANK_MARGINAL = 64, |
| 78 | RANK_SECONDARY = 128, |
| 79 | RANK_PRIMARY = 256 |
| 80 | }; |
| 81 | |
| 82 | } // namespace Gst |
| 83 | |
| 84 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 85 | namespace Glib |
| 86 | { |
| 87 | |
| 88 | template <> |
| 89 | class Value<Gst::Rank> : public Glib::Value_Enum<Gst::Rank> |
| 90 | { |
| 91 | public: |
| 92 | static GType value_type() G_GNUC_CONST; |
| 93 | }; |
| 94 | |
| 95 | } // namespace Glib |
| 96 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 97 | |
| 98 | namespace Gst |
| 99 | { |
| 100 | |
| 101 | |
| 102 | /** A base class for anything that can be added to a Gst::Plugin. |
| 103 | * |
| 104 | * Last reviewed on 2016-06-06 (1.8.0) |
| 105 | */ |
| 106 | |
| 107 | class PluginFeature : public Object |
| 108 | { |
| 109 | |
| 110 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 111 | |
| 112 | public: |
| 113 | using CppObjectType = PluginFeature; |
| 114 | using CppClassType = PluginFeature_Class; |
| 115 | using BaseObjectType = GstPluginFeature; |
| 116 | using BaseClassType = GstPluginFeatureClass; |
| 117 | |
| 118 | // noncopyable |
| 119 | PluginFeature(const PluginFeature&) = delete; |
| 120 | PluginFeature& operator=(const PluginFeature&) = delete; |
| 121 | |
| 122 | private: friend class PluginFeature_Class; |
| 123 | static CppClassType pluginfeature_class_; |
| 124 | |
| 125 | protected: |
| 126 | explicit PluginFeature(const Glib::ConstructParams& construct_params); |
| 127 | explicit PluginFeature(GstPluginFeature* castitem); |
| 128 | |
| 129 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 130 | |
| 131 | public: |
| 132 | |
| 133 | PluginFeature(PluginFeature&& src) noexcept; |
| 134 | PluginFeature& operator=(PluginFeature&& src) noexcept; |
| 135 | |
| 136 | ~PluginFeature() noexcept override; |
| 137 | |
| 138 | /** Get the GType for this class, for use with the underlying GObject type system. |
| 139 | */ |
| 140 | static GType get_type() G_GNUC_CONST; |
| 141 | |
| 142 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 143 | |
| 144 | |
| 145 | static GType get_base_type() G_GNUC_CONST; |
| 146 | #endif |
| 147 | |
| 148 | ///Provides access to the underlying C GObject. |
| 149 | GstPluginFeature* gobj() { return reinterpret_cast<GstPluginFeature*>(gobject_); } |
| 150 | |
| 151 | ///Provides access to the underlying C GObject. |
| 152 | const GstPluginFeature* gobj() const { return reinterpret_cast<GstPluginFeature*>(gobject_); } |
| 153 | |
| 154 | ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. |
| 155 | GstPluginFeature* gobj_copy(); |
| 156 | |
| 157 | private: |
| 158 | |
| 159 | |
| 160 | public: |
| 161 | /** For example, |
| 162 | * bool on_filter(const Glib::RefPtr<Gst::PluginFeature>& feature);. |
| 163 | * The filter function should return true if the feature is a match, false |
| 164 | * otherwise. |
| 165 | */ |
| 166 | typedef sigc::slot< bool, const Glib::RefPtr<Gst::PluginFeature>& > SlotFilter; |
| 167 | |
| 168 | |
| 169 | /** Specifies a rank for a plugin feature, so that autoplugging uses |
| 170 | * the most appropriate feature. |
| 171 | * |
| 172 | * @param rank Rank value - higher number means more priority rank. |
| 173 | */ |
| 174 | void set_rank(guint rank); |
| 175 | |
| 176 | /** Gets the rank of a plugin feature. |
| 177 | * |
| 178 | * @return The rank of the feature. |
| 179 | */ |
| 180 | guint get_rank() const; |
| 181 | |
| 182 | /** Loads the plugin containing @a feature if it's not already loaded. @a feature is |
| 183 | * unaffected; use the return value instead. |
| 184 | * |
| 185 | * Normally this function is used like this: |
| 186 | * |
| 187 | * [C example ellipted] |
| 188 | * |
| 189 | * @return A reference to the loaded |
| 190 | * feature, or <tt>nullptr</tt> on error. |
| 191 | */ |
| 192 | Glib::RefPtr<Gst::PluginFeature> load(); |
| 193 | |
| 194 | /** Get the plugin that provides this feature. |
| 195 | * |
| 196 | * @return The plugin that provides this |
| 197 | * feature, or <tt>nullptr</tt>. Unref with Gst::Object::unref() when no |
| 198 | * longer needed. |
| 199 | */ |
| 200 | Glib::RefPtr<Gst::Plugin> get_plugin() const; |
| 201 | |
| 202 | /** Get the name of the plugin that provides this feature. |
| 203 | * |
| 204 | * @return The name of the plugin that provides this |
| 205 | * feature, or <tt>nullptr</tt> if the feature is not associated with a |
| 206 | * plugin. |
| 207 | */ |
| 208 | Glib::ustring get_plugin_name() const; |
| 209 | |
| 210 | // Don't wrap gst_plugin_feature_list_free because Glib::ListHandle<> handles |
| 211 | // list freeing already. |
| 212 | |
| 213 | |
| 214 | /** Checks whether the given plugin feature is at least |
| 215 | * the required version |
| 216 | * |
| 217 | * @param min_major Minimum required major version. |
| 218 | * @param min_minor Minimum required minor version. |
| 219 | * @param min_micro Minimum required micro version. |
| 220 | * @return <tt>true</tt> if the plugin feature has at least |
| 221 | * the required version, otherwise <tt>false</tt>. |
| 222 | */ |
| 223 | bool check_version(guint min_major, guint min_minor, guint min_micro) const; |
| 224 | |
| 225 | |
| 226 | public: |
| 227 | |
| 228 | public: |
| 229 | //C++ methods used to invoke GTK+ virtual functions: |
| 230 | |
| 231 | protected: |
| 232 | //GTK+ Virtual Functions (override these to change behaviour): |
| 233 | |
| 234 | //Default Signal Handlers:: |
| 235 | |
| 236 | |
| 237 | }; |
| 238 | |
| 239 | } // namespace Gst |
| 240 | |
| 241 | |
| 242 | namespace Glib |
| 243 | { |
| 244 | /** A Glib::wrap() method for this object. |
| 245 | * |
| 246 | * @param object The C instance. |
| 247 | * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
| 248 | * @result A C++ instance that wraps this C instance. |
| 249 | * |
| 250 | * @relates Gst::PluginFeature |
| 251 | */ |
| 252 | Glib::RefPtr<Gst::PluginFeature> wrap(GstPluginFeature* object, bool take_copy = false); |
| 253 | } |
| 254 | |
| 255 | |
| 256 | #endif /* _GSTREAMERMM_PLUGINFEATURE_H */ |
| 257 |