From d3fc1fd5bb2c7734db15ec0453a5a343291b48d6 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Sat, 16 Sep 2023 23:29:36 -0400 Subject: [PATCH] Remove CameraServer.SetSize() --- .../native/cpp/cameraserver/CameraServer.cpp | 19 ------------------- .../include/cameraserver/CameraServer.h | 11 ----------- 2 files changed, 30 deletions(-) diff --git a/cameraserver/src/main/native/cpp/cameraserver/CameraServer.cpp b/cameraserver/src/main/native/cpp/cameraserver/CameraServer.cpp index c2a556ba9e6..d6014fa5a0d 100644 --- a/cameraserver/src/main/native/cpp/cameraserver/CameraServer.cpp +++ b/cameraserver/src/main/native/cpp/cameraserver/CameraServer.cpp @@ -717,22 +717,3 @@ void CameraServer::RemoveCamera(std::string_view name) { std::scoped_lock lock(inst.m_mutex); inst.m_sources.erase(name); } - -void CameraServer::SetSize(int size) { - auto& inst = ::GetInstance(); - std::scoped_lock lock(inst.m_mutex); - if (inst.m_primarySourceName.empty()) { - return; - } - auto it = inst.m_sources.find(inst.m_primarySourceName); - if (it == inst.m_sources.end()) { - return; - } - if (size == kSize160x120) { - it->second.SetResolution(160, 120); - } else if (size == kSize320x240) { - it->second.SetResolution(320, 240); - } else if (size == kSize640x480) { - it->second.SetResolution(640, 480); - } -} diff --git a/cameraserver/src/main/native/include/cameraserver/CameraServer.h b/cameraserver/src/main/native/include/cameraserver/CameraServer.h index f47d8aa0720..29e16d7e75c 100644 --- a/cameraserver/src/main/native/include/cameraserver/CameraServer.h +++ b/cameraserver/src/main/native/include/cameraserver/CameraServer.h @@ -267,17 +267,6 @@ class CameraServer { */ static void RemoveCamera(std::string_view name); - /** - * Sets the size of the image to use. Use the public kSize constants to set - * the correct mode, or set it directly on a camera and call the appropriate - * StartAutomaticCapture method. - * - * @deprecated Use SetResolution on the UsbCamera returned by - * StartAutomaticCapture() instead. - * @param size The size to use - */ - static void SetSize(int size); - private: CameraServer() = default; };