Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / gst / goom2k1 / gstgoom.h
1 /* gstgoom.c: implementation of goom drawing element
2  * Copyright (C) <2001> Richard Boulton <richard@tartarus.org>
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_GOOM_H__
21 #define __GST_GOOM_H__
22
23 G_BEGIN_DECLS
24
25 #include <gst/gst.h>
26 #include <gst/base/gstadapter.h>
27 #include "goom_core.h"
28
29 #define GOOM_SAMPLES 512
30
31 #define GST_TYPE_GOOM            (gst_goom_get_type())
32 #define GST_GOOM(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GOOM,GstGoom))
33 #define GST_GOOM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GOOM,GstGoomClass))
34 #define GST_IS_GOOM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GOOM))
35 #define GST_IS_GOOM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GOOM))
36
37 typedef struct _GstGoom GstGoom;
38 typedef struct _GstGoomClass GstGoomClass;
39
40 struct _GstGoom
41 {
42   GstElement element;
43
44   /* pads */
45   GstPad *sinkpad, *srcpad;
46   GstAdapter *adapter;
47
48   /* input tracking */
49   gint rate;
50   gint channels;
51   guint bps;
52
53   /* video state */
54   gint fps_n;
55   gint fps_d;
56   gint width;
57   gint height;
58   GstClockTime duration;
59   guint outsize;
60
61   /* samples per frame */
62   guint spf;
63   /* bytes per frame */
64   guint bpf;
65
66   /* goom stuff */
67   gint16 datain[2][GOOM_SAMPLES];
68   GoomData goomdata;
69
70   /* segment state */
71   GstSegment segment;
72
73   /* QoS stuff *//* with LOCK */
74   gdouble proportion;
75   GstClockTime earliest_time;
76 };
77
78 struct _GstGoomClass
79 {
80   GstElementClass parent_class;
81 };
82
83 GType gst_goom_get_type (void);
84
85 G_END_DECLS
86
87 #endif /* __GST_GOOM_H__ */
88