ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VP_SDK / VP_Stages / vp_stages_o_sdl.h
1 /**
2  *  \brief    VP Stages. Output SDL 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_O_SDL_H_
12 #define _VP_STAGES_O_SDL_H_
13
14 /**
15  * @defgroup VP_SDK
16  * @{ */
17
18 /**
19  * @defgroup VP_Stages
20  * @{ */
21
22 /**
23  * @defgroup vp_stages_o_sdl output sdl stage
24  * @{ */
25
26 #if !defined(__NDS__)
27
28 ///////////////////////////////////////////////
29 // INCLUDES
30
31 #include <VP_Api/vp_api.h>
32
33 #include <SDL/SDL.h>
34
35 #if defined(_CK4215_) && defined(WIN32)
36 #include <SDL/SDL_syswm.h>
37 #endif
38
39 ///////////////////////////////////////////////
40 // TYEPDEFS
41
42 typedef struct _vp_stages_output_sdl_config_
43 {
44   uint32_t width;         // in
45   uint32_t height;        // in
46   uint32_t bpp;           // in
47
48 #if defined(_CK4215_) && defined(WIN32)
49   uint32_t window_pos_x;  // in
50   uint32_t window_pos_y;  // in
51 #endif
52
53   uint32_t window_width;  // in
54   uint32_t window_height; // in
55
56   uint32_t pic_width;     // in
57   uint32_t pic_height;    // in
58
59   uint32_t y_size;        // in
60   uint32_t c_size;        // in
61
62   // private
63
64   SDL_Surface *surface;
65   SDL_Overlay *overlay;
66
67   uint32_t received;
68
69 } vp_stages_output_sdl_config_t;
70
71
72 ///////////////////////////////////////////////
73 // FUNCTIONS
74
75
76 /**
77  * @fn      vp_stages_buffer_to_overlay
78  * @param   SDL_Overlay *overlay
79  * @param   output_sdl_config_t *cfg
80  * @param   vp_api_io_data_t *data
81  * @todo    A COMMENTER
82  * @return  VOID
83  */
84 /*
85 void
86 vp_stages_buffer_to_overlay(SDL_Overlay *overlay, vp_stages_output_sdl_config_t *cfg, vp_api_io_data_t *data);
87 */
88 /**
89  * @fn      vp_stages_display_frame
90  * @param   output_sdl_config_t *cfg
91  * @param   vp_api_io_data_t *dat
92  * @todo    A COMMENTER
93  * @return  0
94  */
95 /*
96 int
97 vp_stages_display_frame(vp_stages_output_sdl_config_t *cfg, vp_api_io_data_t *data);
98 */
99
100 #ifdef __cplusplus
101 extern "C"
102 {
103 #endif
104
105 #if defined(_CK4215_) && defined(WIN32)
106 void
107 vp_stages_init_display(void * handle);
108
109 void *
110 vp_stages_get_child_window( void );
111
112 #endif
113 /**
114  * @fn      Open the output sdl stage
115  * @param   vp_stages_output_sdl_config_t *cfg
116  * @todo    A COMMENTER
117  * @return  VP_SUCCESS or VP_FAILURE
118  */
119 C_RESULT
120 vp_stages_output_sdl_stage_open(vp_stages_output_sdl_config_t *cfg);
121
122 /**
123  * @fn      Open the output sdl stage
124  * @param   vp_stages_output_sdl_config_t *cfg
125  * @param   vp_api_io_data_t *in
126  * @param   vp_api_io_data_t *out
127  * @todo    A COMMENTER
128  * @return  VP_SUCCESS or VP_FAILURE
129  */
130 C_RESULT
131 vp_stages_output_sdl_stage_transform(vp_stages_output_sdl_config_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out);
132
133 /**
134  * @fn      Open the output sdl stage
135  * @param   vp_stages_output_sdl_config_t *cfg
136  * @todo    A COMMENTER
137  * @return  VP_SUCCESS or VP_FAILURE
138  */
139 C_RESULT
140 vp_stages_output_sdl_stage_close(vp_stages_output_sdl_config_t *cfg);
141
142
143 #endif // ! __NDS__
144
145 // vp_stages_o_sdl
146 /** @} */
147 // VP_Stages
148 /** @} */
149 // VP_SDK
150 /** @} */
151
152 #ifdef __cplusplus
153 }
154 #endif
155
156 #endif // _VP_STAGES_O_SDL_H_