diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2005-10-14 12:43:30 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2005-10-14 12:43:30 +0000 |
commit | 22b9a5cd4310a0c4b4ab1508c0ac8fb6a951f061 (patch) | |
tree | 7425a287d6c908eb1acda5b99793ac69343d7a32 /gst/matroska/matroska-mux.h | |
parent | fb495736bc531080df1a7874d7ef3b94679d25a9 (diff) |
Port matroska muxer to 0.9 (#318847).
Original commit message from CVS:
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
* configure.ac:
* gst/matroska/Makefile.am:
* gst/matroska/ebml-ids.h:
* gst/matroska/ebml-write.c:
* gst/matroska/ebml-write.h:
* gst/matroska/matroska-ids.h:
* gst/matroska/matroska-mux.c:
* gst/matroska/matroska-mux.h:
* gst/matroska/matroska.c: (plugin_init):
Port matroska muxer to 0.9 (#318847).
Diffstat (limited to 'gst/matroska/matroska-mux.h')
-rw-r--r-- | gst/matroska/matroska-mux.h | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/gst/matroska/matroska-mux.h b/gst/matroska/matroska-mux.h index ce4c3275..15f113cc 100644 --- a/gst/matroska/matroska-mux.h +++ b/gst/matroska/matroska-mux.h @@ -1,5 +1,6 @@ /* GStreamer Matroska muxer/demuxer * (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> + * (c) 2005 Michal Benes <michal.benes@xeris.cz> * * matroska-mux.h: matroska file/stream muxer object types * @@ -23,6 +24,7 @@ #define __GST_MATROSKA_MUX_H__ #include <gst/gst.h> +#include <gst/base/gstcollectpads.h> #include "ebml-write.h" #include "matroska-ids.h" @@ -40,8 +42,6 @@ G_BEGIN_DECLS #define GST_IS_MATROSKA_MUX_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_MUX)) -#define GST_MATROSKA_MUX_MAX_STREAMS 64 - typedef struct _BITMAPINFOHEADER { guint32 bi_size; guint32 bi_width; @@ -67,22 +67,32 @@ typedef struct _GstMatroskaMetaSeekIndex { guint64 pos; } GstMatroskaMetaSeekIndex; +/* all information needed for one matroska stream */ +typedef struct +{ + GstCollectData collect; /* we extend the CollectData */ + GstMatroskaTrackContext *track; + + GstBuffer *buffer; /* the queued buffer for this pad */ + + guint64 duration; +} +GstMatroskaPad; + + typedef struct _GstMatroskaMux { - GstEbmlWrite parent; + GstElement element; /* pads */ GstPad *srcpad; - struct { - GstMatroskaTrackContext *track; - GstBuffer *buffer; - gboolean eos; - guint64 duration; - } sink[GST_MATROSKA_MUX_MAX_STREAMS]; + GstCollectPads *collect; + GstEbmlWrite *ebml_write; + guint num_streams, num_v_streams, num_a_streams, num_t_streams; - /* metadata - includes writing_app and creation_time */ - GstCaps *metadata; + /* Application name (for the writing application header element) */ + gchar *writing_app; /* state */ GstMatroskaMuxState state; @@ -99,15 +109,13 @@ typedef struct _GstMatroskaMux { /* byte-positions of master-elements (for replacing contents) */ guint64 segment_pos, - seekhead_pos, - cues_pos, -#if 0 - tags_pos, -#endif - info_pos, - tracks_pos, - duration_pos, - meta_pos; + seekhead_pos, + cues_pos, + /* tags_pos, */ + info_pos, + tracks_pos, + duration_pos, + meta_pos; guint64 segment_master; /* current cluster */ @@ -121,7 +129,7 @@ typedef struct _GstMatroskaMux { } GstMatroskaMux; typedef struct _GstMatroskaMuxClass { - GstEbmlWriteClass parent; + GstElementClass parent; } GstMatroskaMuxClass; GType gst_matroska_mux_get_type (void); |