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

Function update_status

gtk/src/hb-backend.c:3748–3848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3746}
3747
3748static void
3749update_status(hb_state_t *state, ghb_instance_status_t *status)
3750{
3751 status->unique_id = state->sequence_id;
3752
3753#define p state->param.scanning
3754 if (state->state & HB_STATE_SCANNING)
3755 {
3756 status->state |= GHB_STATE_SCANNING;
3757 status->title_count = p.title_count;
3758 status->title_cur = p.title_cur;
3759 status->preview_count = p.preview_count;
3760 status->preview_cur = p.preview_cur;
3761 status->progress = p.progress;
3762 }
3763 else
3764 {
3765 // If last state seen was scanning, signal that scan id complete
3766 if (status->state & GHB_STATE_SCANNING)
3767 {
3768 status->state |= GHB_STATE_SCANDONE;
3769 }
3770 status->state &= ~GHB_STATE_SCANNING;
3771 }
3772#undef p
3773#define p state->param.working
3774 if (state->state & (HB_STATE_WORKING | HB_STATE_WORKDONE |
3775 HB_STATE_SEARCHING))
3776 {
3777 status->pass = p.pass;
3778 status->pass_count = p.pass_count;
3779 status->pass_id = p.pass_id;
3780 status->progress = p.progress;
3781 status->rate_cur = p.rate_cur;
3782 status->rate_avg = p.rate_avg;
3783 status->eta_seconds = p.eta_seconds;
3784 status->hours = p.hours;
3785 status->minutes = p.minutes;
3786 status->seconds = p.seconds;
3787 status->paused = p.paused;
3788
3789 if (state->state & HB_STATE_WORKING)
3790 {
3791 status->state |= GHB_STATE_WORKING;
3792 status->state &= ~GHB_STATE_PAUSED;
3793 status->state &= ~GHB_STATE_SEARCHING;
3794 }
3795 else
3796 {
3797 status->state &= ~GHB_STATE_WORKING;
3798 }
3799 if (state->state & HB_STATE_SEARCHING)
3800 {
3801 status->state |= GHB_STATE_SEARCHING;
3802 status->state &= ~GHB_STATE_WORKING;
3803 status->state &= ~GHB_STATE_PAUSED;
3804 }
3805 else

Callers 1

ghb_track_statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected