Remove RemoveSourceProperty.

This commit is contained in:
Peter Johnson
2016-10-24 22:29:58 -07:00
parent 511d551546
commit 7ca6c5ef34
8 changed files with 0 additions and 104 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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)) {}

View File

@@ -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

View File

@@ -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

View File

@@ -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);
}
}

View File

@@ -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"