va: encoding misc fixes

Merged Víctor Manuel Jáquez Leal requested to merge vjaquez/gstreamer:va-encoding-fixes into main
    vaencoder: Fix caps semantics.
    When using gst_va_caps_from_profiles() the semantics of sink/src caps
    depends if the element is an encoder or a decoder.
    va: Fix typos.
    vah264enc: Fail if unsupported rate control.
    Handle when encoder doesn't support rate control, which is set as
    VA_RC_NONE, and if the set rate control mode is not supported by the
    GStreamer element, the element configuration fails.
    Also it logs out max and target bitrate.
    vah264enc: Add todo item.
    vaencoder: Honor entrypoint at constructor.
    The entrypoint is set when the encoder helper is constructed,
    nonetheless it was also passed as parameter when opening. That's
    In order to simplify the code, the entrypoint at construction is
    But gst_va_encoder_has_profile_and_entrypoint() now doesn't rely in
    the internal list of profiles since it only contains those that
    belongs to codec and entrypoint, thus it queries directly the VA
    vabaseenc: Scope error bail out.
    Though this is not enforced by the GStreamer code style, it's clearer
    to add a nested scope for error handling using label/goto.
    vabaseenc: Use class entrypoint.
    Add a macro to access to class entrypoint and use it instead of move
    it to a variable.

Cc: @He_Junyan

Edited by Víctor Manuel Jáquez Leal

Merge request reports