def _stop_capture(self, port):
    if ((port == self._camera.outputs[self.CAMERA_CAPTURE_PORT]) or (len([e for e in self._encoders.values() if e.active]) == 1)):
        port.params[mmal.MMAL_PARAMETER_CAPTURE] = False
def _stop_capture(self, port):
    if ((port == self._camera.outputs[self.CAMERA_CAPTURE_PORT]) or (len([e for e in self._encoders.values() if e.active]) == 1)):
        port.params[mmal.MMAL_PARAMETER_CAPTURE] = False