gst-element-maker: add {src,sink}pad-template, since many base classes create pads...
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 17 Mar 2012 15:49:45 +0000 (15:49 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 17 Mar 2012 15:49:45 +0000 (15:49 +0000)
And use them in the videofilter template.

tools/element-templates/sinkpad-template [new file with mode: 0644]
tools/element-templates/srcpad-template [new file with mode: 0644]
tools/element-templates/videofilter

diff --git a/tools/element-templates/sinkpad-template b/tools/element-templates/sinkpad-template
new file mode 100644 (file)
index 0000000..b06b346
--- /dev/null
@@ -0,0 +1,19 @@
+/* vim: set filetype=c: */
+
+% instance-members
+% prototypes
+% pad-template
+static GstStaticPadTemplate gst_replace_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/unknown")
+    );
+
+% base-init
+  gst_element_class_add_static_pad_template (element_class,
+      &gst_replace_sink_template);
+% instance-init
+% methods
+% end
+
diff --git a/tools/element-templates/srcpad-template b/tools/element-templates/srcpad-template
new file mode 100644 (file)
index 0000000..dd0842b
--- /dev/null
@@ -0,0 +1,19 @@
+/* vim: set filetype=c: */
+
+% instance-members
+% prototypes
+% pad-template
+static GstStaticPadTemplate gst_replace_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/unknown")
+    );
+
+% base-init
+  gst_element_class_add_static_pad_template (element_class,
+      &gst_replace_src_template);
+% instance-init
+% methods
+% end
+
index fb22b28840c3226919c382a8dd64ca7bdb618da3..65b2f37568322f03320c01cdab61dd6a21d359f3 100644 (file)
@@ -4,7 +4,7 @@ GstVideoFilter
 % TYPE_CLASS_NAME
 GST_TYPE_VIDEO_FILTER
 % pads
-sinkpad-simple srcpad-simple
+sinkpad-template srcpad-template
 % pkg-config
 gstreamer-video-0.10
 % includes