From e9636601d9bd4c6cd5639efc419a0f36cc7b922a Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Mon, 19 Aug 2019 07:49:21 +0300
Subject: [PATCH] Add nested group option

---
 components/rgbd-sources/include/ftl/rgbd/group.hpp | 8 ++++++++
 components/rgbd-sources/src/group.cpp              | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/components/rgbd-sources/include/ftl/rgbd/group.hpp b/components/rgbd-sources/include/ftl/rgbd/group.hpp
index c1a7e4521..8f1dd61a6 100644
--- a/components/rgbd-sources/include/ftl/rgbd/group.hpp
+++ b/components/rgbd-sources/include/ftl/rgbd/group.hpp
@@ -54,6 +54,14 @@ class Group {
 	 */
 	void addSource(ftl::rgbd::Source *);
 
+	/**
+	 * Add another group to this one. All sources in the other group are made
+	 * available to this group in a synchronised way. There is additional
+	 * overhead in supporting this as additional data copies are required
+	 * internally for all the source frames.
+	 */
+	void addGroup(ftl::rgbd::Group *);
+
 	/**
 	 * Provide a function to be called once per frame with a valid frameset
 	 * at the specified latency. The function may not be called under certain
diff --git a/components/rgbd-sources/src/group.cpp b/components/rgbd-sources/src/group.cpp
index 81e667aa4..8bb15f78b 100644
--- a/components/rgbd-sources/src/group.cpp
+++ b/components/rgbd-sources/src/group.cpp
@@ -100,6 +100,10 @@ void Group::addSource(ftl::rgbd::Source *src) {
 	});
 }
 
+void Group::addGroup(Group *grp) {
+	
+}
+
 void Group::_retrieveJob(ftl::rgbd::Source *src) {
 	try {
 		src->retrieve();
-- 
GitLab