Java: Add VideoProperty implementation.

This commit is contained in:
Peter Johnson
2016-08-26 08:50:58 -07:00
parent 97f1f1c9c4
commit 2f99f81aa6
4 changed files with 122 additions and 8 deletions

View File

@@ -49,10 +49,19 @@ public class VideoSource {
/// @param name Property name
/// @return Property contents (of type Property::kNone if no property with
/// the given name exists)
//public VideoProperty getProperty(String name);
public VideoProperty getProperty(String name) {
return new VideoProperty(CameraServerJNI.getSourceProperty(m_handle, name));
}
/// Enumerate all properties of this source.
//public VideoProperty[] enumerateProperties();
public VideoProperty[] enumerateProperties() {
int[] handles = CameraServerJNI.enumerateSourceProperties(m_handle);
VideoProperty[] rv = new VideoProperty[handles.length];
for (int i=0; i<handles.length; i++) {
rv[i] = new VideoProperty(handles[i]);
}
return rv;
}
/// Enumerate all existing sources.
/// @return Vector of sources.