1 /* GStreamer Jasper based j2k image encoder
2 * Copyright (C) 2008 Mark Nauwelaerts <mnauw@users.sf.net>
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.
20 #ifndef __GST_JASPER_ENC_H__
21 #define __GST_JASPER_ENC_H__
24 #include <gst/video/video.h>
26 #include <jasper/jasper.h>
30 /* #define's don't like whitespacey bits */
31 #define GST_TYPE_JASPER_ENC \
32 (gst_jasper_enc_get_type())
33 #define GST_JASPER_ENC(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JASPER_ENC,GstJasperEnc))
35 #define GST_JASPER_ENC_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_JASPER_ENC,GstJasperEncClass))
37 #define GST_IS_JASPER_ENC(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JASPER_ENC))
39 #define GST_IS_JASPER_ENC_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JASPER_ENC))
42 typedef struct _GstJasperEnc GstJasperEnc;
43 typedef struct _GstJasperEncClass GstJasperEncClass;
46 GST_JP2ENC_MODE_J2C = 0,
51 #define GST_JASPER_ENC_MAX_COMPONENT 4
57 GstPad *sinkpad, *srcpad;
62 /* jasper image fmt */
67 /* stream/image properties */
68 GstVideoFormat format;
72 gint fps_num, fps_den;
73 gint par_num, par_den;
74 /* standard video_format indexed */
75 gint stride[GST_JASPER_ENC_MAX_COMPONENT];
76 gint offset[GST_JASPER_ENC_MAX_COMPONENT];
77 gint inc[GST_JASPER_ENC_MAX_COMPONENT];
78 gint cwidth[GST_JASPER_ENC_MAX_COMPONENT];
79 gint cheight[GST_JASPER_ENC_MAX_COMPONENT];
82 struct _GstJasperEncClass
84 GstElementClass parent_class;
87 GType gst_jasper_enc_get_type (void);
91 #endif /* __GST_JASPER_ENC_H__ */