gstreamer/tools/element-templates/audiodecoder
David Schleef b45a1df5de element-maker: Update templates for 1.0
This are (almost) completely autogenerated from the documentation.
2013-03-14 23:57:06 -07:00

191 lines
5.2 KiB
C

/* vim: set filetype=c: */
% ClassName
GstAudioDecoder
% TYPE_CLASS_NAME
GST_TYPE_AUDIO_DECODER
% pads
srcpad-audio
sinkpad-simple
% pkg-config
gstreamer-audio-1.0
% includes
#include <gst/audio/gstaudiodecoder.h>
% prototypes
static gboolean gst_replace_start (GstAudioDecoder * decoder);
static gboolean gst_replace_stop (GstAudioDecoder * decoder);
static gboolean gst_replace_set_format (GstAudioDecoder * decoder, GstCaps * caps);
static GstFlowReturn gst_replace_parse (GstAudioDecoder * decoder,
GstAdapter * adapter, gint * offset, gint * length);
static GstFlowReturn gst_replace_handle_frame (GstAudioDecoder * decoder,
GstBuffer * buffer);
static void gst_replace_flush (GstAudioDecoder * decoder, gboolean hard);
static GstFlowReturn gst_replace_pre_push (GstAudioDecoder * decoder,
GstBuffer ** buffer);
static gboolean gst_replace_sink_event (GstAudioDecoder * decoder,
GstEvent * event);
static gboolean gst_replace_src_event (GstAudioDecoder * decoder, GstEvent * event);
static gboolean gst_replace_open (GstAudioDecoder * decoder);
static gboolean gst_replace_close (GstAudioDecoder * decoder);
static gboolean gst_replace_negotiate (GstAudioDecoder * decoder);
static gboolean gst_replace_decide_allocation (GstAudioDecoder * decoder,
GstQuery * query);
static gboolean gst_replace_propose_allocation (GstAudioDecoder * decoder,
GstQuery * query);
% declare-class
GstAudioDecoderClass *audio_decoder_class = GST_AUDIO_DECODER_CLASS (klass);
% set-methods
audio_decoder_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
audio_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
audio_decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_replace_set_format);
audio_decoder_class->parse = GST_DEBUG_FUNCPTR (gst_replace_parse);
audio_decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_replace_handle_frame);
audio_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_replace_flush);
audio_decoder_class->pre_push = GST_DEBUG_FUNCPTR (gst_replace_pre_push);
audio_decoder_class->sink_event = GST_DEBUG_FUNCPTR (gst_replace_sink_event);
audio_decoder_class->src_event = GST_DEBUG_FUNCPTR (gst_replace_src_event);
audio_decoder_class->open = GST_DEBUG_FUNCPTR (gst_replace_open);
audio_decoder_class->close = GST_DEBUG_FUNCPTR (gst_replace_close);
audio_decoder_class->negotiate = GST_DEBUG_FUNCPTR (gst_replace_negotiate);
audio_decoder_class->decide_allocation = GST_DEBUG_FUNCPTR (gst_replace_decide_allocation);
audio_decoder_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_replace_propose_allocation);
% methods
static gboolean
gst_replace_start (GstAudioDecoder * decoder)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "start");
return TRUE;
}
static gboolean
gst_replace_stop (GstAudioDecoder * decoder)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "stop");
return TRUE;
}
static gboolean
gst_replace_set_format (GstAudioDecoder * decoder, GstCaps * caps)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "set_format");
return TRUE;
}
static GstFlowReturn
gst_replace_parse (GstAudioDecoder * decoder, GstAdapter * adapter, gint * offset,
gint * length)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "parse");
return GST_FLOW_OK;
}
static GstFlowReturn
gst_replace_handle_frame (GstAudioDecoder * decoder, GstBuffer * buffer)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "handle_frame");
return GST_FLOW_OK;
}
static void
gst_replace_flush (GstAudioDecoder * decoder, gboolean hard)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "flush");
}
static GstFlowReturn
gst_replace_pre_push (GstAudioDecoder * decoder, GstBuffer ** buffer)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "pre_push");
return GST_FLOW_OK;
}
static gboolean
gst_replace_sink_event (GstAudioDecoder * decoder, GstEvent * event)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "sink_event");
return TRUE;
}
static gboolean
gst_replace_src_event (GstAudioDecoder * decoder, GstEvent * event)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "src_event");
return TRUE;
}
static gboolean
gst_replace_open (GstAudioDecoder * decoder)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "open");
return TRUE;
}
static gboolean
gst_replace_close (GstAudioDecoder * decoder)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "close");
return TRUE;
}
static gboolean
gst_replace_negotiate (GstAudioDecoder * decoder)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "negotiate");
return TRUE;
}
static gboolean
gst_replace_decide_allocation (GstAudioDecoder * decoder, GstQuery * query)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "decide_allocation");
return TRUE;
}
static gboolean
gst_replace_propose_allocation (GstAudioDecoder * decoder, GstQuery * query)
{
GstReplace *replace = GST_REPLACE (decoder);
GST_DEBUG_OBJECT (replace, "propose_allocation");
return TRUE;
}
% end