Make setting encoding profiles more robust

Desktop / GNOME / PiTiVi - Thibault Saunier [] - 29 July 2017 20:20 UTC

When setting an encoding profile from a file we need to make sure several restrictions are handled:

- We need to make sure the resulting restriction caps are compatible with the encoder that is going to be used by encodebin

- We should ensure that the profile restriction caps are fully taken into account (if those restriction are not compatible with the encoder we can't do much)

- We need to try as much as possible to use user previously set formats

- We need to ensure fields that are mandatory for us are set in a way that is compatible with the encoder

This introduces a utility function (for better testability) that allows this kind of caps fixation and some unit tests for this function.

272f5a6 Make setting encoding profiles more robust
pitivi/ | 116 +++++++++++++++++++++++++++++----------------------
pitivi/ | 18 ++++----
pitivi/utils/ | 87 ++++++++++++++++++++++++++++++++++++++
tests/ | 6 ++-
tests/ | 35 ++++++++++++++++
5 files changed, 203 insertions(+), 59 deletions(-)


  • Share