[Bug 773473] kmssink: support display mode setting

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Apr 3 09:10:43 UTC 2017


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

--- Comment #54 from Michael Tretter <m.tretter at pengutronix.de> ---
Somehow, I also pasted my draft into the previous reply. Please ignore it and
just consider this one:

(In reply to Tim-Philipp Müller from comment #52)
> Not entirely sure about this patch:
> 
> commit 3d0c5dd58e2d8383f6f2d9d8a9d759fca25ee61d
> Author: Michael Tretter <m.tretter at pengutronix.de>
> Date:   Tue Nov 8 15:27:51 2016 +0100
> 
>     kmssink: allow only supported resolutions
>     
>     If the input buffers have a different size than the display, the frames
>     would have to be scaled or positioned on the display. The kmssink cannot
>     decide which behaviour would be appropriate for which use case.
>     
>     In order to avoid scaling or positioning of the input stream, allow only
>     the supported connector resolutions in the sink caps.
>     
>     https://bugzilla.gnome.org/show_bug.cgi?id=773473
>     
>     Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez at igalia.com>
> 
> 
> Wouldn't the more logical thing to do be to either make it a property or
> take the simplest approach to make things work? (Here probably:
> positioning/cropping)
> 
> Compare with ximagesink, which can't scale, yet still it won't refuse caps
> that are not exactly the size of the window and will crop or center the
> image as needed.
> 
> Or is this not possible/desirable in this case?

It would be really nice if the kmssink would just accept caps that do not
exactly match an available mode of the display and I struggled with it
myself.

Unfortunately, the kmssink is also responsible for setting the video mode
including the output resolution which leads to two problems:

If the input resolution does not match the supported mode, which mode should
be selected?

- the preferred mode of the monitor
- the mode that results in the least cropping
- the mode that results in the smallest letterbox

I am not sure which behavior would be correct or suitable as default.

Furthermore, the kmssink then would need to propose caps that it prefers the
resolution of the default mode, supports the resolutions of the available
modes, but in the end supports all resolutions. This leads to difficulties
with elements that also support various output resolutions, e.g., scalers or
cropping elements and the videotestsrc, and I don't see how I could express
this in caps.

-- 
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