MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_presets_update_version

Function hb_presets_update_version

libhb/preset.c:4127–4152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4125}
4126
4127hb_value_t * hb_presets_update_version(hb_value_t *presets)
4128{
4129 if (hb_value_type(presets) == HB_VALUE_TYPE_DICT)
4130 {
4131 // Is this a single preset or a packaged collection of presets?
4132 hb_value_t *val = hb_dict_get(presets, "PresetName");
4133 if (val == NULL)
4134 {
4135 val = hb_dict_get(presets, "VersionMajor");
4136 if (val != NULL)
4137 {
4138 hb_dict_set(presets, "VersionMajor",
4139 hb_value_int(hb_preset_version_major));
4140 hb_dict_set(presets, "VersionMinor",
4141 hb_value_int(hb_preset_version_minor));
4142 hb_dict_set(presets, "VersionMicro",
4143 hb_value_int(hb_preset_version_micro));
4144 hb_value_incref(presets);
4145 return presets;
4146 }
4147 // Unrecognizable preset file format
4148 return NULL;
4149 }
4150 }
4151 return presets_package(presets);
4152}
4153
4154int hb_presets_import(const hb_value_t *in, hb_value_t **out)
4155{

Callers 1

hb_presets_importFunction · 0.85

Calls 6

hb_value_typeFunction · 0.85
hb_dict_getFunction · 0.85
hb_dict_setFunction · 0.85
hb_value_intFunction · 0.85
hb_value_increfFunction · 0.85
presets_packageFunction · 0.85

Tested by

no test coverage detected