protected function assertValidSettings($settings)
{
if (count($settings) == 0) {
throw new InvalidEncodingSettingsException("Must have at least one setting defined in order to start a new encoding job");
}
foreach ($settings as $setting) {
if (!isset($setting['label'])) {
throw new InvalidEncodingSettingsException("Every setting must have a label");
}
if (!isset($setting['format'])) {
throw new InvalidEncodingSettingsException("Every setting must have a format");
}
}
}