ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VP_SDK / VP_Stages / vp_stages_frame_pipe.h
1 #ifndef _VP_STAGES_FRAME_PIPE_H_
2 #define _VP_STAGES_FRAME_PIPE_H_
3
4
5 #include <VP_Api/vp_api.h>
6 #include <VP_Api/vp_api_picture.h>
7
8 ///////////////////////////////////////////////
9 // TYPEDEFS
10
11
12 typedef enum _BUFFER_PIPE_STATE
13 {
14   WAIT_RECEPTION,
15   PAUSE
16 } BUFFER_PIPE_STATE;
17
18
19 /**
20  * \typedef pipe parameters definition
21  */
22 typedef struct _vp_stages_frame_pipe_config_
23 {
24   // public
25   vp_api_picture_t* inPicture;
26   vp_api_picture_t  outPicture;
27
28   // private
29   BUFFER_PIPE_STATE pipe_state;
30   vp_os_mutex_t pipe_mut;
31   vp_os_cond_t buffer_sent;
32   uint32_t frame_size;
33
34   void (*callback)(void);
35 }
36 vp_stages_frame_pipe_config_t;
37
38
39 ///////////////////////////////////////////////
40 // FUNCTIONS
41
42 // Sender function
43 C_RESULT
44 vp_stages_frame_pipe_sender_open(vp_stages_frame_pipe_config_t *cfg);
45
46 C_RESULT
47 vp_stages_frame_pipe_sender_transform(vp_stages_frame_pipe_config_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out);
48
49 C_RESULT
50 vp_stages_frame_pipe_sender_close(vp_stages_frame_pipe_config_t *cfg);
51
52 // Receiver function
53 C_RESULT
54 vp_stages_frame_pipe_receiver_open(vp_stages_frame_pipe_config_t *cfg);
55
56 C_RESULT
57 vp_stages_frame_pipe_receiver_transform(vp_stages_frame_pipe_config_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out);
58
59 C_RESULT
60 vp_stages_frame_pipe_receiver_close(vp_stages_frame_pipe_config_t *cfg);
61 #endif
62
63