feat: add backward-compatible open() overload for local cameras

Add overload to maintain backward compatibility with existing code
that uses local USB cameras or SVO files.

New API:
  // For network stream cameras
  open(const std::string& ip, int port, Trigger* ref, int sdk_gpu_id)

  // For local cameras (USB, SVO, etc.) - backward compatible
  open(sl::InputType input, Trigger* ref, int sdk_gpu_id)

This allows the same ClientPublisher class to work with both:
- Remote cameras via streaming (new use case)
- Local cameras via USB/SVO (original use case)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
2026-02-04 03:27:22 +00:00
parent 435ea09451
commit 0a08411709
2 changed files with 52 additions and 1 deletions
+5 -1
View File
@@ -54,8 +54,12 @@ public:
ClientPublisher();
~ClientPublisher();
// Open camera from stream (IP:port) instead of local input
// Open camera from stream (IP:port) - for network camera streaming
bool open(const std::string& ip, int port, Trigger* ref, int sdk_gpu_id);
// Open local camera (USB/serial/SVO) - backward compatible overload
bool open(sl::InputType input, Trigger* ref, int sdk_gpu_id);
void start();
void stop();
void setStartSVOPosition(unsigned pos);