Esempio n. 1
0
def steam_ctr_stop() :
	"""Stop streamer.
	
	@Imput    .
	@Return   result.
	"""
	
	log.info('Stop streamer')
	try :
		check_call(["./Streamer.sh","Stop"])
		result = 'Success'
	except CalledProcessError as e:
		log.exception('gst stop error : %s',e.returncode)
		result = 'Error'

	return result
Esempio n. 2
0
def steam_ctr_restart() :
	"""Restart streamer.
	
	@Imput    .
	@Return   result.
	"""
	
	log.info('Restart Streamer')
	result = 'Error'
	try :
		check_call(["./Streamer.sh","Restart"])
		result = 'Success'
	except CalledProcessError as e:
		log.exception('gst restart error : %s',e.returncode)
		result = 'Error'
		
	return result
Esempio n. 3
0
def normal_levels(agi_normal):
    """Calibrate the normal level to actual sound level.
	
	@Imput    .
	@Return   .
	"""

    log.info('Calibration')
    try:
        db['agi_normal'] = agi_normal
        db['lvl_normal'] = sound_level()
        log.debug('agi_normal : %s', agi_normal)
        log.debug("lvl_normal : {:10.4f}".format(db['lvl_normal']))
        result = 'Success'
    except:
        log.exception('Calibration error ')
        result = 'Error'
    return result
def normal_levels(agi_normal):
    """Calibrate the normal level to actual sound level.
	
	@Imput    .
	@Return   .
	"""

    log.info("Calibration")
    try:
        db["agi_normal"] = agi_normal
        db["lvl_normal"] = sound_level()
        log.debug("agi_normal : %s", agi_normal)
        log.debug("lvl_normal : {:10.4f}".format(db["lvl_normal"]))
        result = "Success"
    except:
        log.exception("Calibration error ")
        result = "Error"
    return result