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

Function update_adv_settings_tooltip

gtk/src/videohandler.c:150–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150static void
151update_adv_settings_tooltip(signal_user_data_t *ud)
152{
153 GtkWidget *eo = GTK_WIDGET(ghb_builder_widget("VideoOptionExtra"));
154 const char *tooltip_msg = _("Additional advanced arguments that can be passed to the video encoder.");
155
156 int encoder = ghb_get_video_encoder(ud->settings);
157 if (encoder & HB_VCODEC_X264_MASK)
158 {
159 GString *str = g_string_new("");
160 const char *preset;
161 const char *tune;
162 const char *profile;
163 const char *level;
164 const char *opts;
165 char *tunes;
166
167 preset = ghb_dict_get_string(ud->settings, "VideoPreset");
168 tune = ghb_dict_get_string(ud->settings, "VideoTune");
169 profile = ghb_dict_get_string(ud->settings, "VideoProfile");
170 level = ghb_dict_get_string(ud->settings, "VideoLevel");
171 opts = ghb_dict_get_string(ud->settings, "VideoOptionExtra");
172
173 if (tune[0] && strcmp(tune, "none"))
174 {
175 g_string_append_printf(str, "%s", tune);
176 }
177 if (ghb_dict_get_bool(ud->settings, "x264FastDecode"))
178 {
179 g_string_append_printf(str, "%s%s", str->str[0] ? "," : "", "fastdecode");
180 }
181 if (ghb_dict_get_bool(ud->settings, "x264ZeroLatency"))
182 {
183 g_string_append_printf(str, "%s%s", str->str[0] ? "," : "", "zerolatency");
184 }
185 tunes = g_string_free(str, FALSE);
186
187 char * new_opts;
188
189 int w = ghb_dict_get_int(ud->settings, "scale_width");
190 int h = ghb_dict_get_int(ud->settings, "scale_height");
191
192 if (w == 0 || h == 0)
193 {
194 if (!ghb_dict_get_bool(ud->settings, "PictureUseMaximumSize"))
195 {
196 w = ghb_dict_get_int(ud->settings, "PictureWidth");
197 h = ghb_dict_get_int(ud->settings, "PictureHeight");
198
199 if (h == 0 && w != 0)
200 {
201 h = w * 9 / 16;
202 }
203 if (w == 0 && h != 0)
204 {
205 w = h * 16 / 9;
206 }
207 }

Callers 2

video_setting_changed_cbFunction · 0.85

Calls 7

ghb_builder_widgetFunction · 0.85
ghb_get_video_encoderFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_dict_get_boolFunction · 0.85
ghb_dict_get_intFunction · 0.85
hb_x264_param_unparseFunction · 0.85

Tested by

no test coverage detected