With the addition of the 'keep-aspect-ratio' sizing policy, content
that doesn't fit the target size is downscaled according to its own
aspect ratio to fit that target size, and centered.
Centering might not always be the desired behaviour, however;
consumers of this API might want to align the resulting picture to
the left or to the right.
To account for any of these cases, add two new properties to the
glvideomixer pad: xalign, and yalign. They operate on normalized
coordinates (0.0 for start, 1.0 for end), and default to 0.5 which
centers content.
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3762>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3762>
The sizing policy allows selecting between the current behavior,
which deforms the texture to fill the width and height of the
pad; and a new 'keep-aspect-ratio' sizing policy, which fits the
texture within the rectangle respecting its original aspect ratio.
The reason for this is that this allows avoiding extra elements
in the pipeline, and reduces the number of buffer passing through
the pipeline.
Most of this code is a direct port of the sizing policy handling
of the compositor element, except it is adapted to operate on GL
texture coordinates through the projection matrix.
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3760>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3760>
Handling mouse navigation events in glvideomixer element, if no
pixel-aspect-ratio info in the caps, an assertion error is produced
inside gst_util_fraction_multiply because default denominator is zero.
Error fixed:
```
(gst-launch-1.0:102654): GStreamer-CRITICAL **: 00:47:51.598: gst_util_fraction_multiply: assertion 'b_d != 0' failed
```
Simple pipeline to reproduce the issue:
```
gst-launch-1.0 -v glvideomixer name=mix ! glimagesinkelement gltestsrc ! mix.sink_0
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3766>
Whenever the surface is resized before the stream is negotiated, we endup
with an assertion in libgstvideo.
gst_video_center_rect: assertion 'src->h != 0' failed
This fixes it, by following the style aready in place, which is to ensure
surfaces have a minimum size of 1x1.
Fixes#1139
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3467>
GLib guarantees libintl is always present, using proxy-libintl as
last resort. There is no need to mock gettex API any more.
This fix static build on Windows because G_INTL_STATIC_COMPILATION must
be defined before including libintl.h, and glib does it for us as part
as including glib.h.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
Use the return value from gst_element_link_pads() and gst_bin_add()
Fixes:
../ext/gl/gstglmixerbin.c:305:12: error: variable 'res' set but not used [-Werror,-Wunused-but-set-variable]
gboolean res = TRUE;
^
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2038>