io.antmedia.ipcamera.onvifdiscovery.OnvifDiscovery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ant-media-server Show documentation
Show all versions of ant-media-server Show documentation
Ant Media Server supports RTMP, RTSP, MP4, HLS, WebRTC, Adaptive Streaming, etc.
package io.antmedia.ipcamera.onvifdiscovery;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* @author th
* @date 2015-06-18
*/
public class OnvifDiscovery {
private OnvifDiscovery() {
}
public static List discoverOnvifDevices(boolean useIpv4, List addressList) {
final ArrayList onvifPointers = new ArrayList<>();
final Collection urls = DeviceDiscovery.discoverWsDevicesAsUrls("^http$", ".*onvif.*", useIpv4,
addressList);
for (URL url : urls) {
try {
onvifPointers.add(url);
} catch (Exception e) {
e.printStackTrace();
}
}
return onvifPointers;
}
}