9da9e208a5e42a1ae736bde2a99fe8589cbfb910
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / Soft / Lib / ardrone_tool / Video / video_stage_recorder.h
1 #ifndef _VIDEO_STAGE_RECORDER_H_
2 #define _VIDEO_STAGE_RECORDER_H_
3
4 #include <stdio.h>
5 #include <VP_Api/vp_api.h>
6
7 #define VIDEO_FILENAME_LENGTH 1024
8
9 #ifndef _VIDEO_RECORD_STATE_ENUM_
10 #define _VIDEO_RECORD_STATE_ENUM_
11 typedef enum
12 {
13         VIDEO_RECORD_HOLD, // Video recording is on hold, waiting for the start command. This is the default state.
14         VIDEO_RECORD_START, // Video recording has started.
15         VIDEO_PICTURE_START,
16         VIDEO_PICTURE_HOLD,
17         VIDEO_RECORD_STOP               // Video recording has been stopped. Stage will end and restart.
18 } video_record_state;
19 #endif
20
21 typedef struct _video_stage_recorder_config_t
22 {
23         char video_filename[VIDEO_FILENAME_LENGTH];
24   FILE* fp;
25         video_record_state startRec;
26 } video_stage_recorder_config_t;
27
28 C_RESULT video_stage_recorder_handle (video_stage_recorder_config_t * cfg, PIPELINE_MSG msg_id, void *callback, void *param);
29 C_RESULT video_stage_recorder_open(video_stage_recorder_config_t *cfg);
30 C_RESULT video_stage_recorder_transform(video_stage_recorder_config_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out);
31 C_RESULT video_stage_recorder_close(video_stage_recorder_config_t *cfg);
32
33 extern const vp_api_stage_funcs_t video_recorder_funcs;
34
35 #endif // _VIDEO_STAGE_RECORDER_H_