| 1852 | } |
| 1853 | |
| 1854 | static void UpdateState1(hb_scan_t *scan, int title) |
| 1855 | { |
| 1856 | hb_state_t state; |
| 1857 | |
| 1858 | int is_multi_file = hb_list_count(scan->paths) > 0; |
| 1859 | |
| 1860 | hb_get_state2(scan->h, &state); |
| 1861 | #define p state.param.scanning |
| 1862 | /* Update the UI */ |
| 1863 | state.state = HB_STATE_SCANNING; |
| 1864 | p.title_cur = title; |
| 1865 | p.title_count = scan->dvd ? hb_dvd_title_count( scan->dvd ) : |
| 1866 | scan->bd ? hb_bd_title_count( scan->bd ) : |
| 1867 | scan->batch ? hb_batch_title_count( scan->batch ) : |
| 1868 | is_multi_file ? hb_list_count(scan->paths) : |
| 1869 | hb_list_count(scan->title_set->list_title); |
| 1870 | p.preview_cur = 0; |
| 1871 | p.preview_count = 1; |
| 1872 | p.progress = 0.5 * ((float)p.title_cur + ((float)p.preview_cur / p.preview_count)) / p.title_count; |
| 1873 | #undef p |
| 1874 | |
| 1875 | hb_set_state(scan->h, &state); |
| 1876 | } |
| 1877 | |
| 1878 | static void UpdateState2(hb_scan_t *scan, int title) |
| 1879 | { |
no test coverage detected