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 = gstreamer-GstFormat.html
46 * - gstreamer.Iterator
48 * - GstIterator* -> Iterator
53 module gstreamer
.Format
;
55 private import gstreamerc
.gstreamertypes
;
57 private import gstreamerc
.gstreamer
;
59 private import glib
.Str
;
60 private import gstreamer
.Iterator
;
66 * GstFormats functions are used to register a new format to the gstreamer
67 * core. Formats can be used to perform seeking or conversions/query
71 /** the main Gtk struct */
72 protected GstFormat
* gstFormat
;
83 * Get a printable name for the given format. Do not modify or free.
87 * a reference to the static name of the format or NULL if
88 * the format is unknown.
90 public static char[] getName(GstFormat format
)
92 // const gchar* gst_format_get_name (GstFormat format);
93 return Str
.toString(gst_format_get_name(format
) );
97 * Get the unique quark for the given format.
101 * the quark associated with the format or 0 if the format
104 public static GQuark
toQuark(GstFormat format
)
106 // GQuark gst_format_to_quark (GstFormat format);
107 return gst_format_to_quark(format
);
111 * Create a new GstFormat based on the nick or return an
112 * already registered format with that nick.
114 * The nick of the new format
116 * The description of the new format
118 * A new GstFormat or an already registered format
119 * with the same nick.
122 public static GstFormat
register(char[] nick
, char[] description
)
124 // GstFormat gst_format_register (const gchar *nick, const gchar *description);
125 return gst_format_register(Str
.toStringz(nick
), Str
.toStringz(description
));
129 * Return the format registered with the given nick.
131 * The nick of the format
133 * The format with nick or GST_FORMAT_UNDEFINED
134 * if the format was not registered.
136 public static GstFormat
getByNick(char[] nick
)
138 // GstFormat gst_format_get_by_nick (const gchar *nick);
139 return gst_format_get_by_nick(Str
.toStringz(nick
));
143 * See if the given format is inside the format array.
145 * The format array to search
149 * TRUE if the format is found inside the array
151 public int formatsContains(GstFormat format
)
153 // gboolean gst_formats_contains (const GstFormat *formats, GstFormat format);
154 return gst_formats_contains(gstFormat
, format
);
158 * Get details about the given format.
160 * The format to get details of
162 * The GstFormatDefinition for format or NULL on failure.
165 public static GstFormatDefinition
* getDetails(GstFormat format
)
167 // const GstFormatDefinition* gst_format_get_details (GstFormat format);
168 return gst_format_get_details(format
);
172 * Iterate all the registered formats. The format definition is read
175 * A GstIterator of GstFormatDefinition.
179 public static Iterator
iterateDefinitions()
181 // GstIterator* gst_format_iterate_definitions (void);
182 return new Iterator( gst_format_iterate_definitions() );