From a986f54a4109bb8c3b2fb57849b4b0ea01e3c522 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 3 Nov 2015 09:46:28 -0800 Subject: libhb: make muxer, sync, and reader behave like other work objects simplify job initialization sequence, clean up code, and document dependencies in the sequence better. Make hb_add set job->sequence_id. It is no longer necessary for the frontend to do this. If the frontend needs the sequence_id, it is returned by hb_add(). Clean up use of interjob. do_job() now uses sequence_id to detect when a new sequence of related jobs is running and automatically clears interjob. --- libhb/hb.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libhb/hb.h') diff --git a/libhb/hb.h b/libhb/hb.h index c8101ed68..0436703a0 100644 --- a/libhb/hb.h +++ b/libhb/hb.h @@ -92,7 +92,7 @@ void hb_add_filter( hb_job_t * job, hb_filter_object_t * filter, /* Handling jobs */ int hb_count( hb_handle_t * ); hb_job_t * hb_job( hb_handle_t *, int ); -void hb_add( hb_handle_t *, hb_job_t * ); +int hb_add( hb_handle_t *, hb_job_t * ); void hb_rem( hb_handle_t *, hb_job_t * ); hb_title_t * hb_find_title_by_index( hb_handle_t *h, int title_index ); @@ -111,11 +111,11 @@ void hb_system_sleep_prevent(hb_handle_t*); /* Persistent data between jobs. */ typedef struct hb_interjob_s { - int last_job; /* job->sequence_id & 0xFFFFFF */ - int frame_count; /* number of frames counted by sync */ - int out_frame_count; /* number of frames counted by render */ - uint64_t total_time; /* real length in 90kHz ticks (i.e. seconds / 90000) */ - hb_rational_t vrate; /* actual measured output vrate from 1st pass */ + int sequence_id; /* job->sequence_id */ + int frame_count; /* number of frames counted by sync */ + int out_frame_count; /* number of frames counted by render */ + int64_t total_time; /* measured length in 90kHz ticks */ + hb_rational_t vrate; /* measured output vrate */ hb_subtitle_t *select_subtitle; /* foreign language scan subtitle */ } hb_interjob_t; -- cgit v1.2.3