delete rotate_target_dst;
}
-const char *MotionCVMain::plugin_title() { return _("MotionCV"); }
+const char *MotionCVMain::plugin_title() { return N_("MotionCV"); }
int MotionCVMain::is_realtime() { return 1; }
int MotionCVMain::is_multichannel() { return 1; }
// cause data to be stored directly in text
output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
- output.tag.set_title("MOTION");
+ output.tag.set_title("MOTIONCV");
output.tag.set_property("BLOCK_COUNT", config.block_count);
output.tag.set_property("GLOBAL_POSITIONS", config.global_positions);
output.tag.set_property("HORIZONTAL_ONLY", config.horizontal_only);
output.tag.set_property("VERTICAL_ONLY", config.vertical_only);
output.append_tag();
- output.tag.set_title("/MOTION");
+ output.tag.set_title("/MOTIONCV");
output.append_tag();
output.terminate_string();
}
int result = 0;
while( !(result = input.read_tag()) ) {
- if( input.tag.title_is("MOTION") ) {
+ if( input.tag.title_is("MOTIONCV") ) {
config.block_count = input.tag.get_property("BLOCK_COUNT", config.block_count);
config.global_positions = input.tag.get_property("GLOBAL_POSITIONS", config.global_positions);
config.rotate_positions = input.tag.get_property("ROTATE_POSITIONS", config.rotate_positions);
temp_frame = 0;
}
if( !temp_frame )
- temp_frame = new VFrame(w, h, color_model);
+ temp_frame = new VFrame(w, h, color_model, 0);
}
void MotionCVMain::process_global()
config.mode2 == MotionCVConfig::SAVE ) {
reset_cache_file();
char save_file[BCTEXTLEN];
- sprintf(save_file, "%s.sav", config.tracking_file);
+ snprintf(save_file, sizeof(save_file), "%s.sav", config.tracking_file);
#ifdef DEBUG
printf("MotionCVMain::process_buffer 2 rename tracking file: %s to %s\n",
config.tracking_file, save_file);
if( key == active_key ) return 1;
if( !active_fp ) {
close_cache_file();
- sprintf(cache_file, "%s.bak", config.tracking_file);
+ snprintf(cache_file, sizeof(cache_file), "%s.bak", config.tracking_file);
::rename(config.tracking_file, cache_file);
if( !(active_fp = fopen(config.tracking_file, "w")) ) {
perror(config.tracking_file);