3 * @brief VP Api. Pipeline definition
4 * @author Sylvain Gaeremynck <sylvain.gaeremynck@parrot.fr>
5 * @author Aurelien Morelle <aurelien.morelle@parrot.fr>
6 * @author Thomas Landais <thomas.landais@parrot.fr>
7 * @author Julien Floret <julien.floret.ext@parrot.com>
9 * @date first release 16/03/2007
10 * @date modification 24/05/2007
13 #ifndef _VP_API_INCLUDE_H_
14 #define _VP_API_INCLUDE_H_
16 //#include <VP_Os/vp_os_signal.h>
17 #include <VP_Os/vp_os_types.h>
18 #include <VP_Api/vp_api_config.h>
19 #include <VP_Api/vp_api_stage.h>
20 #include <VP_Api/vp_api_supervisor.h>
24 * @enum _VP_API_IO_TYPES_
25 * @brief Available io stages type
27 typedef enum _VP_API_IO_TYPES_
36 VP_API_FILTER_ENCODER,
37 VP_API_FILTER_DECODER,
38 VP_API_FFMPEG_ENCODER,
39 VP_API_FFMPEG_DECODER,
41 VP_API_VISION_PREPARE,
42 VP_API_FILTER_YUV2RGB,
48 VP_API_OUTPUT_CONSOLE,
60 * @enum _VP_API_IO_STATUS_
61 * @brief Stage's state definition
63 typedef enum _VP_API_IO_STATUS_
65 VP_API_STATUS_INIT = 0, // needs being equal to zero to ease initialization
66 VP_API_STATUS_PROCESSING,
67 VP_API_STATUS_STILL_RUNNING,
75 * @struct _vp_api_io_data_
76 * @brief This structure is used by stages to share data in a generic way
78 typedef struct _vp_api_io_data_
87 VP_API_IO_STATUS status;
95 * @struct _vp_api_io_stage_
96 * @brief Public definition of a stage
98 * This structure is used to configure stages
99 * The cfg field can be used to share data between stages in a specific way
101 typedef struct _vp_api_io_stage_
105 vp_api_stage_funcs_t funcs;
106 vp_api_io_data_t data;
112 * @struct _vp_api_io_pipeline_
113 * @brief Public definition of the pipeline
115 * This structure is used to configure the pipeline
117 typedef struct _vp_api_io_pipeline_
120 vp_api_io_stage_t *stages;
121 vp_api_handle_msg_t handle_msg;
122 uint32_t nb_still_running;
126 vp_api_io_pipeline_t;
134 * @fn C_RESULT vp_api_open(vp_api_io_pipeline_t *pipeline, PIPELINE_HANDLE *handle)
135 * @brief Creates internally all
136 * @param pipeline Pipeline definition
137 * @param handle Pipeline handle
138 * @return VP_SUCCESS or VP_FAILURE
141 vp_api_open(vp_api_io_pipeline_t *pipeline, PIPELINE_HANDLE *handle);
145 * @fn C_RESULT vp_api_run(vp_api_io_pipeline_t *pipeline, vp_api_io_data_t *out_data)
146 * @brief Runs pipeline
147 * @param pipeline Pipeline definition
148 * @param out_data Output data of the last pipeline stage
149 * @return VP_SUCCESS or VP_FAILURE
152 vp_api_run(vp_api_io_pipeline_t *pipeline, vp_api_io_data_t *out_data);
156 * @fn C_RESULT vp_api_flush(vp_api_io_pipeline_t *pipeline)
157 * @brief Flushes pipeline
158 * @param pipeline Pipeline definition
159 * @return VP_SUCCESS or VP_FAILURE
162 vp_api_flush(vp_api_io_pipeline_t *pipeline);
165 * @fn C_RESULT vp_api_close(vp_api_io_pipeline_t *pipeline)
167 * @param pipeline Pipeline definition
168 * @return VP_SUCCESS or VP_FAILURE
171 vp_api_close(vp_api_io_pipeline_t *pipeline, PIPELINE_HANDLE *handle);
177 #endif // ! _VP_API_INCLUDE_H_