Main Page | Namespace List | Compound List | File List | Compound Members | File Members

pfspd_usr.cc

Go to the documentation of this file.
00001 /*--------------------------------------------------------------------
00002  *
00003  * (C) Copyright Koninklijke Philips Electronics NV 2006. 
00004  * All rights reserved. This software is licensed under the terms of
00005  * version 2.1 of the GNU Lesser General Public License as published 
00006  * by the Free Software Foundation. For licensing and warranty
00007  * information, see the file COPYING in the main directory.
00008  *
00009  *------------------------------------------------------------------*/
00010 
00011 #include "pfspd_usr.h"
00012 #include "parse_options.h"
00013 
00014 pfspdUsr::pfspdUsr
00015 (
00016   const Id&             n,
00017   Out<pfspd_args_t>&    arguments,
00018   char*                 filename
00019 )
00020 : //member initialisation
00021   Process(n),
00022   argumentsP(id("argumentsP"), arguments),
00023   cfg_filename(filename)
00024 {
00025 }
00026 
00027 void pfspdUsr::main()
00028 {
00029   pfspd_args_t arguments;
00030 
00031   option_t options[] =
00032   {
00033       { "-path",    "str",    "srcdir", &arguments.path,        "env. variable containing path of filename"},
00034       { "file",     "str",    NULL,     &arguments.filename,    "input filename"},
00035       { "-frames",  "int",    "1",      &arguments.num_frames,  "#frames to process"},
00036       { "-hsize",   "int",    "720",    &arguments.h_size,      "width of output stream"},
00037       { "-vsize",   "int",    "480",    &arguments.v_size,      "height of output stream"},
00038       { "{-P_NO_COLOR,-P_COLOR_422,-P_COLOR_420,-P_COLOR_444_PL,-P_COLOR_422_PL,-P_COLOR_420_PL,-P_COLOR_RGB,-P_STREAM,-P_UNKNOWN_COLOR}",
00039                  "enum",    "-P_COLOR_420_PL",  &arguments.color_format,       "color format (see cpfspd.h)"},
00040       { "-scan",    "int",    "0",      &arguments.scan,        "scan mode: 0 if interlace, 1 if progressive"},
00041       { NULL, NULL, NULL, NULL, NULL}
00042   };
00043 
00044   #ifdef VERBOSE
00045     printf("%s: parsing cfg-file %s\n",
00046       fullName(),
00047       cfg_filename
00048     );
00049   #endif
00050   char *myArgs[] = {"", "-ini", cfg_filename};
00051   if (parse_options((char*)fullName(), 3, myArgs, options))
00052   {
00053     exit(1);
00054   }
00055 
00056   #ifdef VERBOSE
00057     print_option_values(cfg_filename, options);
00058   #endif
00059 
00060   write(argumentsP, arguments);
00061 }

Generated on Wed Feb 15 14:52:43 2006 for pfspdfebe by doxygen 1.3.2