Exemplo n.º 1
0
    def handle_success(identifier):
        if called[0]:
            return

        called[0] = True
        cameras = []
        rtsp_support = motionctl.get_rtsp_support()
        if identifier:
            identifier = ' ' + identifier

        else:
            identifier = ''

        if 'tcp' in rtsp_support:
            cameras.append({
                'id': 'tcp',
                'name': '%sRTSP/TCP Camera' % identifier
            })

        if 'udp' in rtsp_support:
            cameras.append({
                'id': 'udp',
                'name': '%sRTSP/UDP Camera' % identifier
            })

        callback(cameras)
Exemplo n.º 2
0
    def handle_success(identifier):
        if called[0]:
            return
        
        called[0] = True
        cameras = []
        rtsp_support = motionctl.get_rtsp_support()
        if identifier:
            identifier = ' ' + identifier
            
        else:
            identifier = ''

        if 'tcp' in rtsp_support:
            cameras.append({'id': 'tcp', 'name': '%sRTSP/TCP Camera' % identifier})

        if 'udp' in rtsp_support:
            cameras.append({'id': 'udp', 'name': '%sRTSP/UDP Camera' % identifier})
        
        callback(cameras)
Exemplo n.º 3
0
    def handle_success(identifier):
        if called[0]:
            return

        called[0] = True
        cameras = []
        rtsp_support = motionctl.get_rtsp_support()
        if identifier:
            identifier = " " + identifier

        else:
            identifier = ""

        if "tcp" in rtsp_support:
            cameras.append({"id": "tcp", "name": "%sRTSP/TCP Camera" % identifier})

        if "udp" in rtsp_support:
            cameras.append({"id": "udp", "name": "%sRTSP/UDP Camera" % identifier})

        callback(cameras)