1 /* Copyright 2005 Jan Schmidt <thaytan@mad.scientist.com> 2 * 2006 Michael Smith <msmith@fluendo.com> 3 * Copyright (C) 2003-2004 Benjamin Otte <otte@gnome.org> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef __GST_ICYDEMUX_H__ 22 #define __GST_ICYDEMUX_H__ 23 24 #include <gst/gst.h> 25 #include <gst/base/gstadapter.h> 26 #include <gst/base/gsttypefindhelper.h> 27 28 G_BEGIN_DECLS 29 30 #define GST_TYPE_ICYDEMUX \ 31 (gst_icydemux_get_type()) 32 #define GST_ICYDEMUX(obj) \ 33 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ICYDEMUX,GstICYDemux)) 34 #define GST_ICYDEMUX_CLASS(klass) \ 35 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ICYDEMUX,GstICYDemuxClass)) 36 #define GST_IS_ICYDEMUX(obj) \ 37 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ICYDEMUX)) 38 #define GST_IS_ICYDEMUX_CLASS(klass) \ 39 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ICYDEMUX)) 40 41 typedef struct _GstICYDemux GstICYDemux; 42 typedef struct _GstICYDemuxClass GstICYDemuxClass; 43 44 struct _GstICYDemux 45 { 46 GstElement element; 47 48 GstPad *sinkpad, *srcpad; 49 50 /* Interval between metadata updates */ 51 gint meta_interval; 52 53 /* Remaining bytes until the next metadata update */ 54 gint remaining; 55 56 /* When 'remaining' is zero, this holds the number of bytes of metadata we 57 * still need to read, or zero if we don't yet know (which means we need to 58 * read one byte, after which we can initialise this properly) */ 59 gint meta_remaining; 60 61 /* Caps for the data enclosed */ 62 GstCaps *src_caps; 63 64 /* True if we're still typefinding */ 65 gboolean typefinding; 66 67 GstTagList *cached_tags; 68 GList *cached_events; 69 70 GstAdapter *meta_adapter; 71 72 GstBuffer *typefind_buf; 73 74 /* upstream HTTP Content-Type */ 75 gchar *content_type; 76 }; 77 78 struct _GstICYDemuxClass 79 { 80 GstElementClass parent_class; 81 }; 82 83 GType gst_icydemux_get_type (void); 84 85 GST_ELEMENT_REGISTER_DECLARE (icydemux); 86 87 G_END_DECLS 88 89 #endif /* __GST_ICYDEMUX_H__ */ 90