def wait_recording(self, timeout=0, splitter_port=1):
    '\n        Wait on the video encoder for timeout seconds.\n\n        It is recommended that this method is called while recording to check\n        for exceptions. If an error occurs during recording (for example out of\n        disk space) the recording will stop, but an exception will only be\n        raised when the :meth:`wait_recording` or :meth:`stop_recording`\n        methods are called.\n\n        If ``timeout`` is 0 (the default) the function will immediately return\n        (or raise an exception if an error has occurred).\n\n        The *splitter_port* parameter specifies which port of the video\n        splitter the encoder you wish to wait on is attached to. This\n        defaults to ``1`` and most users will have no need to specify anything\n        different. Valid values are between ``0`` and ``3`` inclusive.\n\n        .. versionchanged:: 1.3\n            The *splitter_port* parameter was added\n        '
    assert (timeout is not None)
    try:
        with self._encoders_lock:
            encoder = self._encoders[splitter_port]
    except KeyError:
        raise PiCameraNotRecording(('There is no recording in progress on port %d' % splitter_port))
    else:
        encoder.wait(timeout)
Wait on the video encoder for timeout seconds.

It is recommended that this method is called while recording to check
for exceptions. If an error occurs during recording (for example out of
disk space) the recording will stop, but an exception will only be
raised when the :meth:`wait_recording` or :meth:`stop_recording`
methods are called.

If ``timeout`` is 0 (the default) the function will immediately return
(or raise an exception if an error has occurred).

The *splitter_port* parameter specifies which port of the video
splitter the encoder you wish to wait on is attached to. This
defaults to ``1`` and most users will have no need to specify anything
different. Valid values are between ``0`` and ``3`` inclusive.

.. versionchanged:: 1.3
    The *splitter_port* parameter was added
def wait_recording(self, timeout=0, splitter_port=1):
    '\n        Wait on the video encoder for timeout seconds.\n\n        It is recommended that this method is called while recording to check\n        for exceptions. If an error occurs during recording (for example out of\n        disk space) the recording will stop, but an exception will only be\n        raised when the :meth:`wait_recording` or :meth:`stop_recording`\n        methods are called.\n\n        If ``timeout`` is 0 (the default) the function will immediately return\n        (or raise an exception if an error has occurred).\n\n        The *splitter_port* parameter specifies which port of the video\n        splitter the encoder you wish to wait on is attached to. This\n        defaults to ``1`` and most users will have no need to specify anything\n        different. Valid values are between ``0`` and ``3`` inclusive.\n\n        .. versionchanged:: 1.3\n            The *splitter_port* parameter was added\n        '
    assert (timeout is not None)
    try:
        with self._encoders_lock:
            encoder = self._encoders[splitter_port]
    except KeyError:
        raise PiCameraNotRecording(('There is no recording in progress on port %d' % splitter_port))
    else:
        encoder.wait(timeout)