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

Function ShowPresets

test/test.c:2109–2155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2107}
2108
2109static void ShowPresets(hb_value_array_t *presets, int indent, int descriptions)
2110{
2111 if (presets == NULL)
2112 presets = hb_presets_get();
2113
2114 int count = hb_value_array_len(presets);
2115 int ii;
2116 for (ii = 0; ii < count; ii++)
2117 {
2118 const char *name;
2119 hb_dict_t *preset_dict = hb_value_array_get(presets, ii);
2120 name = hb_value_get_string(hb_dict_get(preset_dict, "PresetName"));
2121 Indent(stderr, " ", indent);
2122 if (hb_value_get_bool(hb_dict_get(preset_dict, "Folder")))
2123 {
2124 indent++;
2125 fprintf(stderr, "%s/\n", name);
2126 hb_value_array_t *children;
2127 children = hb_dict_get(preset_dict, "ChildrenArray");
2128 if (children == NULL)
2129 continue;
2130 ShowPresets(children, indent, descriptions);
2131 indent--;
2132 }
2133 else
2134 {
2135 fprintf(stderr, "%s\n", name);
2136 if (descriptions)
2137 {
2138 const char *desc;
2139 desc = hb_value_get_string(hb_dict_get(preset_dict,
2140 "PresetDescription"));
2141 if (desc != NULL && desc[0] != 0)
2142 {
2143 int ii;
2144 char **split = str_width_split(desc, 60);
2145 for (ii = 0; split[ii] != NULL; ii++)
2146 {
2147 Indent(stderr, " ", indent+1);
2148 fprintf(stderr, "%s\n", split[ii]);
2149 }
2150 hb_str_vfree(split);
2151 }
2152 }
2153 }
2154 }
2155}
2156
2157static double parse_hhmmss_strtok(void)
2158{

Callers 2

ParseOptionsFunction · 0.85
PreparePresetFunction · 0.85

Calls 9

hb_presets_getFunction · 0.85
hb_value_array_lenFunction · 0.85
hb_value_array_getFunction · 0.85
hb_value_get_stringFunction · 0.85
hb_dict_getFunction · 0.85
IndentFunction · 0.85
hb_value_get_boolFunction · 0.85
str_width_splitFunction · 0.85
hb_str_vfreeFunction · 0.85

Tested by

no test coverage detected