Revision 59be6a47 src/dvbcat.cpp

View differences:

src/dvbcat.cpp
56 56
  bool durationSpecified = false;
57 57
  unsigned duration = 0;
58 58
  int priority = 10;
59
  bool convertToPS = false;
59 60

  
60 61
  while (true) {
61 62
    static struct option long_options[] = {
......
63 64
      {"priority", 1, 0, 'p'},
64 65
      {"output", 1, 0, 'o'},
65 66
      {"socket", 1, 0, 's'},
67
      {"ps", 0, 0, 'P'},
66 68
      {0, 0, 0, 0}
67 69
    };
68 70
 
69 71
    int option_index = 0;
70
    int c = getopt_long(argc, argv, "d:p:o:s:", long_options, &option_index);
72
    int c = getopt_long(argc, argv, "Pd:p:o:s:", long_options, &option_index);
71 73
    if (c == -1)
72 74
      break;
73 75
    switch (c) {
......
84 86
    case 's':
85 87
      socketFile = optarg;
86 88
      break;
89
    case 'P':
90
      convertToPS = true;
91
      break;
87 92
    default:
88 93
      usage(argv[0]);
89 94
      return 1;
......
118 123
  }
119 124

  
120 125
  // Tune the channel
121
  if (!client.tune(type, channel, priority)) {
126
  if (!client.tune(type, channel, convertToPS, priority)) {
122 127
    std::cerr << "Failed to tune channel. Response from server was:\n"
123 128
	      << client.getError() << "\n";
124 129
    return 1;
......
217 222
	    << "  -o, --output           Record to output file\n"
218 223
	    << "                         (default is standard output).\n"
219 224
	    << "  -s, --socket           Specify socket to connect to\n"
220
	    << "                         (default is " << DEFAULT_SOCKET_FILE << ")\n";
225
	    << "                         (default is " << DEFAULT_SOCKET_FILE << ")\n"
226
	    << "  -P, --ps               Convert stream to program stream\n";
221 227
}

Also available in: Unified diff