diff options
author | titer <[email protected]> | 2006-03-16 06:58:39 +0000 |
---|---|---|
committer | titer <[email protected]> | 2006-03-16 06:58:39 +0000 |
commit | 47765593ae5f554e3e6e0e41d32c3d300bf537d3 (patch) | |
tree | 94ac3874dde28294fbab23ba101daa8f2892fe5a /libhb/internal.h | |
parent | a024a7dcf406dbc621c0765469a61dbc1983e0ed (diff) |
Structural changes, in order to eventually be able to compile HB
without certain encoders
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@34 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/internal.h')
-rw-r--r-- | libhb/internal.h | 115 |
1 files changed, 82 insertions, 33 deletions
diff --git a/libhb/internal.h b/libhb/internal.h index c93d48245..d241ae5c1 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -114,45 +114,94 @@ void hb_dvd_close( hb_dvd_t ** ); /*********************************************************************** * Work objects **********************************************************************/ -typedef struct hb_work_object_s hb_work_object_t; - -#define HB_WORK_COMMON \ - hb_lock_t * lock; \ - int used; \ - uint64_t time; \ - char * name; \ - hb_fifo_t * fifo_in; \ - hb_fifo_t * fifo_out; \ - int (* work) ( hb_work_object_t *, hb_buffer_t **, \ - hb_buffer_t ** ); \ - void (* close) ( hb_work_object_t ** ) +#define HB_CONFIG_MAX_SIZE 8192 +typedef union hb_esconfig_u +{ + struct + { + uint8_t bytes[HB_CONFIG_MAX_SIZE]; + int length; + } mpeg4; + + struct + { + uint8_t sps[HB_CONFIG_MAX_SIZE]; + int sps_length; + uint8_t pps[HB_CONFIG_MAX_SIZE]; + int pps_length; + } h264; + + struct + { + uint8_t bytes[HB_CONFIG_MAX_SIZE]; + int length; + } aac; + + struct + { + uint8_t headers[3][HB_CONFIG_MAX_SIZE]; + } vorbis; +} hb_esconfig_t; + +typedef struct hb_work_private_s hb_work_private_t; +typedef struct hb_work_object_s hb_work_object_t; +struct hb_work_object_s +{ + int id; + char * name; + + int (* init) ( hb_work_object_t *, hb_job_t * ); + int (* work) ( hb_work_object_t *, hb_buffer_t **, + hb_buffer_t ** ); + void (* close) ( hb_work_object_t * ); + + hb_fifo_t * fifo_in; + hb_fifo_t * fifo_out; + hb_esconfig_t * config; + + hb_work_private_t * private_data; + + hb_lock_t * lock; + int used; + uint64_t time; +}; + +enum +{ + WORK_SYNC = 1, + WORK_DECMPEG2, + WORK_DECSUB, + WORK_RENDER, + WORK_ENCAVCODEC, + WORK_ENCXVID, + WORK_ENCX264, + WORK_DECA52, + WORK_DECAVCODEC, + WORK_DECLPCM, + WORK_ENCFAAC, + WORK_ENCLAME, + WORK_ENCVORBIS +}; + +extern hb_work_object_t hb_sync; +extern hb_work_object_t hb_decmpeg2; +extern hb_work_object_t hb_decsub; +extern hb_work_object_t hb_render; +extern hb_work_object_t hb_encavcodec; +extern hb_work_object_t hb_encxvid; +extern hb_work_object_t hb_encx264; +extern hb_work_object_t hb_deca52; +extern hb_work_object_t hb_decavcodec; +extern hb_work_object_t hb_declpcm; +extern hb_work_object_t hb_encfaac; +extern hb_work_object_t hb_enclame; +extern hb_work_object_t hb_encvorbis; #define HB_WORK_IDLE 0 #define HB_WORK_OK 1 #define HB_WORK_ERROR 2 #define HB_WORK_DONE 3 - -#define DECLARE_WORK_NORMAL( a ) \ - hb_work_object_t * hb_work_##a##_init( hb_job_t * ); - -#define DECLARE_WORK_AUDIO( a ) \ - hb_work_object_t * hb_work_##a##_init( hb_job_t *, hb_audio_t * ); - -DECLARE_WORK_NORMAL( sync ); -DECLARE_WORK_NORMAL( decmpeg2 ); -DECLARE_WORK_NORMAL( decsub ); -DECLARE_WORK_NORMAL( render ); -DECLARE_WORK_NORMAL( encavcodec ); -DECLARE_WORK_NORMAL( encxvid ); -DECLARE_WORK_NORMAL( encx264 ); -DECLARE_WORK_AUDIO( deca52 ); -DECLARE_WORK_AUDIO( decavcodec ); -DECLARE_WORK_AUDIO( declpcm ); -DECLARE_WORK_AUDIO( encfaac ); -DECLARE_WORK_AUDIO( enclame ); -DECLARE_WORK_AUDIO( encvorbis ); - /*********************************************************************** * Muxers **********************************************************************/ |