ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VP_SDK / VP_Stages / vp_stages_io_buffer.h
1 /**
2  *  \brief    VP Stages. Buffer stage declaration
3  *  \author   Sylvain Gaeremynck <sylvain.gaeremynck@parrot.fr>
4  *  \author   Aurelien Morelle <aurelien.morelle@parrot.fr>
5  *  \author   Thomas Landais <thomas.landais@parrot.fr>
6  *  \version  2.0
7  *  \date     first release 16/03/2007
8  *  \date     modification  19/03/2007
9  */
10
11 #ifndef _VP_STAGES_IO_BUFFER_H_
12 #define _VP_STAGES_IO_BUFFER_H_
13
14 /** 
15  * @defgroup VP_SDK
16  * @{ */
17
18 /** 
19  * @defgroup VP_Stages
20  * @{ */
21
22 /** 
23  * @defgroup vp_stages_io_buffer input/output buffers stage
24  * @{ */
25
26
27 ///////////////////////////////////////////////
28 // INCLUDE
29
30 #include <VP_Api/vp_api.h>
31
32
33 ///////////////////////////////////////////////
34 // TYPEDEFS
35
36 /**
37  * \typedef enumerate all the camera resolution supported in camif
38  */
39
40 typedef struct _vp_stages_input_buffer_config_
41 {
42   int8_t  *buffer;
43   uint32_t total_size;
44   uint32_t send_size;
45
46   // private
47   uint32_t remaining_size;
48 } vp_stages_input_buffer_config_t;
49
50 typedef struct _vp_stages_output_buffer_config_ vp_stages_output_buffer_config_t;
51
52
53
54 ///////////////////////////////////////////////
55 // FUNCTIONS
56
57
58 /**
59  * @fn      Open the input buffer stage
60  * @param   vp_stages_input_buffer_config_t *cfg : configuration of buffer parameters
61  * @todo    modify the return
62  * @return  VP_SUCCESS
63  */
64 C_RESULT
65 vp_stages_input_buffer_stage_open(vp_stages_input_buffer_config_t *cfg);
66
67 /**
68  * @fn      Transform the buffer input stage
69  * @brief   Select the right indexbuffer of cfg and increment the size and the data pointer to the output
70  * @param   vp_stages_input_buffer_config_t *cfg : data cfg buffer is send to out buffer
71  * @param   vp_api_io_data_t *in : not used here
72  * @param   vp_api_io_data_t *out : used to send the data
73  * @return  VP_SUCCESS or VP_FAILURE
74  */
75 C_RESULT
76 vp_stages_input_buffer_stage_transform(vp_stages_input_buffer_config_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out);
77
78 /**
79  * @fn      Close the input buffer stage
80  * @brief   Nothing to do
81  * @param   vp_stages_input_buffer_config_t *cfg
82  * @return  VP_SUCCESS
83  */
84 C_RESULT
85 vp_stages_input_buffer_stage_close(vp_stages_input_buffer_config_t *cfg);
86
87 /**
88  * @fn      Open the output buffer stage
89  * @brief   Nothing to do
90  * @param   vp_stages_input_buffer_config_t *cfg
91  * @return  VP_SUCCESS
92  */
93 C_RESULT
94 vp_stages_output_buffer_stage_open(vp_stages_output_buffer_config_t *cfg);
95
96 /**
97  * @fn      Transform the output buffer stage
98  * @param   vp_stages_input_buffer_config_t *cfg
99  * @param   vp_api_io_data_t *in
100  * @param   vp_api_io_data_t *out
101  * @todo    A COMMENTER
102  * @return  VP_SUCCESS or VP_FAILURE
103  */
104 C_RESULT
105 vp_stages_output_buffer_stage_transform(vp_stages_output_buffer_config_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out);
106
107 /**
108  * @fn      Close the output buffer stage
109  * @brief   Nothing to do
110  * @param   vp_stages_input_buffer_config_t *cfg
111  * @return  VP_SUCCESS
112  */
113 C_RESULT
114 vp_stages_output_buffer_stage_close(vp_stages_output_buffer_config_t *cfg);
115
116 // vp_stages_io_buffer
117 /** @} */
118 // VP_Stages
119 /** @} */
120 // VP_SDK
121 /** @} */
122
123 #endif // ! _VP_STAGES_IO_BUFFER_H_