encoder: fix and factor out check for supported rate-control modes.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 23 Jan 2014 14:10:11 +0000 (15:10 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 23 Jan 2014 14:48:58 +0000 (15:48 +0100)
commit1dc9837dd99e0418c083d9bd358d488ded40ba94
treeb5ed79386ba1044e5e78d95284fc5e674131a1df
parent14ad694fdcd10035f4e62714d322d1f2beb59f19
encoder: fix and factor out check for supported rate-control modes.

Cache the first compatible GstVaapiProfile found if the encoder is not
configured yet. Next, factor out the code to check for the supported
rate-control modes by moving out vaGetConfigAttributes() to a separate
function, while also making sure that the attribute type is actually
supported by the encoder.

Also fix the default set of supported rate control modes to not the
"none" variant. It's totally useless to expose it at this point.
gst-libs/gst/vaapi/gstvaapiencoder.c
gst-libs/gst/vaapi/gstvaapiencoder_h264.c
gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
gst-libs/gst/vaapi/gstvaapiencoder_priv.h