obsdk demo:stream_color

This commit is contained in:
tangchao0503
2026-03-30 17:23:04 +08:00
parent 65b0b307f6
commit fad9423121
10 changed files with 1249 additions and 22 deletions

View File

@ -0,0 +1,56 @@
// Copyright (c) Orbbec Inc. All Rights Reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "utils_types.h"
#include <sstream>
#include <libobsensor/ObSensor.hpp>
namespace ob_smpl {
char waitForKeyPressed(uint32_t timeout_ms = 0);
uint64_t getNowTimesMs();
int getInputOption();
template <typename T> std::string toString(const T a_value, const int n = 6) {
std::ostringstream out;
out.precision(n);
out << std::fixed << a_value;
return std::move(out).str();
}
/**
* @brief Check if the device is a LiDAR device.
*
* @param device The device to check.
* @return true if the device is a LiDAR device.
* @return false otherwise.
*/
bool isLiDARDevice(std::shared_ptr<ob::Device> device);
bool supportAnsiEscape();
/**
* @brief Check if the device is a Gemini305 device.
*
* @param vid The vendor ID of the device.
* @param pid The product ID of the device.
* @return true if the device is a Gemini305 device.
* @return false otherwise.
*/
bool isGemini305Device(int vid, int pid);
/**
* @brief Check if the device is a Astra Mini device.
*
* @param vid The vendor ID of the device.
* @param pid The product ID of the device.
* @return true if the device is a Astra Mini device.
* @return false otherwise.
*/
bool isAstraMiniDevice(int vid, int pid);
} // namespace ob_smpl