2 * (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3 * (c) 2005 Michal Benes <michal.benes@xeris.cz>
5 * ebml-write.c: write EBML data to file/stream
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __GST_EBML_WRITE_H__
24 #define __GST_EBML_WRITE_H__
31 #define GST_TYPE_EBML_WRITE \
32 (gst_ebml_write_get_type ())
33 #define GST_EBML_WRITE(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_EBML_WRITE, GstEbmlWrite))
35 #define GST_EBML_WRITE_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_EBML_WRITE, GstEbmlWriteClass))
37 #define GST_IS_EBML_WRITE(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_EBML_WRITE))
39 #define GST_IS_EBML_WRITE_CLASS(obj) \
40 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_EBML_WRITE))
41 #define GST_EBML_WRITE_GET_CLASS(obj) \
42 (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_EBML_WRITE, GstEbmlWriteClass))
44 typedef struct _GstEbmlWrite {
49 GstClockTime timestamp;
55 GstFlowReturn last_write_result;
57 gboolean need_newsegment;
60 gpointer _gst_reserved[GST_PADDING];
63 typedef struct _GstEbmlWriteClass {
64 GstObjectClass parent;
67 gpointer _gst_reserved[GST_PADDING];
70 GType gst_ebml_write_get_type (void);
72 GstEbmlWrite *gst_ebml_write_new (GstPad *srcpad);
73 void gst_ebml_write_reset (GstEbmlWrite *ebml);
75 GstFlowReturn gst_ebml_last_write_result (GstEbmlWrite *ebml);
78 * Caching means that we do not push one buffer for
79 * each element, but fill this one until a flush.
81 void gst_ebml_write_set_cache (GstEbmlWrite *ebml,
83 void gst_ebml_write_flush_cache (GstEbmlWrite *ebml);
88 void gst_ebml_write_seek (GstEbmlWrite *ebml,
94 void gst_ebml_write_uint (GstEbmlWrite *ebml,
97 void gst_ebml_write_sint (GstEbmlWrite *ebml,
100 void gst_ebml_write_float (GstEbmlWrite *ebml,
103 void gst_ebml_write_ascii (GstEbmlWrite *ebml,
106 void gst_ebml_write_utf8 (GstEbmlWrite *ebml,
109 void gst_ebml_write_date (GstEbmlWrite *ebml,
112 guint64 gst_ebml_write_master_start (GstEbmlWrite *ebml,
114 void gst_ebml_write_master_finish (GstEbmlWrite *ebml,
116 void gst_ebml_write_binary (GstEbmlWrite *ebml,
120 void gst_ebml_write_header (GstEbmlWrite *ebml,
125 * Note: this is supposed to be used only for media data.
127 void gst_ebml_write_buffer_header (GstEbmlWrite *ebml,
130 void gst_ebml_write_buffer (GstEbmlWrite *ebml,
134 * A hack, basically... See matroska-mux.c. I should actually
135 * make a nice _replace_element_with_size() or so, but this
138 void gst_ebml_replace_uint (GstEbmlWrite *ebml,
144 #endif /* __GST_EBML_WRITE_H__ */