Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / gst / monoscope / gstmonoscope.h
1 /* GStreamer monoscope visualisation element
2  * Copyright (C) <2002> Richard Boulton <richard@tartarus.org>
3  * Copyright (C) <2006> Tim-Philipp Müller <tim centricular net>
4  * Copyright (C) <2006> Wim Taymans <wim at fluendo dot com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GST_MONOSCOPE__
23 #define __GST_MONOSCOPE__
24
25 G_BEGIN_DECLS
26
27 #include <gst/gst.h>
28 #include <gst/base/gstadapter.h>
29
30 #define GST_TYPE_MONOSCOPE            (gst_monoscope_get_type())
31 #define GST_MONOSCOPE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MONOSCOPE,GstMonoscope))
32 #define GST_MONOSCOPE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MONOSCOPE,GstMonoscopeClass))
33 #define GST_IS_MONOSCOPE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MONOSCOPE))
34 #define GST_IS_MONOSCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MONOSCOPE))
35
36 typedef struct _GstMonoscope GstMonoscope;
37 typedef struct _GstMonoscopeClass GstMonoscopeClass;
38
39 struct _GstMonoscope
40 {
41   GstElement element;
42
43   /* pads */
44   GstPad      *sinkpad;
45   GstPad      *srcpad;
46
47   GstAdapter  *adapter;
48
49   guint64      next_ts;             /* expected timestamp of the next frame */
50   guint64      frame_duration;      /* video frame duration    */
51   gint         rate;                /* sample rate             */
52   guint        bps;                 /* bytes per sample        */
53   guint        spf;                 /* samples per video frame */
54
55   GstSegment   segment;
56
57   /* QoS stuff *//* with LOCK */
58   gdouble      proportion;
59   GstClockTime earliest_time;
60
61   /* video state */
62   gint         fps_num;
63   gint         fps_denom;
64   gint         width;
65   gint         height;
66   guint        outsize;
67
68   /* visualisation state */
69   struct monoscope_state *visstate;
70 };
71
72 struct _GstMonoscopeClass
73 {
74   GstElementClass parent_class;
75 };
76
77 GType gst_monoscope_get_type (void);
78
79 G_END_DECLS
80
81 #endif /* __GST_MONOSCOPE__ */
82