I've no idea here...
[gtkD.git] / gtkD / srcgstreamer / gstreamer / PluginFeature.d
blobb962e680c5e14d49a1758350b088502e190daa83
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GstPluginFeature.html
26 * outPack = gstreamer
27 * outFile = PluginFeature
28 * strct = GstPluginFeature
29 * realStrct=
30 * ctorStrct=
31 * clss = PluginFeature
32 * interf =
33 * class Code: Yes
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gst_plugin_feature_
40 * - gst_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * - gst_plugin_feature_set_name
45 * imports:
46 * - glib.Str
47 * - glib.ListG
48 * structWrap:
49 * - GList* -> ListG
50 * - GstPluginFeature* -> PluginFeature
51 * module aliases:
52 * local aliases:
55 module gstreamer.PluginFeature;
57 version(noAssert)
59 version(Tango)
61 import tango.io.Stdout; // use the tango loging?
65 private import gstreamerc.gstreamertypes;
67 private import gstreamerc.gstreamer;
70 private import glib.Str;
71 private import glib.ListG;
76 /**
77 * Description
78 * This is a base class for anything that can be added to a GstPlugin.
80 private import gstreamer.ObjectGst;
81 public class PluginFeature : ObjectGst
84 /** the main Gtk struct */
85 protected GstPluginFeature* gstPluginFeature;
88 public GstPluginFeature* getPluginFeatureStruct()
90 return gstPluginFeature;
94 /** the main Gtk struct as a void* */
95 protected void* getStruct()
97 return cast(void*)gstPluginFeature;
101 * Sets our main struct and passes it to the parent class
103 public this (GstPluginFeature* gstPluginFeature)
105 version(noAssert)
107 if ( gstPluginFeature is null )
109 int zero = 0;
110 version(Tango)
112 Stdout("struct gstPluginFeature is null on constructor").newline;
114 else
116 printf("struct gstPluginFeature is null on constructor");
118 zero = zero / zero;
121 else
123 assert(gstPluginFeature !is null, "struct gstPluginFeature is null on constructor");
125 super(cast(GstObject*)gstPluginFeature);
126 this.gstPluginFeature = gstPluginFeature;
130 * Sets the name of a plugin feature. The name uniquely identifies a feature
131 * within all features of the same type. Renaming a plugin feature is not
132 * allowed. A copy is made of the name so you should free the supplied name
133 * after calling this function.
134 * feature:
135 * a feature
136 * name:
137 * the name to set
139 public void setFeatureName(char[] name)
141 // void gst_plugin_feature_set_name (GstPluginFeature *feature, const gchar *name);
142 gst_plugin_feature_set_name(gstPluginFeature, Str.toStringz(name));
154 * Compares type and name of plugin feature. Can be used with gst_filter_run().
155 * feature:
156 * the GstPluginFeature
157 * data:
158 * the type and name to check against
159 * Returns:
160 * TRUE if equal.
162 public int typeNameFilter(GstTypeNameData* data)
164 // gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature, GstTypeNameData *data);
165 return gst_plugin_feature_type_name_filter(gstPluginFeature, data);
169 * Specifies a rank for a plugin feature, so that autoplugging uses
170 * the most appropriate feature.
171 * feature:
172 * feature to rank
173 * rank:
174 * rank value - higher number means more priority rank
176 public void setRank(uint rank)
178 // void gst_plugin_feature_set_rank (GstPluginFeature *feature, guint rank);
179 gst_plugin_feature_set_rank(gstPluginFeature, rank);
184 * Gets the rank of a plugin feature.
185 * feature:
186 * a feature
187 * Returns:
188 * The rank of the feature
190 public uint getRank()
192 // guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
193 return gst_plugin_feature_get_rank(gstPluginFeature);
197 * Gets the name of a plugin feature.
198 * feature:
199 * a feature
200 * Returns:
201 * the name
203 public char[] getName()
205 // const gchar* gst_plugin_feature_get_name (GstPluginFeature *feature);
206 return Str.toString(gst_plugin_feature_get_name(gstPluginFeature) );
210 * Loads the plugin containing feature if it's not already loaded. feature is
211 * unaffected; use the return value instead.
212 * Normally this function is used like this:
213 * GstPluginFeature *loaded_feature;
214 * loaded_feature = gst_plugin_feature_load (feature);
215 * // presumably, we're no longer interested in the potentially-unloaded feature
216 * gst_object_unref (feature);
217 * feature = loaded_feature;
218 * feature:
219 * the plugin feature to check
220 * Returns:
221 * A reference to the loaded feature, or NULL on error.
223 public PluginFeature load()
225 // GstPluginFeature* gst_plugin_feature_load (GstPluginFeature *feature);
226 return new PluginFeature( gst_plugin_feature_load(gstPluginFeature) );
230 * Unrefs each member of list, then frees the list.
231 * list:
232 * list of GstPluginFeature
234 public static void listFree(ListG list)
236 // void gst_plugin_feature_list_free (GList *list);
237 gst_plugin_feature_list_free((list is null) ? null : list.getListGStruct());
241 * Checks whether the given plugin feature is at least
242 * the required version
243 * feature:
244 * a feature
245 * min_major:
246 * minimum required major version
247 * min_minor:
248 * minimum required minor version
249 * min_micro:
250 * minimum required micro version
251 * Returns:
252 * TRUE if the plugin feature has at least
253 * the required version, otherwise FALSE.
254 * See Also
255 * GstPlugin
257 public int checkVersion(uint minMajor, uint minMinor, uint minMicro)
259 // gboolean gst_plugin_feature_check_version (GstPluginFeature *feature, guint min_major, guint min_minor, guint min_micro);
260 return gst_plugin_feature_check_version(gstPluginFeature, minMajor, minMinor, minMicro);