def _set_clock_mode(self, value):
    self._check_camera_open()
    self._check_recording_stopped()
    try:
        clock_mode = self.CLOCK_MODES[value]
    except KeyError:
        raise PiCameraValueError(('Invalid clock mode %s' % value))
    sensor_mode = self.sensor_mode
    framerate = Fraction(self.framerate)
    if (framerate == 0):
        framerate = self.framerate_range
    resolution = self.resolution
    self._disable_camera()
    self._configure_camera(sensor_mode=sensor_mode, framerate=framerate, resolution=resolution, clock_mode=clock_mode)
    self._configure_splitter()
    self._enable_camera()
def _set_clock_mode(self, value):
    self._check_camera_open()
    self._check_recording_stopped()
    try:
        clock_mode = self.CLOCK_MODES[value]
    except KeyError:
        raise PiCameraValueError(('Invalid clock mode %s' % value))
    sensor_mode = self.sensor_mode
    framerate = Fraction(self.framerate)
    if (framerate == 0):
        framerate = self.framerate_range
    resolution = self.resolution
    self._disable_camera()
    self._configure_camera(sensor_mode=sensor_mode, framerate=framerate, resolution=resolution, clock_mode=clock_mode)
    self._configure_splitter()
    self._enable_camera()