Go to the documentation of this file.00001 #include "video.h"
00002
00003 #define NB_STAGES 10
00004 #define CAMIF_H_CAMERA_USED CAMIF_CAMERA_OVTRULY
00005
00006 unsigned char buffer[MAX_STREAM_WIDTH * MAX_STREAM_HEIGHT * 3];
00007 long int current_frame_id = 0;
00008
00009 extern "C" C_RESULT export_stage_open( void *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out)
00010 {
00011 return (SUCCESS);
00012 }
00013
00014 extern "C" C_RESULT export_stage_transform( void *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out)
00015 {
00016
00017
00018 vp_os_mutex_lock(&video_lock);
00019 memcpy(buffer, in->buffers[0], in->size);
00020 current_frame_id++;
00021 if(realtime_video)
00022 {
00023 rosDriver->publish_video();
00024 }
00025 vp_os_mutex_unlock(&video_lock);
00026
00027 return (SUCCESS);
00028 }
00029
00030 extern "C" C_RESULT export_stage_close( void *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out)
00031 {
00032 return (SUCCESS);
00033 }
00034
00035 const vp_api_stage_funcs_t vp_stages_export_funcs =
00036 {
00037 NULL,
00038 (vp_api_stage_open_t)export_stage_open,
00039 (vp_api_stage_transform_t)export_stage_transform,
00040 (vp_api_stage_close_t)export_stage_close
00041 };