Skip to content
Snippets Groups Projects
Commit 7284c79c authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add capabilities channel and enum

parent 50b9b39b
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28055 failed
......@@ -54,6 +54,7 @@ enum struct Channel : int {
Control = 69, // For stream and encoder control
Settings3 = 70,
Name = 71,
Capabilities = 72, // Unordered set of int capabilities
Data = 2048, // Custom data, any codec.
Faces = 2049, // Data about detected faces
......
#ifndef _FTL_RGBD_CAPABILITIES_HPP_
#define _FTL_RGBD_CAPABILITIES_HPP_
#include <ftl/utility/msgpack.hpp>
namespace ftl {
namespace rgbd {
/**
* To be added to the capabilities channel to indicate what the source device
* is capable of.
*/
enum class Capabilities : int {
DEPTH = 0, // Has depth data
MOVABLE, // Is a pose controllable camera
STEREO, // Has right colour
ACTIVE, // An active depth sensor
VIDEO, // Is video and not just static
FEEDBACK // Can respond to feedback data (not just movable)
};
}
}
MSGPACK_ADD_ENUM(ftl::rgbd::Capabilities);
#endif
\ No newline at end of file
......@@ -399,6 +399,9 @@ uint32_t Feed::add(const std::string &path) {
lk.unlock();
if (uri.getBaseURI() == "device:render") {
// TODO: Use a ManualSourceBuilder and tick in draw thread. Also
// need to keep all such pointers to render sources to gain access
// to the texture objects for use by Camera.
source = ftl::create<ftl::render::Source>(this, srcname, this);
} else {
source = ftl::create<ftl::rgbd::Source>(this, srcname, net_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment