Debian Codegraph @

tools/element-templates/audiodecoder

raw
1 /* vim: set filetype=c: */
2 % ClassName
3 GstAudioDecoder
4 % TYPE_CLASS_NAME
5 GST_TYPE_AUDIO_DECODER
6 % pads
7 srcpad-audio
8 sinkpad-simple
9 % pkg-config
10 gstreamer-audio-1.0
11 % includes
12 #include <gst/audio/gstaudiodecoder.h>
13 % prototypes
14 static gboolean gst_replace_start (GstAudioDecoder * decoder);
15 static gboolean gst_replace_stop (GstAudioDecoder * decoder);
16 static gboolean gst_replace_set_format (GstAudioDecoder * decoder, GstCaps * caps);
17 static GstFlowReturn gst_replace_parse (GstAudioDecoder * decoder,
18 GstAdapter * adapter, gint * offset, gint * length);
19 static GstFlowReturn gst_replace_handle_frame (GstAudioDecoder * decoder,
20 GstBuffer * buffer);
21 static void gst_replace_flush (GstAudioDecoder * decoder, gboolean hard);
22 static GstFlowReturn gst_replace_pre_push (GstAudioDecoder * decoder,
23 GstBuffer ** buffer);
24 static gboolean gst_replace_sink_event (GstAudioDecoder * decoder,
25 GstEvent * event);
26 static gboolean gst_replace_src_event (GstAudioDecoder * decoder, GstEvent * event);
27 static gboolean gst_replace_open (GstAudioDecoder * decoder);
28 static gboolean gst_replace_close (GstAudioDecoder * decoder);
29 static gboolean gst_replace_negotiate (GstAudioDecoder * decoder);
30 static gboolean gst_replace_decide_allocation (GstAudioDecoder * decoder,
31 GstQuery * query);
32 static gboolean gst_replace_propose_allocation (GstAudioDecoder * decoder,
33 GstQuery * query);
34 % declare-class
35 GstAudioDecoderClass *audio_decoder_class = GST_AUDIO_DECODER_CLASS (klass);
36 % set-methods
37 audio_decoder_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
38 audio_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
39 audio_decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_replace_set_format);
40 audio_decoder_class->parse = GST_DEBUG_FUNCPTR (gst_replace_parse);
41 audio_decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_replace_handle_frame);
42 audio_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_replace_flush);
43 audio_decoder_class->pre_push = GST_DEBUG_FUNCPTR (gst_replace_pre_push);
44 audio_decoder_class->sink_event = GST_DEBUG_FUNCPTR (gst_replace_sink_event);
45 audio_decoder_class->src_event = GST_DEBUG_FUNCPTR (gst_replace_src_event);
46 audio_decoder_class->open = GST_DEBUG_FUNCPTR (gst_replace_open);
47 audio_decoder_class->close = GST_DEBUG_FUNCPTR (gst_replace_close);
48 audio_decoder_class->negotiate = GST_DEBUG_FUNCPTR (gst_replace_negotiate);
49 audio_decoder_class->decide_allocation = GST_DEBUG_FUNCPTR (gst_replace_decide_allocation);
50 audio_decoder_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_replace_propose_allocation);
51 % methods
52 static gboolean
53 gst_replace_start (GstAudioDecoder * decoder)
54 {
55 GstReplace *replace = GST_REPLACE (decoder);
56
57 GST_DEBUG_OBJECT (replace, "start");
58
59 return TRUE;
60 }
61
62 static gboolean
63 gst_replace_stop (GstAudioDecoder * decoder)
64 {
65 GstReplace *replace = GST_REPLACE (decoder);
66
67 GST_DEBUG_OBJECT (replace, "stop");
68
69 return TRUE;
70 }
71
72 static gboolean
73 gst_replace_set_format (GstAudioDecoder * decoder, GstCaps * caps)
74 {
75 GstReplace *replace = GST_REPLACE (decoder);
76
77 GST_DEBUG_OBJECT (replace, "set_format");
78
79 return TRUE;
80 }
81
82 static GstFlowReturn
83 gst_replace_parse (GstAudioDecoder * decoder, GstAdapter * adapter, gint * offset,
84 gint * length)
85 {
86 GstReplace *replace = GST_REPLACE (decoder);
87
88 GST_DEBUG_OBJECT (replace, "parse");
89
90 return GST_FLOW_OK;
91 }
92
93 static GstFlowReturn
94 gst_replace_handle_frame (GstAudioDecoder * decoder, GstBuffer * buffer)
95 {
96 GstReplace *replace = GST_REPLACE (decoder);
97
98 GST_DEBUG_OBJECT (replace, "handle_frame");
99
100 return GST_FLOW_OK;
101 }
102
103 static void
104 gst_replace_flush (GstAudioDecoder * decoder, gboolean hard)
105 {
106 GstReplace *replace = GST_REPLACE (decoder);
107
108 GST_DEBUG_OBJECT (replace, "flush");
109
110 }
111
112 static GstFlowReturn
113 gst_replace_pre_push (GstAudioDecoder * decoder, GstBuffer ** buffer)
114 {
115 GstReplace *replace = GST_REPLACE (decoder);
116
117 GST_DEBUG_OBJECT (replace, "pre_push");
118
119 return GST_FLOW_OK;
120 }
121
122 static gboolean
123 gst_replace_sink_event (GstAudioDecoder * decoder, GstEvent * event)
124 {
125 GstReplace *replace = GST_REPLACE (decoder);
126
127 GST_DEBUG_OBJECT (replace, "sink_event");
128
129 return TRUE;
130 }
131
132 static gboolean
133 gst_replace_src_event (GstAudioDecoder * decoder, GstEvent * event)
134 {
135 GstReplace *replace = GST_REPLACE (decoder);
136
137 GST_DEBUG_OBJECT (replace, "src_event");
138
139 return TRUE;
140 }
141
142 static gboolean
143 gst_replace_open (GstAudioDecoder * decoder)
144 {
145 GstReplace *replace = GST_REPLACE (decoder);
146
147 GST_DEBUG_OBJECT (replace, "open");
148
149 return TRUE;
150 }
151
152 static gboolean
153 gst_replace_close (GstAudioDecoder * decoder)
154 {
155 GstReplace *replace = GST_REPLACE (decoder);
156
157 GST_DEBUG_OBJECT (replace, "close");
158
159 return TRUE;
160 }
161
162 static gboolean
163 gst_replace_negotiate (GstAudioDecoder * decoder)
164 {
165 GstReplace *replace = GST_REPLACE (decoder);
166
167 GST_DEBUG_OBJECT (replace, "negotiate");
168
169 return TRUE;
170 }
171
172 static gboolean
173 gst_replace_decide_allocation (GstAudioDecoder * decoder, GstQuery * query)
174 {
175 GstReplace *replace = GST_REPLACE (decoder);
176
177 GST_DEBUG_OBJECT (replace, "decide_allocation");
178
179 return TRUE;
180 }
181
182 static gboolean
183 gst_replace_propose_allocation (GstAudioDecoder * decoder, GstQuery * query)
184 {
185 GstReplace *replace = GST_REPLACE (decoder);
186
187 GST_DEBUG_OBJECT (replace, "propose_allocation");
188
189 return TRUE;
190 }
191 % end