def _set_drc_strength(self, value):
    self._check_camera_open()
    try:
        mp = self._camera.control.params[mmal.MMAL_PARAMETER_DYNAMIC_RANGE_COMPRESSION]
        mp.strength = self.DRC_STRENGTHS[value]
    except KeyError:
        raise PiCameraValueError(('Invalid dynamic range compression strength: %s' % value))
    self._camera.control.params[mmal.MMAL_PARAMETER_DYNAMIC_RANGE_COMPRESSION] = mp
def _set_drc_strength(self, value):
    self._check_camera_open()
    try:
        mp = self._camera.control.params[mmal.MMAL_PARAMETER_DYNAMIC_RANGE_COMPRESSION]
        mp.strength = self.DRC_STRENGTHS[value]
    except KeyError:
        raise PiCameraValueError(('Invalid dynamic range compression strength: %s' % value))
    self._camera.control.params[mmal.MMAL_PARAMETER_DYNAMIC_RANGE_COMPRESSION] = mp