mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
element-templates: fix templates
Use the object class and not the object in the init function. Set the vmethods. Add default returns.
This commit is contained in:
parent
9bec684c3e
commit
795bf6c53b
5 changed files with 53 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue