Wrote the README_GIT file to be a proper tutorial on git, repo.or.cz and gtkD.
[gtkD.git] / gtkD / srcgstreamer / gstreamer / Format.d
blobc3d2af6f5f931171079ce6c1af36b185bfc65111
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 version(noAssert)
57 version(Tango)
59 import tango.io.Stdout; // use the tango loging?
63 private import gstreamerc.gstreamertypes;
65 private import gstreamerc.gstreamer;
68 private import glib.Str;
69 private import gstreamer.Iterator;
74 /**
75 * Description
76 * GstFormats functions are used to register a new format to the gstreamer
77 * core. Formats can be used to perform seeking or conversions/query
78 * operations.
81 /** the main Gtk struct */
82 protected GstFormat* gstFormat;
85 /**
92 /**
93 * Get a printable name for the given format. Do not modify or free.
94 * format:
95 * a GstFormat
96 * Returns:
97 * a reference to the static name of the format or NULL if
98 * the format is unknown.
100 public static char[] getName(GstFormat format)
102 // const gchar* gst_format_get_name (GstFormat format);
103 return Str.toString(gst_format_get_name(format) );
107 * Get the unique quark for the given format.
108 * format:
109 * a GstFormat
110 * Returns:
111 * the quark associated with the format or 0 if the format
112 * is unknown.
114 public static GQuark toQuark(GstFormat format)
116 // GQuark gst_format_to_quark (GstFormat format);
117 return gst_format_to_quark(format);
121 * Create a new GstFormat based on the nick or return an
122 * already registered format with that nick.
123 * nick:
124 * The nick of the new format
125 * description:
126 * The description of the new format
127 * Returns:
128 * A new GstFormat or an already registered format
129 * with the same nick.
130 * MT safe.
132 public static GstFormat register(char[] nick, char[] description)
134 // GstFormat gst_format_register (const gchar *nick, const gchar *description);
135 return gst_format_register(Str.toStringz(nick), Str.toStringz(description));
139 * Return the format registered with the given nick.
140 * nick:
141 * The nick of the format
142 * Returns:
143 * The format with nick or GST_FORMAT_UNDEFINED
144 * if the format was not registered.
146 public static GstFormat getByNick(char[] nick)
148 // GstFormat gst_format_get_by_nick (const gchar *nick);
149 return gst_format_get_by_nick(Str.toStringz(nick));
153 * See if the given format is inside the format array.
154 * formats:
155 * The format array to search
156 * format:
157 * the format to find
158 * Returns:
159 * TRUE if the format is found inside the array
161 public int formatsContains(GstFormat format)
163 // gboolean gst_formats_contains (const GstFormat *formats, GstFormat format);
164 return gst_formats_contains(gstFormat, format);
168 * Get details about the given format.
169 * format:
170 * The format to get details of
171 * Returns:
172 * The GstFormatDefinition for format or NULL on failure.
173 * MT safe.
175 public static GstFormatDefinition* getDetails(GstFormat format)
177 // const GstFormatDefinition* gst_format_get_details (GstFormat format);
178 return gst_format_get_details(format);
182 * Iterate all the registered formats. The format definition is read
183 * only.
184 * Returns:
185 * A GstIterator of GstFormatDefinition.
186 * See Also
187 * GstPad, GstElement
189 public static Iterator iterateDefinitions()
191 // GstIterator* gst_format_iterate_definitions (void);
192 return new Iterator( gst_format_iterate_definitions() );