After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796541 - waylandsink: support video crop using viewporter protocol
waylandsink: support video crop using viewporter protocol
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-08 09:16 UTC by Haihua Hu
Modified: 2018-11-03 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
waylandsink: support video crop using viewporter protocol (3.84 KB, patch)
2018-06-08 09:17 UTC, Haihua Hu
none Details | Review
waylandsink: support video crop meta using viewporter protocol (4.23 KB, patch)
2018-06-11 05:39 UTC, Haihua Hu
needs-work Details | Review

Description Haihua Hu 2018-06-08 09:16:32 UTC
waylandsink: support video crop using viewporter protocol
    
use API wp_viewport_set_source() to support video crop handle
Comment 1 Haihua Hu 2018-06-08 09:17:02 UTC
Created attachment 372605 [details] [review]
waylandsink: support video crop using viewporter protocol
Comment 2 Nicolas Dufresne (ndufresne) 2018-06-08 12:04:58 UTC
Can you clarify what this fixes ? I'll do the review after. I don't remember seeing this API before, did you forgot to bump the require protocol version ? Which compositors supports this ?
Comment 3 Nicolas Dufresne (ndufresne) 2018-06-08 12:15:28 UTC
Ah, sorry, crop meta, that wasn't clear, can you use that term in the commit message please ?
Comment 4 Nicolas Dufresne (ndufresne) 2018-06-08 12:21:32 UTC
Review of attachment 372605 [details] [review]:

Ok, looks ok in general, please make a better commit message, and also update propose_allocation() as right now, if you receive a crop meta on a buffer it means up have a bug in your upstream element. Upstream element should only attach crop meta if the allocation query contains GST_VIDEO_CROP_META_API_TYPE
Comment 5 Haihua Hu 2018-06-11 01:47:35 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #4)
> Review of attachment 372605 [details] [review] [review]:
> 
> Ok, looks ok in general, please make a better commit message, and also
> update propose_allocation() as right now, if you receive a crop meta on a
> buffer it means up have a bug in your upstream element. Upstream element
> should only attach crop meta if the allocation query contains
> GST_VIDEO_CROP_META_API_TYPE

Ok, thanks. I will update this commit message and refine my code
Comment 6 Haihua Hu 2018-06-11 05:39:12 UTC
Created attachment 372628 [details] [review]
waylandsink: support video crop meta using viewporter protocol
Comment 7 Nicolas Dufresne (ndufresne) 2018-06-11 23:38:18 UTC
I've tried on Weston, but it failed, saying "wl_surface@10 has viewport source outside buffer".

gst-launch-1.0 videotestsrc ! videocrop top=30 ! waylandsink

Any idea ?
Comment 8 Nicolas Dufresne (ndufresne) 2018-06-11 23:46:58 UTC
Just looked, as caps a display width / height, we need to remember the allocation caps, or compute somehow the padded width/height, otherwise we'll get errors like this.
Comment 9 Haihua Hu 2018-06-12 05:37:04 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #8)
> Just looked, as caps a display width / height, we need to remember the
> allocation caps, or compute somehow the padded width/height, otherwise we'll
> get errors like this.

I got some other errors like below:
** (gst-launch-1.0:3428): CRITICAL **: gst_video_frame_copy: assertion 'dinfo->width == sinfo->width && dinfo->height == sinfo->height' failed

and something like below:
Unsupported strides and offsets.
Comment 10 GStreamer system administrator 2018-11-03 14:26:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/732.