| 1136 | } |
| 1137 | |
| 1138 | static gint64 |
| 1139 | title_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 | |
| 1174 | static void |
| 1175 | update_title_duration(signal_user_data_t *ud) |
no test coverage detected