[Bug 796569] d3dvideosink: videocrop results in black screen

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jun 12 18:04:13 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796569

--- Comment #3 from Nicolas Dufresne (ndufresne) <nicolas at ndufresne.ca> ---
Ok, prior to 1.14, it videocrop was doing the crop in software. If you go in
d3dvideosink code, gst-plugins-bad/sys/d3dvideosink.c, and you comment out the
line 467:

   //gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE, NULL);

You'll revert back to the previous behaviour. Now, the problem is that with
CropMeta attached to the buffer, one would expect that the caps width/height
are larger then the crop rectangle. But the way it's implemented in GStreamer,
the width/height is the display size. A larger display width/height would be
mean to not just stretch but also scale up. This code seems to have never been
tested, and is base on the assumption the the caps width/height is the size of
the buffer before it was cropped. So as a side effect, in your case, you are
asking D3D to crop rectangle (x, y, width, height) (0, 2, 1280, 718) a display
buffer of size 1280x718. This is of course impossible.

What need to be done (and that's why GstVideoMeta is strictly needed if crop
meta is used) is to read the width/height from the attached src buffer
GstVideoMeta. This one will say 1280x720, and then cropping this with rectangle
(0, 2, 1280, 718) will be valid.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list