1 /* -*- c-basic-offset: 2 -*- 2 * GStreamer 3 * Copyright (C) <2004> Thomas Vander Stichele <thomas at apestaart dot 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 22 #ifndef __GST_VORBIS_PARSE_H__ 23 #define __GST_VORBIS_PARSE_H__ 24 25 26 #include <gst/gst.h> 27 #include <vorbis/codec.h> 28 29 G_BEGIN_DECLS 30 31 #define GST_TYPE_VORBIS_PARSE \ 32 (gst_vorbis_parse_get_type()) 33 #define GST_VORBIS_PARSE(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VORBIS_PARSE,GstVorbisParse)) 35 #define GST_VORBIS_PARSE_CLASS(klass) \ 36 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VORBIS_PARSE,GstVorbisParseClass)) 37 #define GST_IS_VORBIS_PARSE(obj) \ 38 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VORBIS_PARSE)) 39 #define GST_IS_VORBIS_PARSE_CLASS(klass) \ 40 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VORBIS_PARSE)) 41 42 typedef struct _GstVorbisParse GstVorbisParse; 43 typedef struct _GstVorbisParseClass GstVorbisParseClass; 44 45 /** 46 * GstVorbisParse: 47 * 48 * Opaque data structure. 49 */ 50 struct _GstVorbisParse { 51 GstElement element; 52 53 GstPad * sinkpad; 54 GstPad * srcpad; 55 56 guint packetno; 57 gboolean streamheader_sent; 58 GList * streamheader; 59 60 GQueue * event_queue; 61 GQueue * buffer_queue; 62 63 vorbis_info vi; 64 vorbis_comment vc; 65 66 gint64 prev_granulepos; 67 gint32 prev_blocksize; 68 guint32 sample_rate; 69 guint32 channels; 70 }; 71 72 struct _GstVorbisParseClass { 73 GstElementClass parent_class; 74 75 /* virtual functions */ 76 GstFlowReturn (*parse_packet) (GstVorbisParse * parse, GstBuffer * buf); 77 }; 78 79 GType gst_vorbis_parse_get_type(void); 80 81 G_END_DECLS 82 83 #endif /* __GST_VORBIS_PARSE_H__ */ 84