Skip to content

Commit

Permalink
Remove CameraServer.SetSize()
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Sep 17, 2023
1 parent 19a8850 commit d3fc1fd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
19 changes: 0 additions & 19 deletions cameraserver/src/main/native/cpp/cameraserver/CameraServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
11 changes: 0 additions & 11 deletions cameraserver/src/main/native/include/cameraserver/CameraServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit d3fc1fd

Please sign in to comment.