element-templates: avoid using PadTemplates
authorDavid Schleef <ds@schleef.org>
Fri, 12 Apr 2013 21:08:15 +0000 (14:08 -0700)
committerDavid Schleef <ds@schleef.org>
Fri, 12 Apr 2013 21:11:10 +0000 (14:11 -0700)
tools/element-templates/sinkpad-template-video
tools/element-templates/srcpad-template-video

index 286396a..45d2970 100644 (file)
@@ -7,16 +7,10 @@
 #define VIDEO_SINK_CAPS \
     GST_VIDEO_CAPS_MAKE("{ I420, Y444, Y42B, UYVY, RGBA }")
 
-static GstStaticPadTemplate gst_replace_sink_template =
-GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (VIDEO_SINK_CAPS)
-    );
-
 % base-init
   gst_element_class_add_pad_template (GST_ELEMENT_CLASS(klass),
-      gst_static_pad_template_get (&gst_replace_sink_template));
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
+        gst_caps_from_string (VIDEO_SINK_CAPS)));
 % instance-init
 % methods
 % end
index bee7085..ec9d08b 100644 (file)
@@ -7,16 +7,10 @@
 #define VIDEO_SRC_CAPS \
     GST_VIDEO_CAPS_MAKE("{ I420, Y444, Y42B, UYVY, RGBA }")
 
-static GstStaticPadTemplate gst_replace_src_template =
-GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (VIDEO_SRC_CAPS)
-    );
-
 % base-init
   gst_element_class_add_pad_template (GST_ELEMENT_CLASS(klass),
-      gst_static_pad_template_get (&gst_replace_src_template));
+      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
+        gst_caps_from_string (VIDEO_SRC_CAPS)));
 % instance-init
 % instance-init
 % methods