def _set_framerate(self, value):
    self._check_camera_open()
    self._check_recording_stopped()
    value = mo.to_fraction(value, den_limit=256)
    if (not (0 < value <= self.MAX_FRAMERATE)):
        raise PiCameraValueError(('Invalid framerate: %.2ffps' % value))
    sensor_mode = self.sensor_mode
    clock_mode = self.CLOCK_MODES[self.clock_mode]
    resolution = self.resolution
    self._disable_camera()
    self._configure_camera(sensor_mode=sensor_mode, framerate=value, resolution=resolution, clock_mode=clock_mode)
    self._configure_splitter()
    self._enable_camera()
def _set_framerate(self, value):
    self._check_camera_open()
    self._check_recording_stopped()
    value = mo.to_fraction(value, den_limit=256)
    if (not (0 < value <= self.MAX_FRAMERATE)):
        raise PiCameraValueError(('Invalid framerate: %.2ffps' % value))
    sensor_mode = self.sensor_mode
    clock_mode = self.CLOCK_MODES[self.clock_mode]
    resolution = self.resolution
    self._disable_camera()
    self._configure_camera(sensor_mode=sensor_mode, framerate=value, resolution=resolution, clock_mode=clock_mode)
    self._configure_splitter()
    self._enable_camera()