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 756935 - glimagesink: get_caps should return caps with current size
glimagesink: get_caps should return caps with current size
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Windows
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-21 22:57 UTC by Philippe Renon
Modified: 2018-11-03 11:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glimagesink: expose preferring the current frame size (1.62 KB, patch)
2016-05-15 16:06 UTC, Matthew Waters (ystreet00)
none Details | Review

Description Philippe Renon 2015-10-21 22:57:45 UTC
This would help upstream elements that want to produce video buffers of the same size as the sink.

It would also help when renegotiating after the sink surface is resized.

The Upstream caps (re)negotiation documentation (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-nego-upstream.html) can be understood as requiring that the sink returns caps with the current size.

Other sinks, like ximagesrc, return caps with the current size.
Comment 1 Sebastian Dröge (slomo) 2015-10-22 07:03:03 UTC
Only ximagesink does this currently :) The problem here is that doing this might cause an upstream element to rescale in CPU, which is going to be much slower than letting glimagesink do the rescaling in the GPU.
Comment 2 Tim-Philipp Müller 2015-10-22 08:31:58 UTC
Can't you just return e.g.

  video/x-raw, width=1920, height=1080;
  video/x-raw, width=[1,MAX], height=[1,MAX];

then upstream can know what the 'prefered' size is but also knows that it can passthrough any size, no?
Comment 3 Sebastian Dröge (slomo) 2015-10-22 08:53:03 UTC
Right, that's how it should work. To prefer upstream doing the conversion, we would have to override the get_caps vfunc like in ximagesink and do the filter handling the other way around.
Comment 4 Philippe Renon 2015-10-22 08:58:42 UTC
Wanted, but forgot, to add an extract of the doc I referred to, so here it is:

"Elements that want to propose a new format upstream need to first check if the new caps are acceptable upstream with an ACCEPT_CAPS query. Then they would send a RECONFIGURE event and be prepared to answer the CAPS query with the new preferred format. It should be noted that when there is no upstream element that can (or wants) to renegotiate, the element needs to deal with the currently configured format."

It is pretty clear. The only counter argument could be that the element does *not* want to propose a new format. But why would it not want ;)
Comment 5 Matthew Waters (ystreet00) 2016-05-15 16:06:58 UTC
Created attachment 327940 [details] [review]
glimagesink: expose preferring the current frame size
Comment 6 GStreamer system administrator 2018-11-03 11:42:41 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-base/issues/235.