Class HttpCamera

  • All Implemented Interfaces:
    AutoCloseable
    Direct Known Subclasses:
    AxisCamera

    public class HttpCamera
    extends VideoCamera
    A source that represents a MJPEG-over-HTTP (IP) camera.
    • Constructor Detail

      • HttpCamera

        public HttpCamera​(String name,
                          String url)
        Create a source for a MJPEG-over-HTTP (IP) camera.
        Parameters:
        name - Source name (arbitrary unique identifier)
        url - Camera URL (e.g. "http://10.x.y.11/video/stream.mjpg")
      • HttpCamera

        public HttpCamera​(String name,
                          String url,
                          HttpCamera.HttpCameraKind kind)
        Create a source for a MJPEG-over-HTTP (IP) camera.
        Parameters:
        name - Source name (arbitrary unique identifier)
        url - Camera URL (e.g. "http://10.x.y.11/video/stream.mjpg")
        kind - Camera kind (e.g. kAxis)
      • HttpCamera

        public HttpCamera​(String name,
                          String[] urls)
        Create a source for a MJPEG-over-HTTP (IP) camera.
        Parameters:
        name - Source name (arbitrary unique identifier)
        urls - Array of Camera URLs
      • HttpCamera

        public HttpCamera​(String name,
                          String[] urls,
                          HttpCamera.HttpCameraKind kind)
        Create a source for a MJPEG-over-HTTP (IP) camera.
        Parameters:
        name - Source name (arbitrary unique identifier)
        urls - Array of Camera URLs
        kind - Camera kind (e.g. kAxis)
    • Method Detail

      • getHttpCameraKindFromInt

        public static HttpCamera.HttpCameraKind getHttpCameraKindFromInt​(int kind)
        Convert from the numerical representation of kind to an enum type.
        Parameters:
        kind - The numerical representation of kind
        Returns:
        The kind
      • getHttpCameraKind

        public HttpCamera.HttpCameraKind getHttpCameraKind()
        Get the kind of HTTP camera.

        Autodetection can result in returning a different value than the camera was created with.

      • setUrls

        public void setUrls​(String[] urls)
        Change the URLs used to connect to the camera.
      • getUrls

        public String[] getUrls()
        Get the URLs used to connect to the camera.