2 * gstcmmldec.h - GStreamer annodex CMML decoder
3 * Copyright (C) 2005 Alessandro Decina
6 * Alessandro Decina <alessandro@nnva.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef __GST_CMML_DEC_H__
25 #define __GST_CMML_DEC_H__
28 #include <gst/gstformat.h>
29 #include <gst/controller/gstcontroller.h>
31 #include "gstcmmlparser.h"
34 #define GST_TYPE_CMML_DEC (gst_cmml_dec_get_type())
35 #define GST_CMML_DEC(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_DEC, GstCmmlDec))
37 #define GST_CMML_DEC_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_DEC, GstCmmlDecClass))
39 #define GST_IS_CMML_DEC(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_CMML_DEC))
41 #define GST_IS_CMML_DEC_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_CMML_DEC))
43 #define GST_CMML_DEC_GET_CLASS(klass) \
44 (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_CMML_DEC, GstCmmlDecClass))
46 typedef struct _GstCmmlDec GstCmmlDec;
47 typedef struct _GstCmmlDecClass GstCmmlDecClass;
48 typedef enum _GstCmmlPacketType GstCmmlPacketType;
50 enum _GstCmmlPacketType
52 GST_CMML_PACKET_UNKNOWN,
53 GST_CMML_PACKET_IDENT_HEADER,
54 GST_CMML_PACKET_FIRST_HEADER,
55 GST_CMML_PACKET_SECOND_HEADER,
68 gint16 major; /* bitstream version major */
69 gint16 minor; /* bitstream version minor */
70 gint64 granulerate_n; /* bitrstream granulerate numerator */
71 gint64 granulerate_d; /* bitstream granulerate denominator */
72 gint8 granuleshift; /* bitstreamgranuleshift */
73 gint64 granulepos; /* bitstream granule position */
74 GstClockTime timestamp; /* timestamp of the last buffer */
77 GstCmmlParser *parser; /* cmml parser */
79 GstFlowReturn flow_return; /* _chain return value */
80 gboolean wait_clip_end; /* when TRUE, the GST_TAG_MESSAGE for a
81 * clip is sent when the next clip (or EOS)
82 * is found, so that the clip end-time is
83 * known. This is useful for pre-extracting
89 struct _GstCmmlDecClass
91 GstElementClass parent_class;
94 GType gst_cmml_dec_get_type (void);
96 gboolean gst_cmml_dec_plugin_init (GstPlugin * plugin);
98 #endif /* __GST_CMML_DEC_H__ */