• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* vim: set filetype=c: */
2% ClassName
3GstAudioDecoder
4% TYPE_CLASS_NAME
5GST_TYPE_AUDIO_DECODER
6% pads
7srcpad-audio
8sinkpad-simple
9% pkg-config
10gstreamer-audio-1.0
11% includes
12#include <gst/audio/gstaudiodecoder.h>
13% prototypes
14static gboolean gst_replace_start (GstAudioDecoder * decoder);
15static gboolean gst_replace_stop (GstAudioDecoder * decoder);
16static gboolean gst_replace_set_format (GstAudioDecoder * decoder, GstCaps * caps);
17static GstFlowReturn gst_replace_parse (GstAudioDecoder * decoder,
18    GstAdapter * adapter, gint * offset, gint * length);
19static GstFlowReturn gst_replace_handle_frame (GstAudioDecoder * decoder,
20    GstBuffer * buffer);
21static void gst_replace_flush (GstAudioDecoder * decoder, gboolean hard);
22static GstFlowReturn gst_replace_pre_push (GstAudioDecoder * decoder,
23    GstBuffer ** buffer);
24static gboolean gst_replace_sink_event (GstAudioDecoder * decoder,
25    GstEvent * event);
26static gboolean gst_replace_src_event (GstAudioDecoder * decoder, GstEvent * event);
27static gboolean gst_replace_open (GstAudioDecoder * decoder);
28static gboolean gst_replace_close (GstAudioDecoder * decoder);
29static gboolean gst_replace_negotiate (GstAudioDecoder * decoder);
30static gboolean gst_replace_decide_allocation (GstAudioDecoder * decoder,
31    GstQuery * query);
32static 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
52static gboolean
53gst_replace_start (GstAudioDecoder * decoder)
54{
55  GstReplace *replace = GST_REPLACE (decoder);
56
57  GST_DEBUG_OBJECT (replace, "start");
58
59  return TRUE;
60}
61
62static gboolean
63gst_replace_stop (GstAudioDecoder * decoder)
64{
65  GstReplace *replace = GST_REPLACE (decoder);
66
67  GST_DEBUG_OBJECT (replace, "stop");
68
69  return TRUE;
70}
71
72static gboolean
73gst_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
82static GstFlowReturn
83gst_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
93static GstFlowReturn
94gst_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
103static void
104gst_replace_flush (GstAudioDecoder * decoder, gboolean hard)
105{
106  GstReplace *replace = GST_REPLACE (decoder);
107
108  GST_DEBUG_OBJECT (replace, "flush");
109
110}
111
112static GstFlowReturn
113gst_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
122static gboolean
123gst_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
132static gboolean
133gst_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
142static gboolean
143gst_replace_open (GstAudioDecoder * decoder)
144{
145  GstReplace *replace = GST_REPLACE (decoder);
146
147  GST_DEBUG_OBJECT (replace, "open");
148
149  return TRUE;
150}
151
152static gboolean
153gst_replace_close (GstAudioDecoder * decoder)
154{
155  GstReplace *replace = GST_REPLACE (decoder);
156
157  GST_DEBUG_OBJECT (replace, "close");
158
159  return TRUE;
160}
161
162static gboolean
163gst_replace_negotiate (GstAudioDecoder * decoder)
164{
165  GstReplace *replace = GST_REPLACE (decoder);
166
167  GST_DEBUG_OBJECT (replace, "negotiate");
168
169  return TRUE;
170}
171
172static gboolean
173gst_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
182static gboolean
183gst_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
192