2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
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.
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.
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., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 #ifndef __GST_FAKE_SRC_H__
25 #define __GST_FAKE_SRC_H__
28 #include <gst/base/gstbasesrc.h>
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
43 * The different output types. Unused currently.
46 FAKE_SRC_FIRST_LAST_LOOP = 1,
47 FAKE_SRC_LAST_FIRST_LOOP,
49 FAKE_SRC_ORDERED_RANDOM,
51 FAKE_SRC_PATTERN_LOOP,
52 FAKE_SRC_PING_PONG_PATTERN,
53 FAKE_SRC_GET_ALWAYS_SUCEEDS
54 } GstFakeSrcOutputType;
58 * @FAKE_SRC_DATA_ALLOCATE: allocate buffers
59 * @FAKE_SRC_DATA_SUBBUFFER: subbuffer each buffer
61 * The different ways buffers are allocated.
64 FAKE_SRC_DATA_ALLOCATE = 1,
65 FAKE_SRC_DATA_SUBBUFFER
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)
74 * The different size of the allocated buffers.
77 FAKE_SRC_SIZETYPE_EMPTY = 1,
78 FAKE_SRC_SIZETYPE_FIXED,
79 FAKE_SRC_SIZETYPE_RANDOM
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
90 * The different ways of filling the buffers.
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
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))
111 typedef struct _GstFakeSrc GstFakeSrc;
112 typedef struct _GstFakeSrcClass GstFakeSrcClass;
117 * Opaque #GstFakeSrc data structure.
124 gboolean has_getrange;
126 GstFakeSrcOutputType output;
127 GstFakeSrcDataType data;
128 GstFakeSrcSizeType sizetype;
129 GstFakeSrcFillType filltype;
144 gboolean signal_handoffs;
146 gboolean can_activate_pull;
154 struct _GstFakeSrcClass {
155 GstBaseSrcClass parent_class;
159 void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
162 G_GNUC_INTERNAL GType gst_fake_src_get_type (void);
166 #endif /* __GST_FAKE_SRC_H__ */