Beispiel #1
0
    def handle_success(identifier):
        if called[0]:
            return

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

        else:
            identifier = ''

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

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

        callback(cameras)
Beispiel #2
0
    def handle_success(identifier):
        if called[0]:
            return
        
        called[0] = True
        cameras = []
        rtsp_support = config.motion_rtsp_support()
        if identifier:
            identifier = ' ' + identifier
            
        else:
            identifier = ''

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

        callback(cameras)