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_JPEG_DEC_H__
22 #define __GST_JPEG_DEC_H__
28 /* this is a hack hack hack to get around jpeglib header bugs... */
36 #define GST_TYPE_JPEG_DEC \
37 (gst_jpeg_dec_get_type())
38 #define GST_JPEG_DEC(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JPEG_DEC,GstJpegDec))
40 #define GST_JPEG_DEC_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_JPEG_DEC,GstJpegDecClass))
42 #define GST_IS_JPEG_DEC(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JPEG_DEC))
44 #define GST_IS_JPEG_DEC_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JPEG_DEC))
47 typedef struct _GstJpegDec GstJpegDec;
48 typedef struct _GstJpegDecClass GstJpegDecClass;
50 struct GstJpegDecErrorMgr {
51 struct jpeg_error_mgr pub; /* public fields */
52 jmp_buf setjmp_buffer;
55 struct GstJpegDecSourceMgr {
56 struct jpeg_source_mgr pub; /* public fields */
60 #define CINFO_GET_JPEGDEC(cinfo_ptr) \
61 (((struct GstJpegDecSourceMgr*)((cinfo_ptr)->src))->dec)
63 /* Can't use GstBaseTransform, because GstBaseTransform
64 * doesn't handle the N buffers in, 1 buffer out case,
65 * but only the 1-in 1-out case */
75 /* TRUE if each input buffer contains a whole jpeg image */
78 /* the (expected) timestamp of the next frame */
83 /* TRUE if the next output buffer should have the DISCONT flag set */
86 /* QoS stuff *//* with LOCK */
88 GstClockTime earliest_time;
89 GstClockTime qos_duration;
92 gint framerate_numerator;
93 gint framerate_denominator;
95 /* negotiated state */
96 gint caps_framerate_numerator;
97 gint caps_framerate_denominator;
101 /* temp space for samples */
103 guchar **scanarray[3];
108 struct jpeg_decompress_struct cinfo;
109 struct GstJpegDecErrorMgr jerr;
110 struct GstJpegDecSourceMgr jsrc;
113 struct _GstJpegDecClass {
114 GstElementClass parent_class;
117 GType gst_jpeg_dec_get_type(void);
123 #endif /* __GST_JPEG_DEC_H__ */