1 /* -*- c-basic-offset: 2 -*- 2 * GStreamer 3 * Copyright (C) <2004> Thomas Vander Stichele <thomas at apestaart dot org> 4 * Copyright (C) 2006 Andy Wingo <wingo@pobox.com> 5 * 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. 10 * 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. 15 * 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., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 23 #ifndef __GST_THEORA_PARSE_H__ 24 #define __GST_THEORA_PARSE_H__ 25 26 27 #include <gst/gst.h> 28 #include <theora/theoradec.h> 29 30 G_BEGIN_DECLS 31 32 #define GST_TYPE_THEORA_PARSE \ 33 (gst_theora_parse_get_type()) 34 #define GST_THEORA_PARSE(obj) \ 35 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_THEORA_PARSE,GstTheoraParse)) 36 #define GST_THEORA_PARSE_CLASS(klass) \ 37 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_THEORA_PARSE,GstTheoraParseClass)) 38 #define GST_IS_THEORA_PARSE(obj) \ 39 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_THEORA_PARSE)) 40 #define GST_IS_THEORA_PARSE_CLASS(klass) \ 41 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_THEORA_PARSE)) 42 43 typedef struct _GstTheoraParse GstTheoraParse; 44 typedef struct _GstTheoraParseClass GstTheoraParseClass; 45 46 /** 47 * GstTheoraParse: 48 * 49 * Opaque data structure. 50 */ 51 struct _GstTheoraParse { 52 GstElement element; 53 54 GstPad * sinkpad; 55 GstPad * srcpad; 56 57 gboolean send_streamheader; 58 gboolean streamheader_received; 59 gboolean is_old_bitstream; 60 GstBuffer * streamheader[3]; 61 62 GQueue * event_queue; 63 GQueue * buffer_queue; 64 65 th_info info; 66 th_comment comment; 67 68 gint64 prev_frame; 69 gint64 prev_keyframe; 70 guint32 fps_n; 71 guint32 fps_d; 72 gint shift; 73 gint64 granule_offset; 74 75 GstClockTime *times; 76 gint npairs; 77 }; 78 79 struct _GstTheoraParseClass { 80 GstElementClass parent_class; 81 }; 82 83 GType gst_theora_parse_get_type(void); 84 85 GST_ELEMENT_REGISTER_DECLARE (theoraparse); 86 87 G_END_DECLS 88 89 #endif /* __GST_THEORA_PARSE_H__ */ 90