Skip to content

Commit bfff891

Browse files
authored
[cameraserver] Remove Axis camera functions (#7767)
1 parent 35aee1d commit bfff891

File tree

3 files changed

+0
-248
lines changed

3 files changed

+0
-248
lines changed

cameraserver/src/main/java/edu/wpi/first/cameraserver/CameraServer.java

-67
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
package edu.wpi.first.cameraserver;
66

7-
import edu.wpi.first.cscore.AxisCamera;
87
import edu.wpi.first.cscore.CameraServerJNI;
98
import edu.wpi.first.cscore.CvSink;
109
import edu.wpi.first.cscore.CvSource;
@@ -603,72 +602,6 @@ public static MjpegServer startAutomaticCapture(VideoSource camera) {
603602
return server;
604603
}
605604

606-
/**
607-
* Adds an Axis IP camera.
608-
*
609-
* <p>This overload calls {@link #addAxisCamera(String, String)} with name "Axis Camera".
610-
*
611-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
612-
* @return The Axis camera capturing images.
613-
* @deprecated Call startAutomaticCapture with a HttpCamera instead.
614-
*/
615-
@Deprecated(forRemoval = true, since = "2025")
616-
@SuppressWarnings("removal")
617-
public static AxisCamera addAxisCamera(String host) {
618-
return addAxisCamera("Axis Camera", host);
619-
}
620-
621-
/**
622-
* Adds an Axis IP camera.
623-
*
624-
* <p>This overload calls {@link #addAxisCamera(String, String[])} with name "Axis Camera".
625-
*
626-
* @param hosts Array of Camera host IPs/DNS names
627-
* @return The Axis camera capturing images.
628-
* @deprecated Call startAutomaticCapture with a HttpCamera instead.
629-
*/
630-
@Deprecated(forRemoval = true, since = "2025")
631-
@SuppressWarnings("removal")
632-
public static AxisCamera addAxisCamera(String[] hosts) {
633-
return addAxisCamera("Axis Camera", hosts);
634-
}
635-
636-
/**
637-
* Adds an Axis IP camera.
638-
*
639-
* @param name The name to give the camera
640-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
641-
* @return The Axis camera capturing images.
642-
* @deprecated Call startAutomaticCapture with a HttpCamera instead.
643-
*/
644-
@Deprecated(forRemoval = true, since = "2025")
645-
@SuppressWarnings("removal")
646-
public static AxisCamera addAxisCamera(String name, String host) {
647-
AxisCamera camera = new AxisCamera(name, host);
648-
// Create a passthrough MJPEG server for USB access
649-
startAutomaticCapture(camera);
650-
CameraServerSharedStore.getCameraServerShared().reportAxisCamera(camera.getHandle());
651-
return camera;
652-
}
653-
654-
/**
655-
* Adds an Axis IP camera.
656-
*
657-
* @param name The name to give the camera
658-
* @param hosts Array of Camera host IPs/DNS names
659-
* @return The Axis camera capturing images.
660-
* @deprecated Call startAutomaticCapture with a HttpCamera instead.
661-
*/
662-
@Deprecated(forRemoval = true, since = "2025")
663-
@SuppressWarnings("removal")
664-
public static AxisCamera addAxisCamera(String name, String[] hosts) {
665-
AxisCamera camera = new AxisCamera(name, hosts);
666-
// Create a passthrough MJPEG server for USB access
667-
startAutomaticCapture(camera);
668-
CameraServerSharedStore.getCameraServerShared().reportAxisCamera(camera.getHandle());
669-
return camera;
670-
}
671-
672605
/**
673606
* Adds a virtual camera for switching between two streams. Unlike the other addCamera methods,
674607
* this returns a VideoSink rather than a VideoSource. Calling setSource() on the returned object

cameraserver/src/main/native/cpp/cameraserver/CameraServer.cpp

-57
Original file line numberDiff line numberDiff line change
@@ -507,63 +507,6 @@ cs::UsbCamera CameraServer::StartAutomaticCapture(std::string_view name,
507507
return camera;
508508
}
509509

510-
WPI_IGNORE_DEPRECATED
511-
cs::AxisCamera CameraServer::AddAxisCamera(std::string_view host) {
512-
return AddAxisCamera("Axis Camera", host);
513-
}
514-
515-
cs::AxisCamera CameraServer::AddAxisCamera(const char* host) {
516-
return AddAxisCamera("Axis Camera", host);
517-
}
518-
519-
cs::AxisCamera CameraServer::AddAxisCamera(const std::string& host) {
520-
return AddAxisCamera("Axis Camera", host);
521-
}
522-
523-
cs::AxisCamera CameraServer::AddAxisCamera(std::span<const std::string> hosts) {
524-
return AddAxisCamera("Axis Camera", hosts);
525-
}
526-
527-
cs::AxisCamera CameraServer::AddAxisCamera(std::string_view name,
528-
std::string_view host) {
529-
::GetInstance();
530-
cs::AxisCamera camera{name, host};
531-
StartAutomaticCapture(camera);
532-
auto csShared = GetCameraServerShared();
533-
csShared->ReportAxisCamera(camera.GetHandle());
534-
return camera;
535-
}
536-
537-
cs::AxisCamera CameraServer::AddAxisCamera(std::string_view name,
538-
const char* host) {
539-
::GetInstance();
540-
cs::AxisCamera camera{name, host};
541-
StartAutomaticCapture(camera);
542-
auto csShared = GetCameraServerShared();
543-
csShared->ReportAxisCamera(camera.GetHandle());
544-
return camera;
545-
}
546-
547-
cs::AxisCamera CameraServer::AddAxisCamera(std::string_view name,
548-
const std::string& host) {
549-
::GetInstance();
550-
cs::AxisCamera camera{name, host};
551-
StartAutomaticCapture(camera);
552-
auto csShared = GetCameraServerShared();
553-
csShared->ReportAxisCamera(camera.GetHandle());
554-
return camera;
555-
}
556-
557-
cs::AxisCamera CameraServer::AddAxisCamera(std::string_view name,
558-
std::span<const std::string> hosts) {
559-
::GetInstance();
560-
cs::AxisCamera camera{name, hosts};
561-
StartAutomaticCapture(camera);
562-
auto csShared = GetCameraServerShared();
563-
csShared->ReportAxisCamera(camera.GetHandle());
564-
return camera;
565-
}
566-
WPI_UNIGNORE_DEPRECATED
567510
cs::MjpegServer CameraServer::AddSwitchedCamera(std::string_view name) {
568511
auto& inst = ::GetInstance();
569512
// create a dummy CvSource

cameraserver/src/main/native/include/cameraserver/CameraServer.h

-124
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include <string_view>
1212
#include <vector>
1313

14-
#include <wpi/deprecated.h>
15-
1614
#include "cscore_cv.h"
1715

1816
namespace frc {
@@ -75,128 +73,6 @@ class CameraServer {
7573
*/
7674
static cs::MjpegServer StartAutomaticCapture(const cs::VideoSource& camera);
7775

78-
WPI_IGNORE_DEPRECATED
79-
/**
80-
* Adds an Axis IP camera.
81-
*
82-
* This overload calls AddAxisCamera() with name "Axis Camera".
83-
*
84-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
85-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
86-
*/
87-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
88-
static cs::AxisCamera AddAxisCamera(std::string_view host);
89-
90-
/**
91-
* Adds an Axis IP camera.
92-
*
93-
* This overload calls AddAxisCamera() with name "Axis Camera".
94-
*
95-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
96-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
97-
*/
98-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
99-
static cs::AxisCamera AddAxisCamera(const char* host);
100-
101-
/**
102-
* Adds an Axis IP camera.
103-
*
104-
* This overload calls AddAxisCamera() with name "Axis Camera".
105-
*
106-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
107-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
108-
*/
109-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
110-
static cs::AxisCamera AddAxisCamera(const std::string& host);
111-
112-
/**
113-
* Adds an Axis IP camera.
114-
*
115-
* This overload calls AddAxisCamera() with name "Axis Camera".
116-
*
117-
* @param hosts Array of Camera host IPs/DNS names
118-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
119-
*/
120-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
121-
static cs::AxisCamera AddAxisCamera(std::span<const std::string> hosts);
122-
123-
/**
124-
* Adds an Axis IP camera.
125-
*
126-
* This overload calls AddAxisCamera() with name "Axis Camera".
127-
*
128-
* @param hosts Array of Camera host IPs/DNS names
129-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
130-
*/
131-
template <typename T>
132-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
133-
static cs::AxisCamera AddAxisCamera(std::initializer_list<T> hosts) {
134-
return AddAxisCamera("Axis Camera", hosts);
135-
}
136-
137-
/**
138-
* Adds an Axis IP camera.
139-
*
140-
* @param name The name to give the camera
141-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
142-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
143-
*/
144-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
145-
static cs::AxisCamera AddAxisCamera(std::string_view name,
146-
std::string_view host);
147-
148-
/**
149-
* Adds an Axis IP camera.
150-
*
151-
* @param name The name to give the camera
152-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
153-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
154-
*/
155-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
156-
static cs::AxisCamera AddAxisCamera(std::string_view name, const char* host);
157-
158-
/**
159-
* Adds an Axis IP camera.
160-
*
161-
* @param name The name to give the camera
162-
* @param host Camera host IP or DNS name (e.g. "10.x.y.11")
163-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
164-
*/
165-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
166-
static cs::AxisCamera AddAxisCamera(std::string_view name,
167-
const std::string& host);
168-
169-
/**
170-
* Adds an Axis IP camera.
171-
*
172-
* @param name The name to give the camera
173-
* @param hosts Array of Camera host IPs/DNS names
174-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
175-
*/
176-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
177-
static cs::AxisCamera AddAxisCamera(std::string_view name,
178-
std::span<const std::string> hosts);
179-
180-
/**
181-
* Adds an Axis IP camera.
182-
*
183-
* @param name The name to give the camera
184-
* @param hosts Array of Camera host IPs/DNS names
185-
* @deprecated Call StartAutomaticCapture with a HttpCamera instead.
186-
*/
187-
template <typename T>
188-
[[deprecated("Call StartAutomaticCapture with a HttpCamera instead.")]]
189-
static cs::AxisCamera AddAxisCamera(std::string_view name,
190-
std::initializer_list<T> hosts) {
191-
std::vector<std::string> vec;
192-
vec.reserve(hosts.size());
193-
for (const auto& host : hosts) {
194-
vec.emplace_back(host);
195-
}
196-
return AddAxisCamera(name, vec);
197-
}
198-
WPI_UNIGNORE_DEPRECATED
199-
20076
/**
20177
* Adds a virtual camera for switching between two streams. Unlike the
20278
* other addCamera methods, this returns a VideoSink rather than a

0 commit comments

Comments
 (0)