def loadAll(self): """Loads profiles from GstEncodingTarget and add them to self.combo. Override from PresetManager """ for target in GstPbutils.encoding_list_all_targets(): if target.get_category() != GstPbutils.ENCODING_CATEGORY_FILE_EXTENSION: self._add_target(target)
def loadAll(self): """Loads profiles from GstEncodingTarget and add them to self.combo. Override from PresetManager """ for target in GstPbutils.encoding_list_all_targets(): if target.get_category( ) != GstPbutils.ENCODING_CATEGORY_FILE_EXTENSION: self._add_target(target)
def test_missing_x264(self): # Simulate no encoder being available for the profile's format. targets = GstPbutils.encoding_list_all_targets() for target in targets: for profile in target.get_profiles(): for sub_profile in profile.get_profiles(): raw_caps = "audio/non_existing_whatever_it_s_true" sub_profile.get_format = mock.Mock(return_value=raw_caps) with mock.patch.object( GstPbutils, "encoding_list_all_targets") as encoding_list_all_targets: encoding_list_all_targets.return_value = targets project = common.create_project() manager = PresetsManager(project) self.assertIsNone(manager.initial_preset())
def encoding_target_exists(tname): """Checks if a GstEncodingTarget called @name exists.""" for target in GstPbutils.encoding_list_all_targets(): if tname in target.get_name().split(";"): return True, "" return False, "EncodingTarget %s not present on the system" % tname