Hi Laurent,

Laurent Pinchart wrote:
...
@@ -1298,7 +1302,8 @@ static struct option opts[] = {
        {"sleep-forever", 0, 0, OPT_SLEEP_FOREVER},
        {"stride", 1, 0, OPT_STRIDE},
        {"time-per-frame", 1, 0, 't'},
-       {"userptr", 0, 0, 'u'},
+       {"timestamp-source", 1, 0, OPT_TSTAMP_SRC},
+       {"userptr", 1, 0, 'u'},

This seems to be an unrelated change.

Oops! My bad.

        {0, 0, 0, 0}
  };

@@ -1487,6 +1492,17 @@ int main(int argc, char *argv[])
                case OPT_STRIDE:
                        stride = atoi(optarg);
                        break;
+               case OPT_TSTAMP_SRC:
+                       if (!strcmp(optarg, "eof")) {
+                               dev.buffer_output_flags |= 
V4L2_BUF_FLAG_TSTAMP_SRC_EOF;

As the buffer_output_flags isn't used for anything else, would it make sense
to just name it timestamp_source ?

Currently not. But it could. I'm fine with the change if you insist. :-)

+                       } else if (!strcmp(optarg, "soe")) {
+                               dev.buffer_output_flags |= 
V4L2_BUF_FLAG_TSTAMP_SRC_SOE;
+                       } else {
+                               printf("Invalid timestamp source %s\n", optarg);
+                               return 1;
+                       }
+                       printf("Using %s timestamp source\n", optarg);

Do we really need this printf ?

Time to add a "verbose" option? :-D

I'll remove it.

--
Cheers,

Sakari Ailus
sakari.ai...@iki.fi
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to