コード例 #1
0
ファイル: camera.py プロジェクト: ralph-gee/cam2-clone
    def __init__(self, id, ip, image_path, mjpeg_path=None, port=None):
        super(IPCamera, self).__init__(id)
        self.ip = ip
        self.image_path = image_path
        self.mjpeg_path = mjpeg_path
        self.port = port

        # Initializes an ImageStreamParser so that frames can be retrieved from
        # the image stream without the need to call the open_stream method.
        self.parser = stream_parser.ImageStreamParser(self.get_url())
コード例 #2
0
 def __init__(self, duration, interval, ip, image_path, port=None):
     #super(IPCamera, self).__init__(duration, interval)
     self.ip = ip
     self.image_path = image_path
     #self.mjpeg_path = mjpeg_path
     self.port = port
     #e.g. image path for ip=128.10.29.20 is mjpg/video.mjpg
     # Initializes an ImageStreamParser so that frames can be retrieved from
     # the image stream without the need to call the open_stream method.
     self.parser = stream_parser.ImageStreamParser(self.get_url())
コード例 #3
0
    def __init__(self,
                 id,
                 url,
                 latitude=None,
                 longitude=None,
                 resolution_width=None,
                 resolution_height=None):
        super(NonIPCamera, self).__init__(id, latitude, longitude,
                                          resolution_width, resolution_height)
        self.url = url

        self.parser = stream_parser.ImageStreamParser(url)
コード例 #4
0
    def close_stream(self):
        """Close the currently open camera stream.

        Notes
        -----
        After closing the currently open camera stream, this method initializes
        an ImageStreamParser so that frames can be retrieved from the image
        stream without the need to call the open_stream method.

        """
        if self.parser is not None:
            self.parser.close_stream()
            self.parser = stream_parser.ImageStreamParser(self.get_url())
コード例 #5
0
    def __init__(self, id, url):
        self.id = id
        self.url = url

        self.timeInitialized = time.time()  # Holds the time that the class was initialized
        self.refImage = None                # Holds the string name of the reference image
        self.startImage = None              # Holds the string name of the start image
        self.endImage = None                # Holds the string name of the end image
        self.startTime = 0                  # Holds the unix start time that the start image was captured
        self.endTime = 0                    # Holds the unix start time that the end image was captured
                                            # The frame rate is the difference between these two times. 

        self.parser = None                  # This is the image stream parser object it will always be for static images. 
        self.parser = stream_parser.ImageStreamParser(url)
コード例 #6
0
    def __init__(self,
                 id,
                 ip,
                 image_path,
                 mjpeg_path=None,
                 port=None,
                 latitude=None,
                 longitude=None,
                 resolution_width=None,
                 resolution_height=None,
                 resolution=''):
        super(IPCamera, self).__init__(id, latitude, longitude,
                                       resolution_width, resolution_height)
        self.ip = ip
        self.image_path = image_path
        self.mjpeg_path = mjpeg_path
        self.port = port
        self.resolution = resolution

        # Initializes an ImageStreamParser so that frames can be retrieved from
        # the image stream without the need to call the open_stream method.
        self.parser = stream_parser.ImageStreamParser(self.get_url())
コード例 #7
0
    def __init__(self, id, duration, interval, url):
        super(NonIPCamera, self).__init__(id, duration, interval)
        self.is_video = 0
        self.url = url

        self.parser = stream_parser.ImageStreamParser(url)
コード例 #8
0
ファイル: camera.py プロジェクト: ralph-gee/cam2-clone
    def __init__(self, id, url):
        super(NonIPCamera, self).__init__(id)
        self.url = url

        self.parser = stream_parser.ImageStreamParser(url)