def _get_ports(self, from_video_port, splitter_port):
    "\n        Determine the camera and output ports for given capture options.\n\n        See :ref:`camera_hardware` for more information on picamera's usage of\n        camera, splitter, and encoder ports. The general idea here is that the\n        capture (still) port operates on its own, while the video port is\n        always connected to a splitter component, so requests for a video port\n        also have to specify which splitter port they want to use.\n        "
    self._check_camera_open()
    if (from_video_port and (splitter_port in self._encoders)):
        raise PiCameraAlreadyRecording(('The camera is already using port %d ' % splitter_port))
    camera_port = (self._camera.outputs[self.CAMERA_VIDEO_PORT] if from_video_port else self._camera.outputs[self.CAMERA_CAPTURE_PORT])
    output_port = (self._splitter.outputs[splitter_port] if from_video_port else camera_port)
    return (camera_port, output_port)
Determine the camera and output ports for given capture options.

See :ref:`camera_hardware` for more information on picamera's usage of
camera, splitter, and encoder ports. The general idea here is that the
capture (still) port operates on its own, while the video port is
always connected to a splitter component, so requests for a video port
also have to specify which splitter port they want to use.
def _get_ports(self, from_video_port, splitter_port):
    "\n        Determine the camera and output ports for given capture options.\n\n        See :ref:`camera_hardware` for more information on picamera's usage of\n        camera, splitter, and encoder ports. The general idea here is that the\n        capture (still) port operates on its own, while the video port is\n        always connected to a splitter component, so requests for a video port\n        also have to specify which splitter port they want to use.\n        "
    self._check_camera_open()
    if (from_video_port and (splitter_port in self._encoders)):
        raise PiCameraAlreadyRecording(('The camera is already using port %d ' % splitter_port))
    camera_port = (self._camera.outputs[self.CAMERA_VIDEO_PORT] if from_video_port else self._camera.outputs[self.CAMERA_CAPTURE_PORT])
    output_port = (self._splitter.outputs[splitter_port] if from_video_port else camera_port)
    return (camera_port, output_port)