+typedef struct hb_work_info_s
+{
+ const char *name;
+ int profile;
+ int level;
+ int bitrate;
+ int rate;
+ int rate_base;
+ int flags;
+ int version;
+ int mode;
+ union {
+ struct { // info only valid for video decoders
+ int width;
+ int height;
+ int pixel_aspect_width;
+ int pixel_aspect_height;
+ double aspect;
+ };
+ struct { // info only valid for audio decoders
+ int channel_layout;
+ };
+ };
+} hb_work_info_t;
+
+struct hb_work_object_s
+{
+ int id;
+ char * name;
+
+#ifdef __LIBHB__
+ 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 * );
+ /* the info entry point is used by scan to get bitstream information
+ * during a decode (i.e., it should only be called after at least one
+ * call to the 'work' entry point). currently it's only called for
+ * video streams & can be null for other work objects. */
+ int (* info) ( hb_work_object_t *, hb_work_info_t * );
+ /* the bitstream info entry point is used by scan to get bitstream
+ * information from a buffer. it doesn't have to be called during a
+ * decode (it can be called even if init & work haven't been).
+ * currently it's only called for audio streams & can be null for
+ * other work objects. */
+ int (* bsinfo) ( hb_work_object_t *, const hb_buffer_t *,
+ hb_work_info_t * );
+
+ hb_fifo_t * fifo_in;
+ hb_fifo_t * fifo_out;
+ hb_esconfig_t * config;
+
+ /* Pointer hb_audio_t so we have access to the info in the audio worker threads. */
+ hb_audio_t * audio;
+
+ /* Pointer hb_subtitle_t so we have access to the info in the subtitle worker threads. */
+ hb_subtitle_t * subtitle;
+
+ hb_work_private_t * private_data;
+
+ hb_thread_t * thread;
+ volatile int * done;
+ int status;
+ int codec_param;
+ hb_title_t * title;
+
+ hb_work_object_t * next;
+ int thread_sleep_interval;
+#endif
+};
+
+extern hb_work_object_t hb_sync_video;
+extern hb_work_object_t hb_sync_audio;
+extern hb_work_object_t hb_decmpeg2;
+extern hb_work_object_t hb_decvobsub;
+extern hb_work_object_t hb_encvobsub;
+extern hb_work_object_t hb_deccc608;
+extern hb_work_object_t hb_decsrtsub;
+extern hb_work_object_t hb_decutf8sub;
+extern hb_work_object_t hb_dectx3gsub;
+extern hb_work_object_t hb_decssasub;
+extern hb_work_object_t hb_render;
+extern hb_work_object_t hb_encavcodec;
+extern hb_work_object_t hb_encx264;
+extern hb_work_object_t hb_enctheora;
+extern hb_work_object_t hb_deca52;
+extern hb_work_object_t hb_decdca;
+extern hb_work_object_t hb_decavcodec;
+extern hb_work_object_t hb_decavcodecv;
+extern hb_work_object_t hb_decavcodecvi;
+extern hb_work_object_t hb_decavcodecai;
+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;
+extern hb_work_object_t hb_muxer;
+extern hb_work_object_t hb_encca_aac;
+
+#define FILTER_OK 0
+#define FILTER_DELAY 1
+#define FILTER_FAILED 2
+#define FILTER_DROP 3
+
+struct hb_filter_object_s
+{
+ int id;
+ char * name;
+ char * settings;
+
+#ifdef __LIBHB__
+ hb_filter_private_t* (* init) ( int, int, int, char * );
+
+ int (* work) ( const hb_buffer_t *, hb_buffer_t **,
+ int, int, int, hb_filter_private_t * );
+
+ void (* close) ( hb_filter_private_t * );
+
+ hb_filter_private_t * private_data;
+ //hb_buffer_t * buffer;
+#endif
+};
+
+#define HB_FILTER_DETELECINE 1
+#define HB_FILTER_DEINTERLACE 2
+#define HB_FILTER_DEBLOCK 3
+#define HB_FILTER_DENOISE 4
+#define HB_FILTER_DECOMB 5
+#define HB_FILTER_ROTATE 6
+
+extern hb_filter_object_t hb_filter_detelecine;
+extern hb_filter_object_t hb_filter_deinterlace;
+extern hb_filter_object_t hb_filter_deblock;
+extern hb_filter_object_t hb_filter_denoise;
+extern hb_filter_object_t hb_filter_decomb;
+extern hb_filter_object_t hb_filter_rotate;
+
+typedef void hb_error_handler_t( const char *errmsg );
+
+extern void hb_register_error_handler( hb_error_handler_t * handler );
+
+char * hb_strdup_printf( char * fmt, ... );
+
+int hb_yuv2rgb(int yuv);
+int hb_rgb2yuv(int rgb);
+