2 * Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
4 * gstmultipartmux.h: multipart stream muxer
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_MULTIPART_MUX__
23 #define __GST_MULTIPART_MUX__
26 #include <gst/base/gstcollectpads.h>
32 #define GST_TYPE_MULTIPART_MUX (gst_multipart_mux_get_type())
33 #define GST_MULTIPART_MUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIPART_MUX, GstMultipartMux))
34 #define GST_MULTIPART_MUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTIPART_MUX, GstMultipartMux))
35 #define GST_MULTIPART_MUX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MULTIPART_MUX, GstMultipartMuxClass))
36 #define GST_IS_MULTIPART_MUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIPART_MUX))
37 #define GST_IS_MULTIPART_MUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIPART_MUX))
39 typedef struct _GstMultipartMux GstMultipartMux;
40 typedef struct _GstMultipartMuxClass GstMultipartMuxClass;
42 /* all information needed for one multipart stream */
45 GstCollectData collect; /* we extend the CollectData */
47 GstBuffer *buffer; /* the queued buffer for this pad */
48 GstClockTime timestamp; /* its timestamp, converted to running_time so that we can
49 correctly sort over multiple segments. */
57 * The opaque #GstMultipartMux structure.
59 struct _GstMultipartMux
67 GstCollectPads *collect;
71 /* offset in stream */
78 gboolean need_segment;
81 struct _GstMultipartMuxClass
83 GstElementClass parent_class;
85 GHashTable *mimetypes;
88 GType gst_multipart_mux_get_type (void);
90 gboolean gst_multipart_mux_plugin_init (GstPlugin * plugin);
94 #endif /* __GST_MULTIPART_MUX__ */