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

Function title_range_get_duration

gtk/src/callbacks.c:1138–1172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1136}
1137
1138static gint64
1139title_range_get_duration (GhbValue * settings, const hb_title_t * title)
1140{
1141 gint64 start, end;
1142
1143 if (ghb_settings_combo_int(settings, "PtoPType") == 0)
1144 {
1145 start = ghb_dict_get_int(settings, "start_point");
1146 end = ghb_dict_get_int(settings, "end_point");
1147 return ghb_chapter_range_get_duration(title, start, end) / 90000;
1148 }
1149 else if (ghb_settings_combo_int(settings, "PtoPType") == 1)
1150 {
1151 start = ghb_dict_get_int(settings, "start_point");
1152 end = ghb_dict_get_int(settings, "end_point");
1153 return end - start;
1154 }
1155 else if (ghb_settings_combo_int(settings, "PtoPType") == 2)
1156 {
1157 if (title != NULL)
1158 {
1159 gint64 frames;
1160
1161 start = ghb_dict_get_int(settings, "start_point");
1162 end = ghb_dict_get_int(settings, "end_point");
1163 frames = end - start + 1;
1164 return frames * title->vrate.den / title->vrate.num;
1165 }
1166 else
1167 {
1168 return 0;
1169 }
1170 }
1171 return 0;
1172}
1173
1174static void
1175update_title_duration(signal_user_data_t *ud)

Callers 1

update_title_durationFunction · 0.85

Calls 3

ghb_settings_combo_intFunction · 0.85
ghb_dict_get_intFunction · 0.85

Tested by

no test coverage detected