예제 #1
0
    def start_camera(self, source_name):
        try:
            source = int(source_name)
        except ValueError:
            IkaUtils.dprint('%s: Looking up device name %s' %
                            (self, source_name))
            source = None

            if IkaUtils.isWindows():
                from ikalog.inputs.win.videoinput_wrapper import VideoInputWrapper
                devices_list = VideoInputWrapper().get_device_list()
                try:
                    source = devices_list.index(source_name)
                except ValueError:
                    pass

        if source is None:
            IkaUtils.dprint("%s: Input '%s' not found" % (self, source_name))
            return None

        IkaUtils.dprint('%s: initalizing capture device %s' % (self, source))
        self.realtime = True
        if IkaUtils.isWindows():
            self.init_capture(700 + source)
        else:
            self.init_capture(0 + source)
예제 #2
0
    def start_camera(self, source_name):
        try:
            source = int(source_name)
        except ValueError:
            IkaUtils.dprint('%s: Looking up device name %s' %
                            (self, source_name))
            source = None

            if IkaUtils.isWindows():
                from ikalog.inputs.win.videoinput_wrapper import VideoInputWrapper
                devices_list = VideoInputWrapper().get_device_list()
                try:
                    source = devices_list.index(source_name)
                except ValueError:
                    pass

        if source is None:
            IkaUtils.dprint("%s: Input '%s' not found" % (self, source_name))
            return None

        IkaUtils.dprint('%s: initalizing capture device %s' % (self, source))
        self.realtime = True
        if IkaUtils.isWindows():
            self.init_capture(700 + source)
        else:
            self.init_capture(0 + source)
예제 #3
0
    def enumerate_devices(self):
        if IkaUtils.isWindows():
            from ikalog.inputs.win.videoinput_wrapper import VideoInputWrapper
            return VideoInputWrapper().get_device_list()

        else:
            return [
                'IkaLog does not support camera enumeration on this platform.',
                'IkaLog does not support camera enumeration on this platform.',
                'IkaLog does not support camera enumeration on this platform.',
            ]
예제 #4
0
    def enumerate_devices(self):
        if IkaUtils.isWindows():
            from ikalog.inputs.win.videoinput_wrapper import VideoInputWrapper
            cameras = VideoInputWrapper().get_device_list()

        else:
            cameras = [
                'IkaLog does not support camera enumeration on this platform.',
                'IkaLog does not support camera enumeration on this platform.',
                'IkaLog does not support camera enumeration on this platform.',
            ]

        if len(cameras) == 0:
            cameras = [ _('No input devices found!') ]
        return cameras
예제 #5
0
 def __init__(self):
     self.video_capture = None
     if IkaUtils.isWindows():
         self._videoinput_wrapper = VideoInputWrapper()
     super(CVCapture, self).__init__()
예제 #6
0
    def __init__(self):
        self._device_id = None
        self.last_t = 0
        self._warned_resolution = False

        self._videoinput_wrapper = VideoInputWrapper()
예제 #7
0
파일: directshow.py 프로젝트: syptn/IkaLog
 def __init__(self):
     self.strict_check = False
     self._device_id = None
     self._warned_resolution = False
     self._videoinput_wrapper = VideoInputWrapper()
     super(DirectShow, self).__init__()