Re: [yavta PATCH 6/9] Timestamp source for output buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.ailus@xxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux