mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Remove RemoveSourceProperty.
This commit is contained in:
@@ -163,10 +163,6 @@ CS_Property CS_CreateSourcePropertyCallback(
|
||||
void CS_SetSourceEnumPropertyChoices(CS_Source source, CS_Property property,
|
||||
const char** choices, int count,
|
||||
CS_Status* status);
|
||||
void CS_RemoveSourceProperty(CS_Source source, CS_Property property,
|
||||
CS_Status* status);
|
||||
void CS_RemoveSourcePropertyByName(CS_Source source, const char* name,
|
||||
CS_Status* status);
|
||||
|
||||
//
|
||||
// Sink Creation Functions
|
||||
|
||||
@@ -151,10 +151,6 @@ CS_Property CreateSourcePropertyCallback(
|
||||
void SetSourceEnumPropertyChoices(CS_Source source, CS_Property property,
|
||||
llvm::ArrayRef<std::string> choices,
|
||||
CS_Status* status);
|
||||
void RemoveSourceProperty(CS_Source source, CS_Property property,
|
||||
CS_Status* status);
|
||||
void RemoveSourceProperty(CS_Source source, llvm::StringRef name,
|
||||
CS_Status* status);
|
||||
|
||||
//
|
||||
// Sink Creation Functions
|
||||
|
||||
@@ -261,14 +261,6 @@ class CvSource : public VideoSource {
|
||||
/// @param choices Choices
|
||||
void SetEnumPropertyChoices(const VideoProperty& property,
|
||||
llvm::ArrayRef<std::string> choices);
|
||||
|
||||
/// Remove a property.
|
||||
/// @param property Property
|
||||
void RemoveProperty(const VideoProperty& property);
|
||||
|
||||
/// Remove a property.
|
||||
/// @param name Property name
|
||||
void RemoveProperty(llvm::StringRef name);
|
||||
};
|
||||
|
||||
/// A sink for video that accepts a sequence of frames.
|
||||
|
||||
@@ -231,16 +231,6 @@ inline void CvSource::SetEnumPropertyChoices(
|
||||
SetSourceEnumPropertyChoices(m_handle, property.m_handle, choices, &m_status);
|
||||
}
|
||||
|
||||
inline void CvSource::RemoveProperty(const VideoProperty& property) {
|
||||
m_status = 0;
|
||||
RemoveSourceProperty(m_handle, property.m_handle, &m_status);
|
||||
}
|
||||
|
||||
inline void CvSource::RemoveProperty(llvm::StringRef name) {
|
||||
m_status = 0;
|
||||
RemoveSourceProperty(m_handle, name, &m_status);
|
||||
}
|
||||
|
||||
inline VideoSink::VideoSink(const VideoSink& sink)
|
||||
: m_handle(sink.m_handle == 0 ? 0 : CopySink(sink.m_handle, &m_status)) {}
|
||||
|
||||
|
||||
@@ -615,32 +615,6 @@ JNIEXPORT void JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_setSourceEnumPr
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: removeSourceProperty
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_removeSourceProperty
|
||||
(JNIEnv *env, jclass, jint source, jint property)
|
||||
{
|
||||
CS_Status status = 0;
|
||||
cs::RemoveSourceProperty(source, property, &status);
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: removeSourcePropertyByName
|
||||
* Signature: (ILjava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_removeSourcePropertyByName
|
||||
(JNIEnv *env, jclass, jint source, jstring name)
|
||||
{
|
||||
CS_Status status = 0;
|
||||
cs::RemoveSourceProperty(source, JStringRef{env, name}, &status);
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: createMJPEGServer
|
||||
|
||||
@@ -125,8 +125,6 @@ public class CameraServerJNI {
|
||||
// int type, int minimum, int maximum, int step, int defaultValue, int value,
|
||||
// void (*onChange)(int property));
|
||||
public static native void setSourceEnumPropertyChoices(int source, int property, String[] choices);
|
||||
public static native void removeSourceProperty(int source, int property);
|
||||
public static native void removeSourcePropertyByName(int source, String name);
|
||||
|
||||
//
|
||||
// Sink Creation Functions
|
||||
|
||||
@@ -87,16 +87,4 @@ public class CvSource extends VideoSource {
|
||||
public void SetEnumPropertyChoices(VideoProperty property, String[] choices) {
|
||||
CameraServerJNI.setSourceEnumPropertyChoices(m_handle, property.m_handle, choices);
|
||||
}
|
||||
|
||||
/// Remove a property.
|
||||
/// @param name Property name
|
||||
public void removeProperty(VideoProperty property) {
|
||||
CameraServerJNI.removeSourceProperty(m_handle, property.m_handle);
|
||||
}
|
||||
|
||||
/// Remove a property.
|
||||
/// @param name Property name
|
||||
public void removeProperty(String name) {
|
||||
CameraServerJNI.removeSourcePropertyByName(m_handle, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,14 +144,6 @@ void CvSourceImpl::SetEnumPropertyChoices(CS_Property property,
|
||||
prop->enumChoices = choices;
|
||||
}
|
||||
|
||||
void CvSourceImpl::RemoveProperty(CS_Property property) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CvSourceImpl::RemoveProperty(llvm::StringRef name) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
namespace cs {
|
||||
|
||||
CS_Source CreateCvSource(llvm::StringRef name, const VideoMode& mode,
|
||||
@@ -237,26 +229,6 @@ void SetSourceEnumPropertyChoices(CS_Source source, CS_Property property,
|
||||
.SetEnumPropertyChoices(property, choices, status);
|
||||
}
|
||||
|
||||
void RemoveSourceProperty(CS_Source source, CS_Property property,
|
||||
CS_Status* status) {
|
||||
auto data = Sources::GetInstance().Get(source);
|
||||
if (!data || data->type != SourceData::kCv) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
return;
|
||||
}
|
||||
static_cast<CvSourceImpl&>(*data->source).RemoveProperty(property);
|
||||
}
|
||||
|
||||
void RemoveSourceProperty(CS_Source source, llvm::StringRef name,
|
||||
CS_Status* status) {
|
||||
auto data = Sources::GetInstance().Get(source);
|
||||
if (!data || data->type != SourceData::kCv) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
return;
|
||||
}
|
||||
static_cast<CvSourceImpl&>(*data->source).RemoveProperty(name);
|
||||
}
|
||||
|
||||
} // namespace cs
|
||||
|
||||
extern "C" {
|
||||
@@ -314,14 +286,4 @@ void CS_SetSourceEnumPropertyChoices(CS_Source source, CS_Property property,
|
||||
return cs::SetSourceEnumPropertyChoices(source, property, vec, status);
|
||||
}
|
||||
|
||||
void CS_RemoveSourceProperty(CS_Source source, CS_Property property,
|
||||
CS_Status* status) {
|
||||
return cs::RemoveSourceProperty(source, property, status);
|
||||
}
|
||||
|
||||
void CS_RemoveSourcePropertyByName(CS_Source source, const char* name,
|
||||
CS_Status* status) {
|
||||
return cs::RemoveSourceProperty(source, name, status);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user