2 * Copyright (C) 2006 Sjoerd Simons <sjoerd@luon.net>
3 * Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
5 * gstmultipartdemux.h: multipart stream demuxer
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_MULTIPART_DEMUX__
24 #define __GST_MULTIPART_DEMUX__
27 #include <gst/base/gstadapter.h>
33 #define GST_TYPE_MULTIPART_DEMUX (gst_multipart_demux_get_type())
34 #define GST_MULTIPART_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIPART_DEMUX, GstMultipartDemux))
35 #define GST_MULTIPART_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTIPART_DEMUX, GstMultipartDemux))
36 #define GST_MULTIPART_DEMUX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MULTIPART_DEMUX, GstMultipartDemuxClass))
37 #define GST_IS_MULTIPART_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIPART_DEMUX))
38 #define GST_IS_MULTIPART_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIPART_DEMUX))
40 typedef struct _GstMultipartDemux GstMultipartDemux;
41 typedef struct _GstMultipartDemuxClass GstMultipartDemuxClass;
43 #define MULTIPART_NEED_MORE_DATA -1
44 #define MULTIPART_DATA_ERROR -2
45 #define MULTIPART_DATA_EOS -3
47 /* all information needed for one multipart stream */
50 GstPad *pad; /* reference for this pad is held by element we belong to */
54 GstFlowReturn last_ret;
61 * The opaque #GstMultipartDemux structure.
63 struct _GstMultipartDemux
75 /* Header information of the current frame */
76 gboolean header_completed;
82 /* deprecated, unused */
85 /* Index inside the current data when manually looking for the boundary */
88 gboolean singleStream;
91 struct _GstMultipartDemuxClass
93 GstElementClass parent_class;
98 GType gst_multipart_demux_get_type (void);
100 gboolean gst_multipart_demux_plugin_init (GstPlugin * plugin);
104 #endif /* __GST_MULTIPART_DEMUX__ */