~oah-dev/oah/gst-plugins-bad

« back to all changes in this revision

Viewing changes to ext/jp2k/gstjasperdec.h

  • Committer: Haakon Sporsheim
  • Date: 2009-03-12 13:52:03 UTC
  • Revision ID: haakon.sporsheim@tandberg.com-20090312135203-i5k294hgkushb0mt
Initial import of git repository: git://anongit.freedesktop.org/gstreamer/gst-plugins-bad (tag: RELEASE-0_10_10)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GStreamer Jasper based j2k image decoder
 
2
 * Copyright (C) 2008 Mark Nauwelaerts <mnauw@users.sf.net>
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef __GST_JASPER_DEC_H__
 
21
#define __GST_JASPER_DEC_H__
 
22
 
 
23
#include <gst/gst.h>
 
24
#include <gst/video/video.h>
 
25
 
 
26
#include <jasper/jasper.h>
 
27
 
 
28
G_BEGIN_DECLS
 
29
 
 
30
/* #define's don't like whitespacey bits */
 
31
#define GST_TYPE_JASPER_DEC                     \
 
32
  (gst_jasper_dec_get_type())
 
33
#define GST_JASPER_DEC(obj)                                             \
 
34
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JASPER_DEC,GstJasperDec))
 
35
#define GST_JASPER_DEC_CLASS(klass)                                     \
 
36
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_JASPER_DEC,GstJasperDecClass))
 
37
#define GST_IS_JASPER_DEC(obj)                                  \
 
38
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JASPER_DEC))
 
39
#define GST_IS_JASPER_DEC_CLASS(klass)                          \
 
40
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JASPER_DEC))
 
41
 
 
42
typedef struct _GstJasperDec      GstJasperDec;
 
43
typedef struct _GstJasperDecClass GstJasperDecClass;
 
44
 
 
45
#define GST_JASPER_DEC_MAX_COMPONENT  4
 
46
 
 
47
struct _GstJasperDec
 
48
{
 
49
  GstElement element;
 
50
 
 
51
  GstPad *sinkpad, *srcpad;
 
52
 
 
53
  GstBuffer *codec_data;
 
54
 
 
55
  /* jasper image fmt */
 
56
  gint fmt;
 
57
  jas_clrspc_t clrspc;
 
58
  gint strip;
 
59
 
 
60
  /* stream/image properties */
 
61
  GstVideoFormat format;
 
62
  gint width;
 
63
  gint height;
 
64
  gint channels;
 
65
  guint image_size;
 
66
  gint stride[GST_JASPER_DEC_MAX_COMPONENT];
 
67
  gint offset[GST_JASPER_DEC_MAX_COMPONENT];
 
68
  gint inc[GST_JASPER_DEC_MAX_COMPONENT];
 
69
  gboolean alpha;
 
70
  glong *buf;
 
71
 
 
72
  /* image cmpt indexed */
 
73
  gint cwidth[GST_JASPER_DEC_MAX_COMPONENT];
 
74
  gint cheight[GST_JASPER_DEC_MAX_COMPONENT];
 
75
  /* standard video_format indexed */
 
76
  gint cmpt[GST_JASPER_DEC_MAX_COMPONENT];
 
77
 
 
78
  gint framerate_numerator;
 
79
  gint framerate_denominator;
 
80
};
 
81
 
 
82
struct _GstJasperDecClass
 
83
{
 
84
  GstElementClass parent_class;
 
85
};
 
86
 
 
87
GType gst_jasper_dec_get_type (void);
 
88
 
 
89
G_END_DECLS
 
90
 
 
91
#endif /* __GST_JASPER_DEC_H__ */