1 /* GStreamer Matroska muxer/demuxer
2 * (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
4 * matroska-mux.h: matroska file/stream muxer object types
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_MATROSKA_MUX_H__
23 #define __GST_MATROSKA_MUX_H__
27 #include "ebml-write.h"
28 #include "matroska-ids.h"
32 #define GST_TYPE_MATROSKA_MUX \
33 (gst_matroska_mux_get_type ())
34 #define GST_MATROSKA_MUX(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MATROSKA_MUX, GstMatroskaMux))
36 #define GST_MATROSKA_MUX_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MATROSKA_MUX, GstMatroskaMux))
38 #define GST_IS_MATROSKA_MUX(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MATROSKA_MUX))
40 #define GST_IS_MATROSKA_MUX_CLASS(obj) \
41 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_MUX))
43 #define GST_MATROSKA_MUX_MAX_STREAMS 64
46 GST_MATROSKA_MUX_STATE_START,
47 GST_MATROSKA_MUX_STATE_HEADER,
48 GST_MATROSKA_MUX_STATE_DATA,
49 } GstMatroskaMuxState;
51 typedef struct _GstMatroskaMux {
57 GstMatroskaTrackContext *track;
60 } sink[GST_MATROSKA_MUX_MAX_STREAMS];
62 num_v_streams, num_a_streams, num_t_streams;
64 /* metadata - includes writing_app and creation_time */
68 GstMatroskaMuxState state;
70 /* a cue (index) table */
71 GstMatroskaIndex *index;
74 /* timescale in the file */
77 /* length, position (time, ns) */
80 /* byte-positions of master-elements (for replacing contents) */
90 guint64 segment_master;
93 typedef struct _GstMatroskaMuxClass {
94 GstEbmlWriteClass parent;
95 } GstMatroskaMuxClass;
97 GType gst_matroska_mux_get_type (void);
99 gboolean gst_matroska_mux_plugin_init (GstPlugin *plugin);
103 #endif /* __GST_MATROSKA_MUX_H__ */