diff options
author | dynaflash <[email protected]> | 2007-12-17 16:25:38 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-12-17 16:25:38 +0000 |
commit | 4a53d572a85a263e54bcc32c2c945c93f4c77a68 (patch) | |
tree | c20b44126a537723b12e3fcfe34edb5e79beda69 /libhb | |
parent | 1ca7105bb474fee3829eaf98c75177e21bf54744 (diff) |
MacGui: Queue Update - thanks travistex
- The primary change is that HBJob now copies the relevant fields out of hb_job_s that it needs. It no longer keeps a pointer reference to libhb's job.
- The only time the queue looks at libhb's jobs is when scanning the job list in order to build of the GUI queue display.
- Removed all uses of hb_current_job().
- Canceled jobs now stay listed in the queue, with a canceled icon.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1130 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/common.h | 1 | ||||
-rw-r--r-- | libhb/hb.c | 7 | ||||
-rw-r--r-- | libhb/hb.h | 1 |
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 * ); |