#include "streamer_config.h"
+#ifdef CONFIG_OC_ULUT
+#include <ul_log.h>
+#include <ul_logreg.h>
+#endif
+
#ifdef CONFIG_STREAMER_WITH_FRSH
#include <frsh.h>
#endif
fclose(f);
}
+static void
+usage(void)
+{
+ printf("usage: streamer [ options ]\n");
+ printf(" -w <number> send image width\n");
+ printf(" -h <number> send image height\n");
+ printf(" -r <number> refresh rate\n");
+ printf(" -r <path> video device [%s]\n", vdev);
+ printf(" -m <addr> destination IP address\n");
+ printf(" -i <string> input video device format [%s]\n", impform);
+ #ifdef CONFIG_OC_ULUT
+ printf(" -l <number>|<domain>=<number>,...\n");
+ #endif /*CONFIG_OC_ULUT*/
+}
+
static int args_parse(int argc, char *argv[])
{
int v;
- while ((v = getopt(argc, argv, "w:h:r:d:m:i:")) >= 0) {
+ while ((v = getopt(argc, argv, "w:h:r:d:m:i:l:")) >= 0) {
switch (v) {
case 'w':
width = atoi(optarg);
else if(!strcmp(impform, "v4l2"))
impform = "video4linux2";
break;
- default: /* ’?’ */
+ #ifdef CONFIG_OC_ULUT
+ case 'l':
+ ul_log_domain_arg2levels(optarg);
+ break;
+ #endif /*CONFIG_OC_ULUT*/
+
+ default: /* unknown option */
fprintf(stderr, "%s: illegal option %c\n", argv[0], v);
+ usage();
exit(-1);
}
}