converting videocrop to use VideoCropMeta

Nicolas Dufresne nicolas.dufresne at collabora.com
Mon Mar 3 09:21:53 PST 2014


Le lundi 03 mars 2014 à 11:37 -0500, Stirling Westrup a écrit :

> Just wanted to mention that I keep looking at the GstVideoCropMeta for
> my cropping needs, and its insufficient. Basically, it assumes that
> the crop area is entirely contained within the frame. I have cases
> where I want to 'crop' a 1920x1080 frame with a 1920x1080 rectangle
> starting at y coordinate -960, so as to have just the top half of the
> original frame in the output frame. videobox can do this, but
> videocrop cannot, and I fear the author of the GstVideoCropMeta
> feature didn't consider that use case, as starting coordinates must
> always be positive.


Well cropping API will just crop, it's not a video placement API.
Placing the video on screen is handled through
gst_video_overlay_set_render_rectangle(). If you have a post production
use case, then you can use videomixer pad properties, or videobox. If
you need to create pixels that don't exist (e.g. black borders), you are
no longer just cropping. GstVideoCropMeta was specially designed to
offload decoder related cropping (where left and top cropping can be
positive) operation to the video sink, instead of having to make a copy.
Otherwise, the video would always be cropped from right and bottom, as
this is implicit in all color format we support.

cheers,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140303/52bfec2d/attachment.html>


More information about the gstreamer-devel mailing list