vah264enc: Avoid reopen encoder or renegotiate.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 20 Sep 2022 18:55:18 +0000 (20:55 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 9 Nov 2022 05:13:26 +0000 (06:13 +0100)
commit351a107ecc9af4873c628504c311a28d9c076c8e
treebec6e77908eb45ed32092bec1766fc19a1026bc8
parent38f1a4ee3da82dc279d732a4ada2ad2875e011fc
vah264enc: Avoid reopen encoder or renegotiate.

If parameters remain similar enough to avoid either encoder reopening
or downstream renegotiation, avoid it.

This is going to be useful for dynamic parameters setting.

To check if the stream parameters changed, so the internal encoder has
to be closed and opened again, are required two steps:

1. If input caps, profile, chroma or rate control mode have changed.
2. If any of the calculated variables and element properties have
   changed.

Later on, only if the output caps also changed, the pipeline
is renegotiated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>
subprojects/gst-plugins-bad/sys/va/gstvah264enc.c