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
27 * outFile = PluginFeature
28 * strct = GstPluginFeature
31 * clss = PluginFeature
39 * - gst_plugin_feature_
44 * - gst_plugin_feature_set_name
50 * - GstPluginFeature* -> PluginFeature
55 module gstreamer
.PluginFeature
;
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
;
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
)
107 if ( gstPluginFeature
is null )
112 Stdout("struct gstPluginFeature is null on constructor").newline
;
116 printf("struct gstPluginFeature is null on constructor");
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.
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().
156 * the GstPluginFeature
158 * the type and name to check against
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.
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.
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.
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;
219 * the plugin feature to check
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.
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
246 * minimum required major version
248 * minimum required minor version
250 * minimum required micro version
252 * TRUE if the plugin feature has at least
253 * the required version, otherwise FALSE.
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
);