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)
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)
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)