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
;
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
;
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
81 /** the main Gtk struct */
82 protected GstFormat
* gstFormat
;
93 * Get a printable name for the given format. Do not modify or free.
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.
111 * the quark associated with the format or 0 if the format
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.
124 * The nick of the new format
126 * The description of the new format
128 * A new GstFormat or an already registered format
129 * with the same nick.
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.
141 * The nick of the format
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.
155 * The format array to search
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.
170 * The format to get details of
172 * The GstFormatDefinition for format or NULL on failure.
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
185 * A GstIterator of GstFormatDefinition.
189 public static Iterator
iterateDefinitions()
191 // GstIterator* gst_format_iterate_definitions (void);
192 return new Iterator( gst_format_iterate_definitions() );