diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-29 17:41:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-29 17:41:53 +0200 |
commit | 860ccd414dbb313fabf065b92838f0f39037584b (patch) | |
tree | 0d5c0d3510db3ca3d7e6487420e8d09f74ae1961 /tools | |
parent | a9ec4d62a89dd53aa295af02c7d5f57ef936359b (diff) | |
parent | d84d98943af42ce645ee022207bcf04e747d2d4a (diff) |
Merge remote-tracking branch 'origin/0.10'
Conflicts:
NEWS
RELEASE
common
configure.ac
docs/libs/gst-plugins-bad-libs-sections.txt
docs/plugins/gst-plugins-bad-plugins.args
docs/plugins/gst-plugins-bad-plugins.hierarchy
docs/plugins/gst-plugins-bad-plugins.interfaces
docs/plugins/inspect/plugin-adpcmdec.xml
docs/plugins/inspect/plugin-adpcmenc.xml
docs/plugins/inspect/plugin-assrender.xml
docs/plugins/inspect/plugin-audiovisualizers.xml
docs/plugins/inspect/plugin-autoconvert.xml
docs/plugins/inspect/plugin-bayer.xml
docs/plugins/inspect/plugin-bz2.xml
docs/plugins/inspect/plugin-camerabin2.xml
docs/plugins/inspect/plugin-celt.xml
docs/plugins/inspect/plugin-dataurisrc.xml
docs/plugins/inspect/plugin-debugutilsbad.xml
docs/plugins/inspect/plugin-dtmf.xml
docs/plugins/inspect/plugin-dtsdec.xml
docs/plugins/inspect/plugin-dvbsuboverlay.xml
docs/plugins/inspect/plugin-dvdspu.xml
docs/plugins/inspect/plugin-faac.xml
docs/plugins/inspect/plugin-faad.xml
docs/plugins/inspect/plugin-gsm.xml
docs/plugins/inspect/plugin-h264parse.xml
docs/plugins/inspect/plugin-mms.xml
docs/plugins/inspect/plugin-modplug.xml
docs/plugins/inspect/plugin-mpeg2enc.xml
docs/plugins/inspect/plugin-mpegdemux2.xml
docs/plugins/inspect/plugin-mpegtsdemux.xml
docs/plugins/inspect/plugin-mpegvideoparse.xml
docs/plugins/inspect/plugin-mplex.xml
docs/plugins/inspect/plugin-pcapparse.xml
docs/plugins/inspect/plugin-rawparse.xml
docs/plugins/inspect/plugin-rtpmux.xml
docs/plugins/inspect/plugin-rtpvp8.xml
docs/plugins/inspect/plugin-scaletempo.xml
docs/plugins/inspect/plugin-schro.xml
docs/plugins/inspect/plugin-sdp.xml
docs/plugins/inspect/plugin-segmentclip.xml
docs/plugins/inspect/plugin-shm.xml
docs/plugins/inspect/plugin-videomaxrate.xml
docs/plugins/inspect/plugin-videoparsersbad.xml
docs/plugins/inspect/plugin-vp8.xml
docs/plugins/inspect/plugin-y4mdec.xml
ext/celt/gstceltdec.c
ext/dts/gstdtsdec.c
ext/modplug/gstmodplug.cc
ext/opus/gstopusenc.c
gst-libs/gst/video/gstbasevideocodec.c
gst-libs/gst/video/gstbasevideocodec.h
gst-libs/gst/video/gstbasevideodecoder.c
gst-libs/gst/video/gstbasevideodecoder.h
gst-libs/gst/video/gstbasevideoencoder.c
gst-libs/gst/video/gstbasevideoencoder.h
gst/adpcmdec/Makefile.am
gst/audiovisualizers/gstbaseaudiovisualizer.c
gst/h264parse/gsth264parse.c
gst/mpegdemux/mpegtsparse.c
gst/mpegtsdemux/mpegtsbase.c
gst/mpegtsdemux/mpegtspacketizer.c
gst/mpegtsdemux/mpegtsparse.c
gst/mpegtsdemux/tsdemux.c
gst/mpegtsdemux/tsdemux.h
gst/mxf/mxfdemux.c
gst/rawparse/gstaudioparse.c
gst/videoparsers/gsth263parse.c
gst/videoparsers/gsth264parse.c
sys/d3dvideosink/d3dvideosink.c
sys/decklink/gstdecklinksink.cpp
sys/dvb/gstdvbsrc.c
sys/shm/gstshmsrc.c
sys/vdpau/h264/gstvdph264dec.c
sys/vdpau/mpeg/gstvdpmpegdec.c
tests/examples/opencv/gst_element_print_properties.c
win32/common/config.h
Diffstat (limited to 'tools')
-rw-r--r-- | tools/element-templates/basesrc | 16 | ||||
-rw-r--r-- | tools/element-templates/element | 12 | ||||
-rw-r--r-- | tools/element-templates/sinkpad-template | 19 | ||||
-rw-r--r-- | tools/element-templates/sinkpad-template-video | 33 | ||||
-rw-r--r-- | tools/element-templates/srcpad-template | 19 | ||||
-rw-r--r-- | tools/element-templates/srcpad-template-video | 33 | ||||
-rw-r--r-- | tools/element-templates/videofilter | 78 |
7 files changed, 207 insertions, 3 deletions
diff --git a/tools/element-templates/basesrc b/tools/element-templates/basesrc index 0b7e56fc1..1be325a22 100644 --- a/tools/element-templates/basesrc +++ b/tools/element-templates/basesrc @@ -161,10 +161,16 @@ static gboolean gst_replace_event (GstBaseSrc * src, GstEvent * event) { GstReplace *replace = GST_REPLACE (src); + gboolean ret; GST_DEBUG_OBJECT (replace, "event"); - return TRUE; + switch (GST_EVENT_TYPE (event)) { + default: + ret = GST_BASE_SRC_CLASS (parent_class)->event (src, event); + } + + return ret; } static GstFlowReturn @@ -192,10 +198,16 @@ static gboolean gst_replace_query (GstBaseSrc * src, GstQuery * query) { GstReplace *replace = GST_REPLACE (src); + gboolean ret; GST_DEBUG_OBJECT (replace, "query"); - return TRUE; + switch (GST_QUERY_TYPE (query)) { + default: + ret = GST_BASE_SRC_CLASS (parent_class)->query (src, query); + } + + return ret; } static gboolean diff --git a/tools/element-templates/element b/tools/element-templates/element index 001f48762..38ab6e4da 100644 --- a/tools/element-templates/element +++ b/tools/element-templates/element @@ -123,7 +123,17 @@ gst_replace_send_event (GstElement * element, GstEvent * event) static gboolean gst_replace_query (GstElement * element, GstQuery * query) { + GstReplace *replace = GST_REPLACE (element); + gboolean ret; - return FALSE; + GST_DEBUG_OBJECT (replace, "query"); + + switch (GST_QUERY_TYPE (query)) { + default: + ret = GST_ELEMENT_CLASS (parent_class)->query (element, query); + break; + } + + return ret; } % end diff --git a/tools/element-templates/sinkpad-template b/tools/element-templates/sinkpad-template new file mode 100644 index 000000000..b06b346b1 --- /dev/null +++ b/tools/element-templates/sinkpad-template @@ -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/sinkpad-template-video b/tools/element-templates/sinkpad-template-video new file mode 100644 index 000000000..b317c6fd7 --- /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 b/tools/element-templates/srcpad-template new file mode 100644 index 000000000..dd0842bbd --- /dev/null +++ b/tools/element-templates/srcpad-template @@ -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 + diff --git a/tools/element-templates/srcpad-template-video b/tools/element-templates/srcpad-template-video new file mode 100644 index 000000000..4f3932086 --- /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 new file mode 100644 index 000000000..3a94b0838 --- /dev/null +++ b/tools/element-templates/videofilter @@ -0,0 +1,78 @@ +/* vim: set filetype=c: */ +% ClassName +GstVideoFilter +% TYPE_CLASS_NAME +GST_TYPE_VIDEO_FILTER +% pads +sinkpad-template-video srcpad-template-video +% pkg-config +gstreamer-video-0.10 +% includes +#include <gst/video/video.h> +#include <gst/video/gstvideofilter.h> +% prototypes +static gboolean +gst_replace_start (GstBaseTransform * trans); +static gboolean +gst_replace_stop (GstBaseTransform * trans); +static GstFlowReturn +gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf); +static gboolean +gst_replace_set_caps (GstBaseTransform * trans, GstCaps * incaps, + GstCaps * outcaps); +% declare-class + GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (klass); +% set-methods + base_transform_class->start = GST_DEBUG_FUNCPTR (gst_replace_start); + base_transform_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop); + base_transform_class->set_caps = GST_DEBUG_FUNCPTR (gst_replace_set_caps); + base_transform_class->transform_ip = GST_DEBUG_FUNCPTR (gst_replace_transform_ip); +% methods + +static gboolean +gst_replace_start (GstBaseTransform * trans) +{ + /* GstReplace *replace = GST_REPLACE (trans); */ + + /* initialize processing */ + return TRUE; +} + +static gboolean +gst_replace_stop (GstBaseTransform * trans) +{ + /* GstReplace *replace = GST_REPLACE (trans); */ + + /* finalize processing */ + return TRUE; +} + +static gboolean +gst_replace_set_caps (GstBaseTransform * trans, GstCaps * incaps, + GstCaps * outcaps) +{ + /* GstReplace *replace = GST_REPLACE (trans); */ + GstVideoFormat video_format; + int w, h; + + /* parse input caps, output caps are the same so we ignore them */ + if (!gst_video_format_parse_caps (incaps, &video_format, &w, &h)) + return FALSE; + + /* You'll need to add those fields to the instance struct first */ + /* replace->video_format = video_format; */ + /* replace->width = w; */ + /* replace->height = h; */ + return TRUE; +} + +static GstFlowReturn +gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf) +{ + /* GstReplace *replace = GST_REPLACE (trans); */ + + /* process the video data in the buffer in-place */ + return GST_FLOW_OK; +} + +% end |