alternative to assert
[gtkD.git] / gtkD / srcgstreamer / gstreamer / Format.d
blob9bf0e91ed2d19e3c1e5b16c8dcc3a973ccaaeccb
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 = gstreamer-GstFormat.html
26 * outPack = gstreamer
27 * outFile = Format
28 * strct = GstFormat
29 * realStrct=
30 * ctorStrct=
31 * clss =
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gst_format_
40 * - gst_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * - glib.Str
46 * - gstreamer.Iterator
47 * structWrap:
48 * - GstIterator* -> Iterator
49 * module aliases:
50 * local aliases:
53 module gstreamer.Format;
55 private import gstreamerc.gstreamertypes;
57 private import gstreamerc.gstreamer;
59 private import glib.Str;
60 private import gstreamer.Iterator;
64 /**
65 * Description
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
68 * operations.
71 /** the main Gtk struct */
72 protected GstFormat* gstFormat;
75 /**
82 /**
83 * Get a printable name for the given format. Do not modify or free.
84 * format:
85 * a GstFormat
86 * Returns:
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) );
96 /**
97 * Get the unique quark for the given format.
98 * format:
99 * a GstFormat
100 * Returns:
101 * the quark associated with the format or 0 if the format
102 * is unknown.
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.
113 * nick:
114 * The nick of the new format
115 * description:
116 * The description of the new format
117 * Returns:
118 * A new GstFormat or an already registered format
119 * with the same nick.
120 * MT safe.
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.
130 * nick:
131 * The nick of the format
132 * Returns:
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.
144 * formats:
145 * The format array to search
146 * format:
147 * the format to find
148 * Returns:
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.
159 * format:
160 * The format to get details of
161 * Returns:
162 * The GstFormatDefinition for format or NULL on failure.
163 * MT safe.
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
173 * only.
174 * Returns:
175 * A GstIterator of GstFormatDefinition.
176 * See Also
177 * GstPad, GstElement
179 public static Iterator iterateDefinitions()
181 // GstIterator* gst_format_iterate_definitions (void);
182 return new Iterator( gst_format_iterate_definitions() );