Debian Codegraph @

gstreamer/src/pluginfeature.hg

raw
1 /* gstreamermm - a C++ wrapper for gstreamer
2 *
3 * Copyright 2008-2016 The gstreamermm Development Team
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include <gst/gst.h>
21 #include <gstreamermm/object.h>
22 #include <gstreamermm/plugin.h>
23
24 _DEFS(gstreamermm,gst)
25
26 namespace Gst
27 {
28
29 _WRAP_ENUM(Rank, GstRank)
30
31 /** A base class for anything that can be added to a Gst::Plugin.
32 *
33 * Last reviewed on 2016-06-06 (1.8.0)
34 */
35 class PluginFeature : public Object
36 {
37 _CLASS_GOBJECT(PluginFeature, GstPluginFeature, GST_PLUGIN_FEATURE, Object, GstObject)
38
39 public:
40 /** For example,
41 * bool on_filter(const Glib::RefPtr<Gst::PluginFeature>& feature);.
42 * The filter function should return true if the feature is a match, false
43 * otherwise.
44 */
45 typedef sigc::slot< bool, const Glib::RefPtr<Gst::PluginFeature>& > SlotFilter;
46
47 _WRAP_METHOD(void set_rank(guint rank), gst_plugin_feature_set_rank)
48 _WRAP_METHOD(guint get_rank() const, gst_plugin_feature_get_rank)
49 _WRAP_METHOD(Glib::RefPtr<Gst::PluginFeature> load(), gst_plugin_feature_load)
50 _WRAP_METHOD(Glib::RefPtr<Gst::Plugin> get_plugin() const, gst_plugin_feature_get_plugin)
51 _WRAP_METHOD(Glib::ustring get_plugin_name() const, gst_plugin_feature_get_plugin_name)
52
53 // Don't wrap gst_plugin_feature_list_free because Glib::ListHandle<> handles
54 // list freeing already.
55 _IGNORE(gst_plugin_feature_list_free)
56
57 _WRAP_METHOD(bool check_version(guint min_major, guint min_minor, guint min_micro) const, gst_plugin_feature_check_version)
58 };
59
60 } // namespace Gst