summaryrefslogtreecommitdiffstats
path: root/common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2015-03-25 10:47:45 +0900
committerNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2015-03-25 10:47:45 +0900
commit1c35920d85e424b3f65aa6df1dbde689dd6ec007 (patch)
tree58b2cacb3674111aad5a4ded694db0cef5cf55f3 /common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch
commit BSP v1.8.0
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Diffstat (limited to 'common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch')
-rw-r--r--common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch b/common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch
new file mode 100644
index 0000000..1eef8de
--- /dev/null
+++ b/common/recipes-multimedia/gstreamer/gst-plugins-good/0007-videocrop-set-rowstride-capability.patch
@@ -0,0 +1,59 @@
+From 0d5b9694fc670d489d02018d1e2d83394f299ad5 Mon Sep 17 00:00:00 2001
+From: Kazunori Kobayashi <kkobayas@igel.co.jp>
+Date: Thu, 10 May 2012 11:20:18 +0900
+Subject: [PATCH 07/31] videocrop: set rowstride capability
+
+This patch sets the rowstride capability if downstream plugins
+can handle it.
+
+This patch is preliminary for the zero-copy cropping.
+---
+ gst/videocrop/gstvideocrop.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c
+index b0c3a68..ae7ddaf 100644
+--- a/gst/videocrop/gstvideocrop.c
++++ b/gst/videocrop/gstvideocrop.c
+@@ -585,22 +585,22 @@ gst_video_crop_transform_caps (GstBaseTransform * trans,
+ other_caps = gst_caps_new_empty ();
+
+ for (i = 0; i < gst_caps_get_size (caps); ++i) {
+- const GValue *v;
++ const GValue *in_width, *in_height;
+ GstStructure *structure, *new_structure;
+ GValue w_val = { 0, }, h_val = {
+ 0,};
+
+ structure = gst_caps_get_structure (caps, i);
+
+- v = gst_structure_get_value (structure, "width");
+- if (!gst_video_crop_transform_dimension_value (v, dx, &w_val)) {
++ in_width = gst_structure_get_value (structure, "width");
++ if (!gst_video_crop_transform_dimension_value (in_width, dx, &w_val)) {
+ GST_WARNING_OBJECT (vcrop, "could not tranform width value with dx=%d"
+ ", caps structure=%" GST_PTR_FORMAT, dx, structure);
+ continue;
+ }
+
+- v = gst_structure_get_value (structure, "height");
+- if (!gst_video_crop_transform_dimension_value (v, dy, &h_val)) {
++ in_height = gst_structure_get_value (structure, "height");
++ if (!gst_video_crop_transform_dimension_value (in_height, dy, &h_val)) {
+ g_value_unset (&w_val);
+ GST_WARNING_OBJECT (vcrop, "could not tranform height value with dy=%d"
+ ", caps structure=%" GST_PTR_FORMAT, dy, structure);
+@@ -610,6 +610,10 @@ gst_video_crop_transform_caps (GstBaseTransform * trans,
+ new_structure = gst_structure_copy (structure);
+ gst_structure_set_value (new_structure, "width", &w_val);
+ gst_structure_set_value (new_structure, "height", &h_val);
++
++ /* set rowstride when creating output caps */
++ if (vcrop->stride_supported && (direction == GST_PAD_SINK))
++ gst_structure_set_value (new_structure, "rowstride", in_width);
+ g_value_unset (&w_val);
+ g_value_unset (&h_val);
+ GST_LOG_OBJECT (vcrop, "transformed structure %2d: %" GST_PTR_FORMAT
+--
+1.7.9.5
+