Add MediaDevice class to manage media pipelines
None of the devices are stable on the rockpi... So, in order to set
exposure and stream video and configure the pipeline, we need to
interact with the media API to discover and configure everything via
more stable names.
It was easiest to build up an in-memory representation of the
hierarchy and manipulate that than try to build up the various
operations we needed.
These operations are enough to configure the rockpi isp to stream images
and find the camera to open.
Change-Id: Ie7062fb04a21cda3619ee384db9d6c7f16009fed
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/vision/BUILD b/frc971/vision/BUILD
index 097c977..159c779 100644
--- a/frc971/vision/BUILD
+++ b/frc971/vision/BUILD
@@ -187,3 +187,18 @@
"@org_tuxfamily_eigen//:eigen",
],
)
+
+cc_library(
+ name = "media_device",
+ srcs = [
+ "media_device.cc",
+ ],
+ hdrs = ["media_device.h"],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//aos/scoped:scoped_fd",
+ "//aos/util:file",
+ "@com_github_google_glog//:glog",
+ "@com_google_absl//absl/strings",
+ ],
+)