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 Details

    • 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

      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 Details

    • getHttpCameraKindFromInt

      Convert from the numerical representation of kind to an enum type.
      Parameters:
      kind - The numerical representation of kind
      Returns:
      The kind
    • getHttpCameraKind

      Get the kind of HTTP camera.

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

      Returns:
      The kind of HTTP camera.
    • setUrls

      public void setUrls(String[] urls)
      Change the URLs used to connect to the camera.
      Parameters:
      urls - Array of Camera URLs
    • getUrls

      public String[] getUrls()
      Get the URLs used to connect to the camera.
      Returns:
      Array of camera URLs.