{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class,
"FFMPEG Audio resampling element", "Filter/Converter/Audio",
"Converts audio from one samplerate to another",
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class,
"FFMPEG Deinterlace element", "Filter/Effect/Video/Deinterlace",
"Deinterlace video", "Luca Ognibene <luogni@tin.it>");
/* pad templates */
srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
gst_element_class_add_pad_template (element_class, srctempl);
+ gst_object_unref (srctempl);
if (audiosinkcaps) {
audiosinktempl = gst_pad_template_new ("audio_%d",
GST_PAD_SINK, GST_PAD_REQUEST, audiosinkcaps);
gst_element_class_add_pad_template (element_class, audiosinktempl);
+ gst_object_unref (audiosinktempl);
}
if (videosinkcaps) {
videosinktempl = gst_pad_template_new ("video_%d",
GST_PAD_SINK, GST_PAD_REQUEST, videosinkcaps);
gst_element_class_add_pad_template (element_class, videosinktempl);
+ gst_object_unref (videosinktempl);
}
beach:
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class, "FFMPEG Scale element",
"Filter/Converter/Video/Scaler",
"Converts video from one resolution to another",
g_free (longname);
g_free (description);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&gst_post_proc_src_template));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&gst_post_proc_sink_template));
+ gst_element_class_add_static_pad_template (element_class,
+ &gst_post_proc_src_template);
+ gst_element_class_add_static_pad_template (element_class,
+ &gst_post_proc_sink_template);
klass->filterid = ppidx;
}
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class, "FFMPEG Scale element",
"Filter/Converter/Video",
"Converts video from one resolution to another",