libv4l: Upgrade to 1.14.2. Adding RDS and CEC components

Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
Ted Hess
2018-09-01 15:16:08 -04:00
parent b01d2c5a72
commit b2b44c9f3e
3 changed files with 50 additions and 40 deletions
@@ -1,3 +1,13 @@
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -46,6 +46,7 @@
#include <vector>
#include <map>
#include <algorithm>
+#include <string_iostream>
#include <fstream>
char options[OptLast];
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -29,6 +29,7 @@
@@ -18,11 +28,41 @@
#include <libv4l2.h>
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -14,6 +14,7 @@
@@ -17,6 +17,7 @@
#include <sys/mman.h>
#include <dirent.h>
#include <math.h>
+#include <time.h>
#include "v4l2-ctl.h"
#include "v4l-stream.h"
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -30,6 +30,7 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <stdarg.h>
+#include <time.h>
#include <cerrno>
#include <string>
#include <vector>
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -21,6 +21,7 @@
#define _CEC_COMPLIANCE_H_
#include <stdarg.h>
+#include <time.h>
#include <cerrno>
#include <string>
#include <linux/cec-funcs.h>
--- a/utils/cec-follower/cec-follower.h
+++ b/utils/cec-follower/cec-follower.h
@@ -37,6 +37,7 @@
#define _CEC_FOLLOWER_H_
#include <stdarg.h>
+#include <time.h>
#include <cerrno>
#include <string>
#include <linux/cec-funcs.h>
@@ -1,28 +0,0 @@
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
static bool parse_next_subopt(char **subs, char **value)
{
- static char *const subopts[] = {
- NULL
- };
- int opt = getsubopt(subs, subopts, value);
+ char *stmp = *subs;
+ *value = NULL;
- if (opt < 0 || *value)
+ if (*subs) {
+ *subs = strchr(stmp, ',');
+ if (*subs)
+ *(*subs)++ = 0;
+ else *subs = stmp + strlen(stmp);
+
+ *value = stmp;
return false;
- fprintf(stderr, "No value given to suboption <%s>\n",
- subopts[opt]);
+ }
return true;
}