00001 // This is brl/vvid/vvid_command_line_player.h 00002 #ifndef vvid_command_line_player_h_ 00003 #define vvid_command_line_player_h_ 00004 //----------------------------------------------------------------------------- 00005 //: 00006 // \file 00007 // \author D.E.Crispell 00008 // \brief Processes video files from the command line (no graphical output) 00009 // 00010 // \verbatim 00011 // Modifications: 00012 // D.E.Crispell Sept 9, 2003 created 00013 // \endverbatim 00014 //---------------------------------------------------------------------------- 00015 #include <vcl_vector.h> 00016 #include <vcl_string.h> 00017 #include <vpro/vpro_video_process_sptr.h> 00018 #include <vul/vul_arg.h> 00019 #include <vidl_vil1/vidl_vil1_movie_sptr.h> 00020 00021 //: A class for processing videos. 00022 class vvid_command_line_player 00023 { 00024 public: 00025 vvid_command_line_player(); 00026 ~vvid_command_line_player(); 00027 00028 //: load a video 00029 bool load_video_file();//vcl_string filename); 00030 00031 //: set video process 00032 bool set_video_process(vpro_video_process_sptr video_proc); 00033 00034 //: register an output file so that it can be identified in the XML output 00035 bool add_output_file(vul_arg<vcl_string> output_file); 00036 00037 //: set the status output filename 00038 //bool set_status_output_file(vcl_string filename); 00039 00040 //: play the video 00041 bool play_video(); 00042 00043 //: add required system_info args 00044 bool add_system_info_args(vul_arg_info_list& arg_list); 00045 00046 //: check if user only wants an xml parameter file output 00047 bool print_params_only(); 00048 00049 //: print and xml parameter file 00050 bool print_xml_params(vul_arg_info_list& arg_list, 00051 vcl_string param_block_name); 00052 00053 //: print performance output 00054 bool print_performance_output(vcl_string video_name, vcl_vector<float> frame_scores); 00055 00056 protected: 00057 void write_status(vcl_string filename, int iframe); 00058 00059 private: 00060 vidl_vil1_movie_sptr movie_; 00061 vpro_video_process_sptr video_process_; 00062 vcl_string status_output_filename_; 00063 int nframes_; 00064 00065 vul_arg_info_list arg_list_; 00066 vul_arg<vcl_string> *parameter_output_file_; 00067 vul_arg<vcl_string> *input_video_file_; 00068 vul_arg<vcl_string> *status_block_file_; 00069 vul_arg<vcl_string> *output_directory_; 00070 vul_arg<vcl_string> *performance_output_file_; 00071 vul_arg<bool> *print_params_flag_; 00072 vcl_vector<vul_arg<vcl_string> > output_files_; 00073 }; 00074 00075 #endif
1.7.5.1