diff options
author | maxd <[email protected]> | 2013-11-05 13:46:42 +0000 |
---|---|---|
committer | maxd <[email protected]> | 2013-11-05 13:46:42 +0000 |
commit | e7fa5d24cdd7275611ed738e3dfc909fe30ad317 (patch) | |
tree | f0478754e3d930d44782e313c3fa21cb465f6b22 /libhb/common.h | |
parent | a89397c1e3358b5f690b046481388ade19316fda (diff) |
RB626: return code support added
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5876 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.h')
-rw-r--r-- | libhb/common.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libhb/common.h b/libhb/common.h index 9244c981c..eed194cd7 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -101,6 +101,14 @@ typedef struct hb_filter_object_s hb_filter_object_t; typedef struct hb_buffer_s hb_buffer_t; typedef struct hb_fifo_s hb_fifo_t; typedef struct hb_lock_s hb_lock_t; +typedef enum +{ + HB_ERROR_NONE = 0, + HB_ERROR_CANCELED , + HB_ERROR_WRONG_INPUT, + HB_ERROR_INIT , + HB_ERROR_UNKNOWN +} hb_error_code; #include "ports.h" #ifdef __LIBHB__ @@ -553,6 +561,7 @@ struct hb_job_s /* Internal data */ hb_handle_t * h; hb_lock_t * pause; + volatile hb_error_code * done_error; volatile int * die; volatile int done; @@ -954,10 +963,7 @@ struct hb_state_s struct { /* HB_STATE_WORKDONE */ -#define HB_ERROR_NONE 0 -#define HB_ERROR_CANCELED 1 -#define HB_ERROR_UNKNOWN 2 - int error; + hb_error_code error; } workdone; struct @@ -1115,7 +1121,7 @@ int hb_use_dxva( hb_title_t * title ); #define OCLCHECK( method, ... )\ status = method( __VA_ARGS__ ); if( status != CL_SUCCESS ) {\ - printf( # method " error '%d'\n", status ); return status; } + hb_error("%s:%d (%s) error: %d\n", __FUNCTION__, __LINE__, #method, status); return status; } #define CL_FREE( buf )\ {\ |