1 #ifndef _TDM_CAPTURE_STUBS_H
2 #define _TDM_CAPTURE_STUBS_H
4 static int OUTPUT_CREATE_CAPTURE_ERROR;
5 static int CAPTURE_SET_DONE_HANDLER_ERROR;
6 static int LAYER_CREATE_CAPTURE_ERROR;
7 static int CAPTURE_SET_INFO_ERROR;
8 static int CAPTURE_ATTACH_ERROR;
9 static int CAPTURE_COMMIT_ERROR;
11 static tdm_capture *output_create_capture(tdm_output *output, tdm_error *error)
16 if (OUTPUT_CREATE_CAPTURE_ERROR) {
17 *error = TDM_ERROR_OPERATION_FAILED;
21 *error = TDM_ERROR_NONE;
26 static void capture_destroy(tdm_capture *capture)
31 static tdm_error capture_set_done_handler(tdm_capture *capture,
32 tdm_capture_done_handler func, void *user_data)
38 if (CAPTURE_SET_DONE_HANDLER_ERROR) {
42 return TDM_ERROR_OPERATION_FAILED;
45 return TDM_ERROR_NONE;
48 static tdm_capture *layer_create_capture(tdm_layer *layer, tdm_error *error)
53 if (LAYER_CREATE_CAPTURE_ERROR) {
54 *error = TDM_ERROR_OPERATION_FAILED;
58 *error = TDM_ERROR_NONE;
62 static tdm_error capture_set_info(tdm_capture *capture, tdm_info_capture *info)
67 if (CAPTURE_SET_INFO_ERROR) {
68 return TDM_ERROR_OPERATION_FAILED;
71 return TDM_ERROR_NONE;
74 static tdm_error capture_commit(tdm_capture *capture)
78 if (CAPTURE_COMMIT_ERROR) {
79 return TDM_ERROR_OPERATION_FAILED;
82 return TDM_ERROR_NONE;
85 #endif /* _TDM_CAPTURE_STUBS_H */