Cync
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VP_SDK / VP_Api / vp_api_stage.h
1 /**
2  *  @file     vp_api_stage.h
3  *  @brief    VP Api. Stages 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>
8  *  @version  2.0
9  *  @date     first release 16/03/2007
10  *  @date     modification  19/03/2007
11  */
12
13 #ifndef _VP_API_STAGE_H_
14 #define _VP_API_STAGE_H_
15
16 ///////////////////////////////////////////////
17 // INCLUDES
18
19 #include <VP_Os/vp_os_types.h>
20 #include <VP_Api/vp_api_config.h>
21 #include <VP_Api/vp_api_supervisor.h>
22
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27
28 struct _vp_api_io_data_;
29
30
31 ///////////////////////////////////////////////
32 // TYPEDEFS
33
34
35 /**
36  * @typedef C_RESULT (*vp_api_stage_handle_msg_t)(void *cfg, PIPELINE_MSG msg_id, void *callback, void *param)
37 Functions prototypes to open, close and update a stage
38  */
39 typedef C_RESULT
40 (*vp_api_stage_handle_msg_t)(void *cfg, PIPELINE_MSG msg_id, void *callback, void *param);
41
42 typedef C_RESULT
43 (*vp_api_stage_open_t)(void *cfg);
44
45 typedef C_RESULT
46 (*vp_api_stage_transform_t)(void *cfg, struct _vp_api_io_data_ *in, struct _vp_api_io_data_ *out);
47
48 typedef C_RESULT
49 (*vp_api_stage_close_t)(void *cfg);
50
51
52 /**
53  * @struct  _vp_api_stage_funcs_
54  * @brief   A structure that contains all functions pointers to handle a stage
55  */
56 typedef struct _vp_api_stage_funcs_
57 {
58   vp_api_stage_handle_msg_t   handle_msg;
59   vp_api_stage_open_t         open;
60   vp_api_stage_transform_t    transform;
61   vp_api_stage_close_t        close;
62 } vp_api_stage_funcs_t;
63
64
65 /**
66  * @brief Definition of ready to use stages for vp products
67  */
68 extern const vp_api_stage_funcs_t vp_stages_input_file_funcs;
69 extern const vp_api_stage_funcs_t vp_stages_output_file_funcs;
70
71 extern const vp_api_stage_funcs_t vp_stages_input_buffer_funcs;
72 extern const vp_api_stage_funcs_t vp_stages_output_buffer_funcs;
73
74 extern const vp_api_stage_funcs_t vp_stages_frame_pipe_sender_funcs;
75 extern const vp_api_stage_funcs_t vp_stages_frame_pipe_receiver_funcs;
76
77 extern const vp_api_stage_funcs_t vp_stages_video_mixer_funcs;
78
79 extern const vp_api_stage_funcs_t vp_stages_buffer_to_picture_funcs;
80 extern const vp_api_stage_funcs_t vp_stages_picture_to_buffer_funcs;
81
82 extern const vp_api_stage_funcs_t vp_stages_decoder_filter_funcs;
83 extern const vp_api_stage_funcs_t vp_stages_decoder_ffmpeg_funcs;
84
85 extern const vp_api_stage_funcs_t vp_stages_input_com_funcs;
86 extern const vp_api_stage_funcs_t vp_stages_output_com_funcs;
87
88 extern const vp_api_stage_funcs_t vp_stages_output_console_funcs;
89
90 extern const vp_api_stage_funcs_t vp_stages_output_sdl_funcs;
91
92 extern const vp_api_stage_funcs_t vp_stages_output_lcd_funcs;
93
94 extern const vp_api_stage_funcs_t vp_stages_yuv2rgb_funcs;
95
96 #if defined(USE_JPEG) || defined(USE_JPEG_P6)
97 extern const vp_api_stage_funcs_t vp_stages_encoder_jpeg_funcs;
98 extern const vp_api_stage_funcs_t vp_stages_decoder_jpeg_funcs;
99 #endif // > USE_JPEG
100
101 #ifdef USE_PVSP
102 extern const vp_api_stage_funcs_t vp_stages_pvsp_funcs;
103 #endif // USE_PVSP
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109
110 #endif // ! _VP_API_STAGE_H_