X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fhb.h;h=6de2fcb745859e8608dbc4b0f949487888b8ef3c;hb=37bbf6c1646ca3b539d1b6f1b5f2a1bb779042a2;hp=4ea05097597538e5e0c64e1300e2d60b3f477f18;hpb=4318591edb12c04004d3c40dbab887b97279d770;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/hb.h b/libhb/hb.h index 4ea05097..6de2fcb7 100644 --- a/libhb/hb.h +++ b/libhb/hb.h @@ -5,7 +5,7 @@ extern "C" { #endif -#include "hbversion.h" +#include "project.h" #include "common.h" /* hb_init() @@ -14,47 +14,10 @@ extern "C" { #define HB_DEBUG_NONE 0 #define HB_DEBUG_ALL 1 void hb_register( hb_work_object_t * ); -hb_handle_t * hb_init_real( int verbose, int update_check ); +void hb_register_logger( void (*log_cb)(const char* message) ); +hb_handle_t * hb_init( int verbose, int update_check ); hb_handle_t * hb_init_dl ( int verbose, int update_check ); // hb_init for use with dylib -#define hb_init(v,u) \ -hb_init_real( v, u ); \ -hb_register( &hb_sync ); \ -hb_register( &hb_decmpeg2 ); \ -hb_register( &hb_decsub ); \ -hb_register( &hb_render ); \ -hb_register( &hb_encavcodec ); \ -hb_register( &hb_encxvid ); \ -hb_register( &hb_encx264 ); \ -hb_register( &hb_enctheora ); \ -hb_register( &hb_deca52 ); \ -hb_register( &hb_decdca ); \ -hb_register( &hb_decavcodec ); \ -hb_register( &hb_decavcodecv ); \ -hb_register( &hb_decavcodecvi ); \ -hb_register( &hb_decavcodecai ); \ -hb_register( &hb_declpcm ); \ -hb_register( &hb_encfaac ); \ -hb_register( &hb_enclame ); \ -hb_register( &hb_encvorbis ); \ - -#define hb_init_express(v,u) \ -hb_init_real( v, u ); \ -hb_register( &hb_sync ); \ -hb_register( &hb_decmpeg2 ); \ -hb_register( &hb_decsub ); \ -hb_register( &hb_render ); \ -hb_register( &hb_encavcodec ); \ -hb_register( &hb_encx264 ); \ -hb_register( &hb_deca52 ); \ -hb_register( &hb_decdca ); \ -hb_register( &hb_decavcodec ); \ -hb_register( &hb_decavcodecv ); \ -hb_register( &hb_decavcodecvi ); \ -hb_register( &hb_decavcodecai ); \ -hb_register( &hb_declpcm ); \ -hb_register( &hb_encfaac ); \ - /* hb_get_version() */ char * hb_get_version( hb_handle_t * ); int hb_get_build( hb_handle_t * ); @@ -72,13 +35,17 @@ int hb_check_update( hb_handle_t * h, char ** version ); void hb_set_cpu_count( hb_handle_t *, int ); char * hb_dvd_name( char * path ); +void hb_dvd_set_dvdnav( int enable ); /* hb_scan() Scan the specified path. Can be a DVD device, a VIDEO_TS folder or a VOB file. If title_index is 0, scan all titles. */ void hb_scan( hb_handle_t *, const char * path, int title_index, int preview_count, - int store_previews ); + int store_previews, uint64_t min_duration ); +void hb_scan_stop( hb_handle_t * ); +hb_filter_object_t * hb_get_filter_object(int filter_id, const char * settings); +uint64_t hb_first_duration( hb_handle_t * ); /* hb_get_titles() Returns the list of valid titles detected by the latest scan. */ @@ -89,16 +56,22 @@ hb_list_t * hb_get_titles( hb_handle_t * ); Taken from Thomas Oestreich's 32detect filter in the Transcode project. */ int hb_detect_comb( hb_buffer_t * buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold ); +void hb_get_preview_by_index( hb_handle_t *, int, int, uint8_t * ); void hb_get_preview( hb_handle_t *, hb_title_t *, int, uint8_t * ); void hb_set_size( hb_job_t *, double ratio, int pixels ); +void hb_set_anamorphic_size_by_index( hb_handle_t *, int, + int *output_width, int *output_height, + int *output_par_width, int *output_par_height ); void hb_set_anamorphic_size( hb_job_t *, int *output_width, int *output_height, - int *output_par_width, int *output_par_height); + int *output_par_width, int *output_par_height ); /* Handling jobs */ int hb_count( hb_handle_t * ); hb_job_t * hb_job( hb_handle_t *, int ); +void hb_set_chapter_name( hb_handle_t *, int, int, const char * ); +void hb_set_job( hb_handle_t *, int, hb_job_t * ); void hb_add( hb_handle_t *, hb_job_t * ); void hb_rem( hb_handle_t *, hb_job_t * ); @@ -107,6 +80,21 @@ void hb_pause( hb_handle_t * ); void hb_resume( hb_handle_t * ); void hb_stop( 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 */ + uint64_t total_time; /* real length in 90khz (i.e. / 90000 */ + int render_dropped; /* frames droped by telecine */ + int vrate; /* initial assigned vrate */ + int vrate_base; /* initial assigned vrate_base */ + + hb_subtitle_t *select_subtitle; /* foreign language scan subtitle */ +} hb_interjob_t; + +hb_interjob_t * hb_interjob_get( hb_handle_t * ); + /* hb_get_state() Should be regularly called by the UI (like 5 or 10 times a second). Look at test/test.c to see how to use it. */ @@ -120,6 +108,14 @@ int hb_get_scancount( hb_handle_t * ); Aborts all current jobs if any, frees memory. */ void hb_close( hb_handle_t ** ); +/* hb_global_close() + Performs final cleanup for the process. */ +void hb_global_close(); + +/* hb_get_instance_id() + Return the unique instance id of an libhb instance created by hb_init. */ +int hb_get_instance_id( hb_handle_t * h ); + #ifdef __cplusplus } #endif