diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-03-17 16:05:20 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-03-17 16:05:20 +0000 |
commit | 3991742d77a81183f8ffbad59df7e1ec741ff803 (patch) | |
tree | 7cdf104d8c46ad64faed9cd013a63b7252b34705 /tools | |
parent | 48398114e672e7900faf239c2fe5ae6f343fa9e0 (diff) | |
download | gstreamer-plugins-bad-3991742d77a81183f8ffbad59df7e1ec741ff803.tar.gz |
gst-element-maker: add video pad template and use it in videofilter class
Would be nicer if one could just supplement the generic template
from the element template though.
Also, I would really have liked to just add those sections from the
pads template into the element templet directly (so I can cater for
src template caps == sink template caps), but that didn't seem to
work.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/element-templates/sinkpad-template-video | 33 | ||||
-rw-r--r-- | tools/element-templates/srcpad-template-video | 33 | ||||
-rw-r--r-- | tools/element-templates/videofilter | 2 |
3 files changed, 67 insertions, 1 deletions
diff --git a/tools/element-templates/sinkpad-template-video b/tools/element-templates/sinkpad-template-video new file mode 100644 index 000000000..ffdac843a --- /dev/null +++ b/tools/element-templates/sinkpad-template-video @@ -0,0 +1,33 @@ +/* vim: set filetype=c: */ + +% instance-members +% prototypes +% pad-template +/* FIXME: add/remove formats you can handle */ +#define VIDEO_SINK_CAPS \ + GST_VIDEO_CAPS_RGBA \ + GST_VIDEO_CAPS_ARGB \ + GST_VIDEO_CAPS_BGRA \ + GST_VIDEO_CAPS_ABGR \ + GST_VIDEO_CAPS_RGBx \ + GST_VIDEO_CAPS_xRGB \ + GST_VIDEO_CAPS_BGRx \ + GST_VIDEO_CAPS_xBGR \ + GST_VIDEO_CAPS_RGB \ + GST_VIDEO_CAPS_BGR \ + GST_VIDEO_CAPS_YUV("{ AYUV }") + +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_static_pad_template (element_class, + &gst_replace_sink_template); +% instance-init +% methods +% end + diff --git a/tools/element-templates/srcpad-template-video b/tools/element-templates/srcpad-template-video new file mode 100644 index 000000000..bfdc931c5 --- /dev/null +++ b/tools/element-templates/srcpad-template-video @@ -0,0 +1,33 @@ +/* vim: set filetype=c: */ + +% instance-members +% prototypes +% pad-template +/* FIXME: add/remove formats you can handle */ +#define VIDEO_SRC_CAPS \ + GST_VIDEO_CAPS_RGBA \ + GST_VIDEO_CAPS_ARGB \ + GST_VIDEO_CAPS_BGRA \ + GST_VIDEO_CAPS_ABGR \ + GST_VIDEO_CAPS_RGBx \ + GST_VIDEO_CAPS_xRGB \ + GST_VIDEO_CAPS_BGRx \ + GST_VIDEO_CAPS_xBGR \ + GST_VIDEO_CAPS_RGB \ + GST_VIDEO_CAPS_BGR \ + GST_VIDEO_CAPS_YUV("{ AYUV }") + +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_static_pad_template (element_class, + &gst_replace_src_template); +% instance-init +% methods +% end + diff --git a/tools/element-templates/videofilter b/tools/element-templates/videofilter index 65b2f3756..3a94b0838 100644 --- a/tools/element-templates/videofilter +++ b/tools/element-templates/videofilter @@ -4,7 +4,7 @@ GstVideoFilter % TYPE_CLASS_NAME GST_TYPE_VIDEO_FILTER % pads -sinkpad-template srcpad-template +sinkpad-template-video srcpad-template-video % pkg-config gstreamer-video-0.10 % includes |