History

lavfi/dnn_backend_openvino: Return Specific Error Codes

Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. For OpenVINO API errors, currently DNN_GENERIC_ERROR is returned.

Shubhanshu Saxena committed 4 years ago

Commit 91af38f1 parent d0587da3 files · +89 −63Browse files

Showing the changes to libavfilter/dnn_interface.h (1 of 3 files). Show all

Unified · Split

libavfilter/dnn_interface.h+5−5
@@ -94,9 +94,9 @@ typedef struct DNNModel{ · 93 unmodified lines
9494 DNNFunctionType func_type;
9595 // Gets model input information
9696 // Just reuse struct DNNData here, actually the DNNData.data field is not needed.
97− DNNReturnType (*get_input)(void *model, DNNData *input, const char *input_name);
97+ int (*get_input)(void *model, DNNData *input, const char *input_name);
9898 // Gets model output width/height with given input w/h
99− DNNReturnType (*get_output)(void *model, const char *input_name, int input_width, int input_height,
99+ int (*get_output)(void *model, const char *input_name, int input_width, int input_height,
100100 const char *output_name, int *output_width, int *output_height);
101101 // set the pre process to transfer data from AVFrame to DNNData
102102 // the default implementation within DNN is used if it is not provided by the filter
@@ -114,12 +114,12 @@ typedef struct DNNModel{ · 11 unmodified lines
114114 typedef struct DNNModule{
115115 // Loads model and parameters from given file. Returns NULL if it is not possible.
116116 DNNModel *(*load_model)(const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx);
117− // Executes model with specified input and output. Returns DNN_ERROR otherwise.
118− DNNReturnType (*execute_model)(const DNNModel *model, DNNExecBaseParams *exec_params);
117+ // Executes model with specified input and output. Returns the error code otherwise.
118+ int (*execute_model)(const DNNModel *model, DNNExecBaseParams *exec_params);
119119 // Retrieve inference result.
120120 DNNAsyncStatusType (*get_result)(const DNNModel *model, AVFrame **in, AVFrame **out);
121121 // Flush all the pending tasks.
122− DNNReturnType (*flush)(const DNNModel *model);
122+ int (*flush)(const DNNModel *model);
123123 // Frees memory allocated for model.
124124 void (*free_model)(DNNModel **model);
125125 } DNNModule;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t