summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.h1
-rw-r--r--libhb/hb.c7
-rw-r--r--libhb/hb.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/libhb/common.h b/libhb/common.h
index 2a56701db..682b60c89 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -462,6 +462,7 @@ struct hb_state_s
int hours;
int minutes;
int seconds;
+ int sequence_id;
} working;
struct
diff --git a/libhb/hb.c b/libhb/hb.c
index 6b108bdf0..55e2da646 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -964,6 +964,7 @@ void hb_start( hb_handle_t * h )
p.hours = -1;
p.minutes = -1;
p.seconds = -1;
+ p.sequence_id = 0;
#undef p
hb_unlock( h->state_lock );
@@ -1203,6 +1204,12 @@ void hb_set_state( hb_handle_t * h, hb_state_t * s )
h->state.param.working.job_cur =
h->job_count_permanent - hb_list_count( h->jobs );
h->state.param.working.job_count = h->job_count_permanent;
+
+ // Set which job is being worked on
+ if (h->current_job)
+ h->state.param.working.sequence_id = h->current_job->sequence_id;
+ else
+ h->state.param.working.sequence_id = 0;
}
hb_unlock( h->state_lock );
hb_unlock( h->pause_lock );
diff --git a/libhb/hb.h b/libhb/hb.h
index be629505f..9de4af732 100644
--- a/libhb/hb.h
+++ b/libhb/hb.h
@@ -83,7 +83,6 @@ void hb_set_anamorphic_size( hb_job_t * );
/* Handling jobs */
int hb_count( hb_handle_t * );
hb_job_t * hb_job( hb_handle_t *, int );
-hb_job_t * hb_current_job( hb_handle_t * h );
void hb_add( hb_handle_t *, hb_job_t * );
void hb_rem( hb_handle_t *, hb_job_t * );