vaapiencode: fix caps to report the supported resolution range
Submitted by Gwenole Beauchesne
Currently, the resolution reported in static caps is fixed to be [ 1 - 2147483647 ]. When a complete pipeline is built at run-time, the correct range needs to be probed and reported on query-caps event, so that appropriate fallback could possibly be taken care of earlier.
Implementation note: VA surface attributes (min-width, min-height, max-width, max-height) are to be used.
The GstVaapiEncoder object can now be created earlier, and appropriate dimensions be extracted through gst_vaapi_encoder_get_min_resolution() and gst_vaapi_encoder_get_max_resolution().
If VA surface attributes are not supported, the default minimum would be one macroblock (16x16) and the default maximum to match the codec specs. Or, the default maximum could be 1080p, and the underlying VA driver shall actually report the real HW capabilities.