Revision 4aaa8891 streamer.c

View differences:

streamer.c
39 39
static const char *output_config;
40 40
static bool loop_input = false;
41 41
unsigned char msgTypes[] = {MSG_TYPE_TOPOLOGY,MSG_TYPE_CHUNK,MSG_TYPE_SIGNALLING};
42
bool log_on = false;
42 43

  
43 44
static void print_usage()
44 45
{
......
69 70
    "\t[-m chunks]: set the number of copies the source injects in the overlay.\n"
70 71
    "\t[-f filename]: name of the video stream file to transmit.\n"
71 72
    "\t[-F config]: configure the output module\n"
72
    "\t[-l]: loop the video stream.\n"
73
    "\t[--chunk_log]: print log on stderr\n"    
74
    "\t[-l]: loop the video getopt_long instead of getoptstream.\n"
73 75
    "\n"
74 76
    "NOTE: the peer will dump the received video on STDOUT in raw format\n"
75 77
    "      it can be played by your favourite player simply using a pipe\n"
......
95 97
{
96 98
  int o;
97 99

  
98
  while ((o = getopt(argc, argv, "b:o:c:t:p:i:P:I:f:F:m:lC:N:")) != -1) {
100
  int option_index = 0;
101
  static struct option long_options[] = {
102
         {"chunk_log", 0, 0, 0},
103
  };
104

  
105
    while ((o = getopt_long (argc, argv, "b:o:c:t:p:i:P:I:f:F:m:lC:N:",long_options, &option_index)) != -1) { //use this function to manage long option
106
 // while ((o = getopt(argc, argv, "b:o:c:t:p:i:P:I:f:F:m:lC:N:")) != -1) {
99 107
    switch(o) {
108
      case 0: //for long options
109
        log_on = true;
110
        break;
100 111
      case 'b':
101 112
        buff_size = atoi(optarg);
102 113
        break;

Also available in: Unified diff