gstreamer/tools/element-templates/basertppayload
Stefan Kost 795bf6c53b element-templates: fix templates
Use the object class and not the object in the init function. Set the vmethods.
Add default returns.
2011-04-26 15:21:07 +03:00

56 lines
1.4 KiB
C

/* vim: set filetype=c: */
% ClassName
GstBaseRTPPayload
% TYPE_CLASS_NAME
GST_TYPE_BASE_RTP_PAYLOAD
% pads
sinkpad-simple srcpad-simple
% pkg-config
gstreamer-rtp-0.10
% includes
#include <gst/rtp/gstbasertppayload.h>
% prototypes
static gboolean
gst_replace_set_caps (GstBaseRTPPayload * payload, GstCaps * caps);
static GstFlowReturn
gst_replace_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer);
static gboolean gst_replace_handle_event (GstPad * pad, GstEvent * event);
static GstCaps *gst_replace_get_caps (GstBaseRTPPayload * payload,
GstPad * pad);
% declare-class
GstBaseRTPPayloadClass *base_rtppayload_class = GST_BASE_RTP_PAYLOAD_CLASS (klass);
% set-methods
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