Port gtk-doc comments to their equivalent markdown syntax
[platform/upstream/gstreamer.git] / plugins / elements / gstfakesrc.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *
5  * gstfakesrc.h:
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23
24 #ifndef __GST_FAKE_SRC_H__
25 #define __GST_FAKE_SRC_H__
26
27 #include <gst/gst.h>
28 #include <gst/base/gstbasesrc.h>
29
30 G_BEGIN_DECLS
31
32 /**
33  * GstFakeSrcOutputType:
34  * @FAKE_SRC_FIRST_LAST_LOOP: first pad then last pad
35  * @FAKE_SRC_LAST_FIRST_LOOP: last pad then first pad
36  * @FAKE_SRC_PING_PONG: ping pong between pads
37  * @FAKE_SRC_ORDERED_RANDOM: ordered random pad
38  * @FAKE_SRC_RANDOM: random pad
39  * @FAKE_SRC_PATTERN_LOOP: loop between pads in a particular pattern
40  * @FAKE_SRC_PING_PONG_PATTERN: ping pong based on a pattern
41  * @FAKE_SRC_GET_ALWAYS_SUCEEDS: a get always succeeds on a pad
42  *
43  * The different output types. Unused currently.
44  */
45 typedef enum {
46   FAKE_SRC_FIRST_LAST_LOOP = 1,
47   FAKE_SRC_LAST_FIRST_LOOP,
48   FAKE_SRC_PING_PONG,
49   FAKE_SRC_ORDERED_RANDOM,
50   FAKE_SRC_RANDOM,
51   FAKE_SRC_PATTERN_LOOP,
52   FAKE_SRC_PING_PONG_PATTERN,
53   FAKE_SRC_GET_ALWAYS_SUCEEDS
54 } GstFakeSrcOutputType;
55
56 /**
57  * GstFakeSrcDataType:
58  * @FAKE_SRC_DATA_ALLOCATE: allocate buffers
59  * @FAKE_SRC_DATA_SUBBUFFER: subbuffer each buffer
60  *
61  * The different ways buffers are allocated.
62  */
63 typedef enum {
64   FAKE_SRC_DATA_ALLOCATE = 1,
65   FAKE_SRC_DATA_SUBBUFFER
66 } GstFakeSrcDataType;
67
68 /**
69  * GstFakeSrcSizeType:
70  * @FAKE_SRC_SIZETYPE_EMPTY: create empty buffers
71  * @FAKE_SRC_SIZETYPE_FIXED: fixed buffer size (sizemax sized)
72  * @FAKE_SRC_SIZETYPE_RANDOM: random buffer size (sizemin <= size <= sizemax)
73  *
74  * The different size of the allocated buffers.
75  */
76 typedef enum {
77   FAKE_SRC_SIZETYPE_EMPTY = 1,
78   FAKE_SRC_SIZETYPE_FIXED,
79   FAKE_SRC_SIZETYPE_RANDOM
80 } GstFakeSrcSizeType;
81
82 /**
83  * GstFakeSrcFillType:
84  * @FAKE_SRC_FILLTYPE_NOTHING: do not fill buffers
85  * @FAKE_SRC_FILLTYPE_ZERO: fill buffers with 0
86  * @FAKE_SRC_FILLTYPE_RANDOM: fill buffers with random bytes
87  * @FAKE_SRC_FILLTYPE_PATTERN: fill buffers with a pattern
88  * @FAKE_SRC_FILLTYPE_PATTERN_CONT: fill buffers with a continuous pattern
89  *
90  * The different ways of filling the buffers.
91  */
92 typedef enum {
93   FAKE_SRC_FILLTYPE_NOTHING = 1,
94   FAKE_SRC_FILLTYPE_ZERO,
95   FAKE_SRC_FILLTYPE_RANDOM,
96   FAKE_SRC_FILLTYPE_PATTERN,
97   FAKE_SRC_FILLTYPE_PATTERN_CONT
98 } GstFakeSrcFillType;
99
100 #define GST_TYPE_FAKE_SRC \
101   (gst_fake_src_get_type())
102 #define GST_FAKE_SRC(obj) \
103   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FAKE_SRC,GstFakeSrc))
104 #define GST_FAKE_SRC_CLASS(klass) \
105   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FAKE_SRC,GstFakeSrcClass))
106 #define GST_IS_FAKE_SRC(obj) \
107   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FAKE_SRC))
108 #define GST_IS_FAKE_SRC_CLASS(klass) \
109   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKE_SRC))
110
111 typedef struct _GstFakeSrc GstFakeSrc;
112 typedef struct _GstFakeSrcClass GstFakeSrcClass;
113
114 /**
115  * GstFakeSrc:
116  *
117  * Opaque #GstFakeSrc data structure.
118  */
119 struct _GstFakeSrc {
120   GstBaseSrc     element;
121
122   /*< private >*/
123   gboolean       has_loop;
124   gboolean       has_getrange;
125
126   GstFakeSrcOutputType output;
127   GstFakeSrcDataType   data;
128   GstFakeSrcSizeType   sizetype;
129   GstFakeSrcFillType   filltype;
130
131   guint         sizemin;
132   guint         sizemax;
133   GstBuffer     *parent;
134   guint         parentsize;
135   guint         parentoffset;
136   guint8         pattern_byte;
137   GList         *patternlist;
138   gint           datarate;
139   gboolean       sync;
140   GstClock      *clock;
141
142   gboolean       silent;
143   gboolean       signal_handoffs;
144   gboolean       dump;
145   gboolean       can_activate_pull;
146   GstFormat      format;
147
148   guint64        bytes_sent;
149
150   gchar         *last_message;
151 };
152
153 struct _GstFakeSrcClass {
154   GstBaseSrcClass parent_class;
155
156   /*< public >*/
157   /* signals */
158   void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
159 };
160
161 G_GNUC_INTERNAL GType gst_fake_src_get_type (void);
162
163 G_END_DECLS
164
165 #endif /* __GST_FAKE_SRC_H__ */