2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_DVDEC_H__
22 #define __GST_DVDEC_H__
28 #endif /* __cplusplus */
32 #include <gst/bytestream/bytestream.h>
35 /* This is the definition of the element's object structure. */
36 typedef struct _GstDVDec GstDVDec;
38 /* The structure itself is derived from GstElement, as can be seen by the
39 * fact that there's a complete instance of the GstElement structure at
40 * the beginning of the object. This allows the element to be cast to
41 * an Element or even an Object.
46 /* We need to keep track of our pads, so we do so here. */
51 dv_decoder_t *decoder;
53 gboolean clamp_chroma;
57 dv_color_space_t space;
68 gboolean need_discont;
71 gboolean found_header;
73 gint16 *audio_buffers[4];
76 /* The other half of the object is its class. The class also derives from
77 * the same parent, though it must be the class structure this time.
78 * Function pointers for polymophic methods and signals are placed in this
80 typedef struct _GstDVDecClass GstDVDecClass;
82 struct _GstDVDecClass {
83 GstElementClass parent_class;
86 /* Five standard preprocessing macros are used in the Gtk+ object system.
87 * The first uses the object's _get_type function to return the GType
90 #define GST_TYPE_DVDEC \
91 (gst_dvdec_get_type())
92 /* The second is a checking cast to the correct type. If the object passed
93 * is not the right type, a warning will be generated on stderr.
95 #define GST_DVDEC(obj) \
96 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVDEC,GstDVDec))
97 /* The third is a checking cast of the class instead of the object. */
98 #define GST_DVDEC_CLASS(klass) \
99 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVDEC,GstDVDec))
100 /* The last two simply check to see if the passed pointer is an object or
101 * class of the correct type. */
102 #define GST_IS_DVDEC(obj) \
103 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVDEC))
104 #define GST_IS_DVDEC_CLASS(obj) \
105 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVDEC))
107 /* This is the only prototype needed, because it is used in the above
108 * GST_TYPE_DVDEC macro.
110 GType gst_dvdec_get_type(void);
115 #endif /* __cplusplus */
118 #endif /* __GST_DVDEC_H__ */