summaryrefslogtreecommitdiff
path: root/tools/element-templates
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2011-04-26 14:10:05 +0300
committerStefan Kost <ensonic@users.sf.net>2011-04-26 15:21:07 +0300
commit795bf6c53ba24b4608fce1fafea7953e0daa796d (patch)
tree83d0ce284bb53bb0922fd3917d7681ca89a66ea6 /tools/element-templates
parent9bec684c3e699677c7ed9416f126eaa7f965f345 (diff)
downloadgstreamer-plugins-bad-795bf6c53ba24b4608fce1fafea7953e0daa796d.tar.gz
element-templates: fix templates
Use the object class and not the object in the init function. Set the vmethods. Add default returns.
Diffstat (limited to 'tools/element-templates')
-rw-r--r--tools/element-templates/audiofilter16
-rw-r--r--tools/element-templates/basertpdepayload16
-rw-r--r--tools/element-templates/basertppayload11
-rw-r--r--tools/element-templates/cddabasesrc12
-rw-r--r--tools/element-templates/tagdemux9
5 files changed, 52 insertions, 12 deletions
diff --git a/tools/element-templates/audiofilter b/tools/element-templates/audiofilter
index 2d0929364..cf10fc120 100644
--- a/tools/element-templates/audiofilter
+++ b/tools/element-templates/audiofilter
@@ -12,15 +12,27 @@ gstreamer-audio-0.10
% prototypes
static gboolean
gst_replace_setup (GstAudioFilter * filter, GstRingBufferSpec * format);
+static GstFlowReturn
+gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf);
% declare-class
- GstAudioFilter *audio_filter_class = GST_AUDIO_FILTER (klass);
+ GstAudioFilterClass *audio_filter_class = GST_AUDIO_FILTER_CLASS (klass);
+ GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (klass);
% set-methods
- audio_filter_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
+ audio_filter_class->setup = GST_DEBUG_FUNCPTR (gst_replace_setup);
+ base_transform_class->transform_ip = GST_DEBUG_FUNCPTR (gst_replace_transform_ip);
% methods
static gboolean
gst_replace_setup (GstAudioFilter * filter, GstRingBufferSpec * format)
{
+ return TRUE;
+}
+
+static GstFlowReturn
+gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
+{
+ return GST_FLOW_ERROR;
}
+
% end
diff --git a/tools/element-templates/basertpdepayload b/tools/element-templates/basertpdepayload
index 8b40e5265..b91d1c2fb 100644
--- a/tools/element-templates/basertpdepayload
+++ b/tools/element-templates/basertpdepayload
@@ -18,36 +18,43 @@ static GstBuffer *gst_replace_process (GstBaseRTPDepayload * base,
GstBuffer * in);
static void
gst_replace_set_gst_timestamp (GstBaseRTPDepayload * filter, guint32 timestamp,
- Gst Buffer * buf);
+ GstBuffer * buf);
static gboolean
gst_replace_packet_lost (GstBaseRTPDepayload * filter, GstEvent * event);
% declare-class
- GstBaseRTPDepayload *base_rtpdepayload_class = GST_BASE_RTPDEPAYLOAD (klass);
+ GstBaseRTPDepayloadClass *base_rtpdepayload_class = GST_BASE_RTP_DEPAYLOAD_CLASS (klass);
% set-methods
- base_rtpdepayload_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
+ base_rtpdepayload_class->set_caps = GST_DEBUG_FUNCPTR (gst_replace_set_caps);
+ base_rtpdepayload_class->add_to_queue = GST_DEBUG_FUNCPTR (gst_replace_add_to_queue);
+ base_rtpdepayload_class->process = GST_DEBUG_FUNCPTR (gst_replace_process);
+ base_rtpdepayload_class->set_gst_timestamp = GST_DEBUG_FUNCPTR (gst_replace_set_gst_timestamp);
+ base_rtpdepayload_class->packet_lost = GST_DEBUG_FUNCPTR (gst_replace_packet_lost);
% methods
static gboolean
gst_replace_set_caps (GstBaseRTPDepayload * filter, GstCaps * caps)
{
+ return FALSE;
}
static GstFlowReturn
gst_replace_add_to_queue (GstBaseRTPDepayload * filter, GstBuffer * in)
{
+ return GST_FLOW_ERROR;
}
static GstBuffer *
gst_replace_process (GstBaseRTPDepayload * base, GstBuffer * in)
{
+ return NULL;
}
static void
gst_replace_set_gst_timestamp (GstBaseRTPDepayload * filter, guint32 timestamp,
- Gst Buffer * buf)
+ GstBuffer * buf)
{
}
@@ -56,5 +63,6 @@ static gboolean
gst_replace_packet_lost (GstBaseRTPDepayload * filter, GstEvent * event)
{
+ return FALSE;
}
% end
diff --git a/tools/element-templates/basertppayload b/tools/element-templates/basertppayload
index 1a5be183d..0f7d6547e 100644
--- a/tools/element-templates/basertppayload
+++ b/tools/element-templates/basertppayload
@@ -18,32 +18,39 @@ static gboolean gst_replace_handle_event (GstPad * pad, GstEvent * event);
static GstCaps *gst_replace_get_caps (GstBaseRTPPayload * payload,
GstPad * pad);
% declare-class
- GstBaseRTPPayload *base_rtppayload_class = GST_BASE_RTPPAYLOAD (klass);
+ GstBaseRTPPayloadClass *base_rtppayload_class = GST_BASE_RTP_PAYLOAD_CLASS (klass);
% set-methods
- base_rtppayload_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
+ base_rtppayload_class->set_caps = GST_DEBUG_FUNCPTR (gst_replace_set_caps);
+ base_rtppayload_class->handle_buffer = GST_DEBUG_FUNCPTR (gst_replace_handle_buffer);
+ base_rtppayload_class->handle_event = GST_DEBUG_FUNCPTR (gst_replace_handle_event);
+ base_rtppayload_class->get_caps = GST_DEBUG_FUNCPTR (gst_replace_get_caps);
% methods
static gboolean
gst_replace_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
{
+ return FALSE;
}
static GstFlowReturn
gst_replace_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
{
+ return GST_FLOW_ERROR;
}
static gboolean
gst_replace_handle_event (GstPad * pad, GstEvent * event)
{
+ return FALSE;
}
static GstCaps *
gst_replace_get_caps (GstBaseRTPPayload * payload, GstPad * pad)
{
+ return NULL;
}
% end
diff --git a/tools/element-templates/cddabasesrc b/tools/element-templates/cddabasesrc
index d788d19c4..7de6bcf4a 100644
--- a/tools/element-templates/cddabasesrc
+++ b/tools/element-templates/cddabasesrc
@@ -16,9 +16,13 @@ static GstBuffer *gst_replace_read_sector (GstCddaBaseSrc * src, gint sector);
static gchar *gst_replace_get_default_device (GstCddaBaseSrc * src);
static gchar **gst_replace_probe_devices (GstCddaBaseSrc * src);
% declare-class
- GstcddaBaseSrc *cddabase_src_class = GST_CDDABASE_SRC (klass);
+ GstCddaBaseSrcClass *cddabase_src_class = GST_CDDA_BASE_SRC_CLASS (klass);
% set-methods
- cddabase_src_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
+ cddabase_src_class->open = GST_DEBUG_FUNCPTR (gst_replace_open);
+ cddabase_src_class->close = GST_DEBUG_FUNCPTR (gst_replace_close);
+ cddabase_src_class->read_sector = GST_DEBUG_FUNCPTR (gst_replace_read_sector);
+ cddabase_src_class->get_default_device = GST_DEBUG_FUNCPTR (gst_replace_get_default_device);
+ cddabase_src_class->probe_devices = GST_DEBUG_FUNCPTR (gst_replace_probe_devices);
% methods
@@ -26,6 +30,7 @@ static gboolean
gst_replace_open (GstCddaBaseSrc * src, const gchar * device)
{
+ return FALSE;
}
static void
@@ -38,17 +43,20 @@ static GstBuffer *
gst_replace_read_sector (GstCddaBaseSrc * src, gint sector)
{
+ return NULL;
}
static gchar *
gst_replace_get_default_device (GstCddaBaseSrc * src)
{
+ return NULL;
}
static gchar **
gst_replace_probe_devices (GstCddaBaseSrc * src)
{
+ return NULL;
}
% end
diff --git a/tools/element-templates/tagdemux b/tools/element-templates/tagdemux
index 8517c5802..ecfd1fe4d 100644
--- a/tools/element-templates/tagdemux
+++ b/tools/element-templates/tagdemux
@@ -20,9 +20,11 @@ gst_replace_parse_tag (GstTagDemux * demux,
static GstTagList *gst_replace_merge_tags (GstTagDemux * demux,
const GstTagList * start_tags, const GstTagList * end_tags);
% declare-class
- GstTagdemux *tagdemux_class = GST_TAGDEMUX (klass);
+ GstTagDemuxClass *tagdemux_class = GST_TAG_DEMUX_CLASS (klass);
% set-methods
- tagdemux_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
+ tagdemux_class->identify_tag = GST_DEBUG_FUNCPTR (gst_replace_identify_tag);
+ tagdemux_class->parse_tag = GST_DEBUG_FUNCPTR (gst_replace_parse_tag);
+ tagdemux_class->merge_tags = GST_DEBUG_FUNCPTR (gst_replace_merge_tags);
% methods
@@ -31,6 +33,7 @@ gst_replace_identify_tag (GstTagDemux * demux,
GstBuffer * buffer, gboolean start_tag, guint * tag_size)
{
+ return FALSE;
}
static GstTagDemuxResult
@@ -39,6 +42,7 @@ gst_replace_parse_tag (GstTagDemux * demux,
gboolean start_tag, guint * tag_size, GstTagList ** tags)
{
+ return GST_TAG_DEMUX_RESULT_BROKEN_TAG;
}
static GstTagList *
@@ -46,5 +50,6 @@ gst_replace_merge_tags (GstTagDemux * demux,
const GstTagList * start_tags, const GstTagList * end_tags)
{
+ return NULL;
}
% end