mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +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
|
% prototypes
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_setup (GstAudioFilter * filter, GstRingBufferSpec * format);
|
gst_replace_setup (GstAudioFilter * filter, GstRingBufferSpec * format);
|
||||||
|
static GstFlowReturn
|
||||||
|
gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf);
|
||||||
% declare-class
|
% 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
|
% 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
|
% methods
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_setup (GstAudioFilter * filter, GstRingBufferSpec * format)
|
gst_replace_setup (GstAudioFilter * filter, GstRingBufferSpec * format)
|
||||||
{
|
{
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstFlowReturn
|
||||||
|
gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
|
||||||
|
{
|
||||||
|
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
% end
|
% end
|
||||||
|
|
|
@ -18,36 +18,43 @@ static GstBuffer *gst_replace_process (GstBaseRTPDepayload * base,
|
||||||
GstBuffer * in);
|
GstBuffer * in);
|
||||||
static void
|
static void
|
||||||
gst_replace_set_gst_timestamp (GstBaseRTPDepayload * filter, guint32 timestamp,
|
gst_replace_set_gst_timestamp (GstBaseRTPDepayload * filter, guint32 timestamp,
|
||||||
Gst Buffer * buf);
|
GstBuffer * buf);
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_packet_lost (GstBaseRTPDepayload * filter, GstEvent * event);
|
gst_replace_packet_lost (GstBaseRTPDepayload * filter, GstEvent * event);
|
||||||
% declare-class
|
% declare-class
|
||||||
GstBaseRTPDepayload *base_rtpdepayload_class = GST_BASE_RTPDEPAYLOAD (klass);
|
GstBaseRTPDepayloadClass *base_rtpdepayload_class = GST_BASE_RTP_DEPAYLOAD_CLASS (klass);
|
||||||
% set-methods
|
% 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
|
% methods
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_set_caps (GstBaseRTPDepayload * filter, GstCaps * caps)
|
gst_replace_set_caps (GstBaseRTPDepayload * filter, GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_replace_add_to_queue (GstBaseRTPDepayload * filter, GstBuffer * in)
|
gst_replace_add_to_queue (GstBaseRTPDepayload * filter, GstBuffer * in)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstBuffer *
|
static GstBuffer *
|
||||||
gst_replace_process (GstBaseRTPDepayload * base, GstBuffer * in)
|
gst_replace_process (GstBaseRTPDepayload * base, GstBuffer * in)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_replace_set_gst_timestamp (GstBaseRTPDepayload * filter, guint32 timestamp,
|
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)
|
gst_replace_packet_lost (GstBaseRTPDepayload * filter, GstEvent * event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
% end
|
% end
|
||||||
|
|
|
@ -18,32 +18,39 @@ static gboolean gst_replace_handle_event (GstPad * pad, GstEvent * event);
|
||||||
static GstCaps *gst_replace_get_caps (GstBaseRTPPayload * payload,
|
static GstCaps *gst_replace_get_caps (GstBaseRTPPayload * payload,
|
||||||
GstPad * pad);
|
GstPad * pad);
|
||||||
% declare-class
|
% declare-class
|
||||||
GstBaseRTPPayload *base_rtppayload_class = GST_BASE_RTPPAYLOAD (klass);
|
GstBaseRTPPayloadClass *base_rtppayload_class = GST_BASE_RTP_PAYLOAD_CLASS (klass);
|
||||||
% set-methods
|
% 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
|
% methods
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
|
gst_replace_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_replace_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
|
gst_replace_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_handle_event (GstPad * pad, GstEvent * event)
|
gst_replace_handle_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_replace_get_caps (GstBaseRTPPayload * payload, GstPad * pad)
|
gst_replace_get_caps (GstBaseRTPPayload * payload, GstPad * pad)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
% end
|
% 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_get_default_device (GstCddaBaseSrc * src);
|
||||||
static gchar **gst_replace_probe_devices (GstCddaBaseSrc * src);
|
static gchar **gst_replace_probe_devices (GstCddaBaseSrc * src);
|
||||||
% declare-class
|
% declare-class
|
||||||
GstcddaBaseSrc *cddabase_src_class = GST_CDDABASE_SRC (klass);
|
GstCddaBaseSrcClass *cddabase_src_class = GST_CDDA_BASE_SRC_CLASS (klass);
|
||||||
% set-methods
|
% 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
|
% methods
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +30,7 @@ static gboolean
|
||||||
gst_replace_open (GstCddaBaseSrc * src, const gchar * device)
|
gst_replace_open (GstCddaBaseSrc * src, const gchar * device)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -38,17 +43,20 @@ static GstBuffer *
|
||||||
gst_replace_read_sector (GstCddaBaseSrc * src, gint sector)
|
gst_replace_read_sector (GstCddaBaseSrc * src, gint sector)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
gst_replace_get_default_device (GstCddaBaseSrc * src)
|
gst_replace_get_default_device (GstCddaBaseSrc * src)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar **
|
static gchar **
|
||||||
gst_replace_probe_devices (GstCddaBaseSrc * src)
|
gst_replace_probe_devices (GstCddaBaseSrc * src)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
% end
|
% end
|
||||||
|
|
|
@ -20,9 +20,11 @@ gst_replace_parse_tag (GstTagDemux * demux,
|
||||||
static GstTagList *gst_replace_merge_tags (GstTagDemux * demux,
|
static GstTagList *gst_replace_merge_tags (GstTagDemux * demux,
|
||||||
const GstTagList * start_tags, const GstTagList * end_tags);
|
const GstTagList * start_tags, const GstTagList * end_tags);
|
||||||
% declare-class
|
% declare-class
|
||||||
GstTagdemux *tagdemux_class = GST_TAGDEMUX (klass);
|
GstTagDemuxClass *tagdemux_class = GST_TAG_DEMUX_CLASS (klass);
|
||||||
% set-methods
|
% 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
|
% methods
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +33,7 @@ gst_replace_identify_tag (GstTagDemux * demux,
|
||||||
GstBuffer * buffer, gboolean start_tag, guint * tag_size)
|
GstBuffer * buffer, gboolean start_tag, guint * tag_size)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstTagDemuxResult
|
static GstTagDemuxResult
|
||||||
|
@ -39,6 +42,7 @@ gst_replace_parse_tag (GstTagDemux * demux,
|
||||||
gboolean start_tag, guint * tag_size, GstTagList ** tags)
|
gboolean start_tag, guint * tag_size, GstTagList ** tags)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return GST_TAG_DEMUX_RESULT_BROKEN_TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstTagList *
|
static GstTagList *
|
||||||
|
@ -46,5 +50,6 @@ gst_replace_merge_tags (GstTagDemux * demux,
|
||||||
const GstTagList * start_tags, const GstTagList * end_tags)
|
const GstTagList * start_tags, const GstTagList * end_tags)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
% end
|
% end
|
||||||
|
|
Loading…
Reference in a new issue