summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1faea34)
raw | patch | inline | side by side (parent: 1faea34)
author | Rob Clark <rob@ti.com> | |
Thu, 14 Jun 2012 02:18:06 +0000 (21:18 -0500) | ||
committer | Rob Clark <rob@ti.com> | |
Thu, 14 Jun 2012 02:37:52 +0000 (21:37 -0500) |
Note: eventually remove crop event.. but for now leave it until other
elements are updated.
elements are updated.
src/gstducatividdec.c | patch | blob | history | |
src/gstducatividdec.h | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 22484269f666cdfe1cf81e9045591a31e40e45d2..d63eb924cb1a72bb17c0272df25efefe338e076e 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
gst_event_new_crop (r->topLeft.y, r->topLeft.x,
crop_width, crop_height));
+ if (self->crop)
+ gst_video_crop_unref (self->crop);
+
+ self->crop = gst_video_crop_new (r->topLeft.y, r->topLeft.x,
+ crop_width, crop_height);
+
self->send_crop_event = FALSE;
}
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (self->srcpad));
}
+ if (self->crop)
+ gst_buffer_set_video_crop (outbuf, self->crop);
+
ret = gst_pad_push (self->srcpad, outbuf);
if (flow_ret)
*flow_ret = ret;
diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h
index 7bc2363a08c1039ab02cf404e45aac4d8c2c73aa..a7cae6a081592e709ed4e35754d103e1f889f6ed 100644 (file)
--- a/src/gstducatividdec.h
+++ b/src/gstducatividdec.h
#include <gst/drm/gstdrmbufferpool.h>
#include <gst/video/video.h>
+#include <gst/video/video-crop.h>
G_BEGIN_DECLS
/* number of bytes pushed to input on current frame: */
gint in_size;
+ /* the crop to attach to output buffers: */
+ GstVideoCrop *crop;
+
/* on first output buffer, we need to send crop info to sink.. and some
* operations like flushing should be avoided if we haven't sent any
* input buffers: