gst Factor out endian-order RGB formats
[platform/upstream/gst-plugins-good.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., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, 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   GstBufferPool *pool;
55
56   GstSegment   segment;
57
58   /* QoS stuff *//* with LOCK */
59   gdouble      proportion;
60   GstClockTime earliest_time;
61
62   /* video state */
63   gint         fps_num;
64   gint         fps_denom;
65   gint         width;
66   gint         height;
67   guint        outsize;
68
69   /* visualisation state */
70   struct monoscope_state *visstate;
71 };
72
73 struct _GstMonoscopeClass
74 {
75   GstElementClass parent_class;
76 };
77
78 GType gst_monoscope_get_type (void);
79
80 G_END_DECLS
81
82 #endif /* __GST_MONOSCOPE__ */
83