| 4353 | } |
| 4354 | |
| 4355 | static gchar* |
| 4356 | working_status_string(signal_user_data_t *ud, ghb_instance_status_t *status) |
| 4357 | { |
| 4358 | gchar *task_str, *job_str, *status_str; |
| 4359 | gint qcount; |
| 4360 | gint index; |
| 4361 | |
| 4362 | qcount = ghb_array_len(ud->queue); |
| 4363 | index = ghb_find_queue_job(ud->queue, status->unique_id, NULL); |
| 4364 | if (qcount > 1) |
| 4365 | { |
| 4366 | job_str = g_strdup_printf(_("job %d of %d, "), index+1, qcount); |
| 4367 | } |
| 4368 | else |
| 4369 | { |
| 4370 | job_str = g_strdup(""); |
| 4371 | } |
| 4372 | if (status->pass_count > 1) |
| 4373 | { |
| 4374 | if (status->pass_id == HB_PASS_SUBTITLE) |
| 4375 | { |
| 4376 | task_str = g_strdup_printf(_("pass %d (subtitle scan) of %d, "), |
| 4377 | status->pass, status->pass_count); |
| 4378 | } |
| 4379 | else |
| 4380 | { |
| 4381 | task_str = g_strdup_printf(_("pass %d of %d, "), |
| 4382 | status->pass, status->pass_count); |
| 4383 | } |
| 4384 | } |
| 4385 | else |
| 4386 | { |
| 4387 | task_str = g_strdup(""); |
| 4388 | } |
| 4389 | if(status->seconds > -1) |
| 4390 | { |
| 4391 | if (status->rate_cur > 0.0) |
| 4392 | { |
| 4393 | status_str= g_strdup_printf( |
| 4394 | _("Encoding: %s%s%.2f %%" |
| 4395 | " (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)"), |
| 4396 | job_str, task_str, |
| 4397 | 100.0 * status->progress, |
| 4398 | status->rate_cur, status->rate_avg, status->hours, |
| 4399 | status->minutes, status->seconds ); |
| 4400 | } |
| 4401 | else |
| 4402 | { |
| 4403 | status_str= g_strdup_printf( |
| 4404 | _("Encoding: %s%s%.2f %%" |
| 4405 | " (ETA %02dh%02dm%02ds)"), |
| 4406 | job_str, task_str, |
| 4407 | 100.0 * status->progress, |
| 4408 | status->hours, status->minutes, status->seconds ); |
| 4409 | } |
| 4410 | } |
| 4411 | else |
| 4412 | { |
no test coverage detected