encoder: mpeg2: allow target decoder constraints
@gb
Submitted by Gwenole Beauchesne Link to original bug (#719707)
Description
This is the MPEG-2 encoding counterpart for bug 719694. The target decoder constraints are to be specified through downstream caps only, not vaapiencode_mpeg2 properties.
- Public API:
- gst_vaapi_encoder_mpeg2_set_max_profile_and_level().
- Order of resolution:
- Plug-in element (vaapiencode_mpeg2) settings are applied first ;
- Then, downstream element caps are applied through the public API.
If the target decoder constraints could not be met, e.g. invalid encoded resolution for the specified level, then an error is raised.