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__
29 #endif /* __cplusplus */
33 #include <gst/bytestream/bytestream.h>
36 /* This is the definition of the element's object structure. */
37 typedef struct _GstDVDec GstDVDec;
39 /* The structure itself is derived from GstElement, as can be seen by the
40 * fact that there's a complete instance of the GstElement structure at
41 * the beginning of the object. This allows the element to be cast to
42 * an Element or even an Object.
48 /* We need to keep track of our pads, so we do so here. */
49 GstPad *sinkpad, *videosrcpad, *audiosrcpad;
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;
84 GstElementClass parent_class;
87 /* Five standard preprocessing macros are used in the Gtk+ object system.
88 * The first uses the object's _get_type function to return the GType
91 #define GST_TYPE_DVDEC \
92 (gst_dvdec_get_type())
93 /* The second is a checking cast to the correct type. If the object passed
94 * is not the right type, a warning will be generated on stderr.
96 #define GST_DVDEC(obj) \
97 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVDEC,GstDVDec))
98 /* The third is a checking cast of the class instead of the object. */
99 #define GST_DVDEC_CLASS(klass) \
100 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVDEC,GstDVDec))
101 /* The last two simply check to see if the passed pointer is an object or
102 * class of the correct type. */
103 #define GST_IS_DVDEC(obj) \
104 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVDEC))
105 #define GST_IS_DVDEC_CLASS(obj) \
106 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVDEC))
108 /* This is the only prototype needed, because it is used in the above
109 * GST_TYPE_DVDEC macro.
111 GType gst_dvdec_get_type (void);
116 #endif /* __cplusplus */
119 #endif /* __GST_DVDEC_H__ */