forked from realsenseai/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetadata-helper.h
More file actions
34 lines (27 loc) · 1.19 KB
/
metadata-helper.h
File metadata and controls
34 lines (27 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
#pragma once
#include <string>
namespace rs2
{
// Helper class that is responsible for enabling per-frame metadata on different platforms
// Currently implemented for Windows
class metadata_helper
{
public:
static metadata_helper& instance();
// Check if metadata is enabled using Physical Port ID
// (can be retrieved with device::get_info(RS2_CAMERA_INFO_PHYSICAL_PORT))
// throws runtime_error in case of errors
virtual bool is_enabled(std::string id) const { return true; }
// Enable metadata for all connected devices
// throws runtime_error in case of errors
virtual void enable_metadata() { }
static bool can_support_metadata(const std::string& product)
{
return product == "D400" || product == "SR300" || product == "L500";
}
// This is the command-line parameter that gets passed to another process (running as admin) in order to enable metadata -- see WinMain
static std::string get_command_line_param() { return "--enable_metadata"; }
};
}