\section{Minimal RTSP implementation}
\label{sec:minimal}


\subsection{Client}

A client implementation MUST be able to do the following :

\begin{itemize}

\item Generate the following requests:  {\SETUP},
{\TEARDOWN}, and one of {\PLAY} (i.e., a minimal playback
client) or {\RECORD} (i.e., a minimal recording client).  If
{\RECORD} is implemented, {\ANNOUNCE} {\MUST} be implemented as
well.

\item Include the following headers in requests:  \header{CSeq},
\header{Connection}, \header{Session}, \header{Transport}.  If
{\ANNOUNCE} is implemented, the capability to include headers
\header{Content-Language}, \header{Content-Encoding},
\header{Content-Length}, and \header{Content-Type} should be as well.

\item Parse and understand the following headers in responses: 
\header{CSeq}, \header{Connection}, \header{Session},
\header{Transport}, \header{Content-Language},
\header{Content-Encoding}, \header{Content-Length},
\header{Content-Type}.  If {\RECORD} is implemented, the
\header{Location} header must be understood as well.  RTP-compliant
implementations should also implement RTP-Info.

\item Understand the class of each error code received and notify the
end-user, if one is present, of error codes in classes 4xx and 5xx.  The
notification requirement may be relaxed if the end-user explicitly does
not want it for one or all status codes.

\item Expect and respond to asynchronous requests from the server, such
as {\ANNOUNCE}.  This does not necessarily mean that it should implement
the {\ANNOUNCE} method, merely that it {\MUST} respond positively or
negatively to any request received from the server.

\end{itemize}

Though not required, the following are {\RECOMMENDED}.
\begin{itemize}

\item Implement RTP/AVP/UDP as a valid transport.

\item Inclusion of the \header{User-Agent} header.

\item Understand SDP session descriptions as defined in 
Appendix~\ref{sec:sdpusage}

\item Accept media initialization formats (such as SDP) from standard
input, command line, or other means appropriate to the operating
environment to act as a ``helper application'' for other applications
(such as web browsers).

\end{itemize}

\motivation{There may be RTSP applications different from those
initially envisioned by the contributors to the RTSP specification for
which the requirements above do not make sense.  Therefore, the
recommendations above serve only as guidelines instead of strict
requirements.}

\subsubsection{Basic Playback}
To support on-demand playback of media streams, the client {\MUST}
additionally be able to do the following:
\begin{itemize}
\item generate the {\PAUSE} request;
\item implement the {\REDIRECT} method, and the \header{Location}
header.
\end{itemize}

\subsubsection{Authentication-enabled}

In order to access media presentations from RTSP servers that require
authentication, the client {\MUST} additionally be able to do the following:
\begin{itemize}
\item recognize the 401 (Unauthorized) status code;
\item parse and include the \header{WWW-Authenticate} header;
\item implement Basic Authentication and Digest Authentication.
\end{itemize}

\subsection{Server}

A minimal server implementation {\MUST} be able to do the following:

\begin{itemize}

\item Implement the following methods:  {\SETUP}, {\TEARDOWN},
{\OPTIONS} and either {\PLAY} (for a minimal playback server) or
{\RECORD} (for a minimal recording server).

If {\RECORD} is implemented, {\ANNOUNCE} {\SHOULD} be
implemented as well.

\item Include the following headers in responses:  \header{Connection},
\header{Content-Length}, \header{Content-Type}, \header{Content-Language},
\header{Content-Encoding}, \header{Transport}, \header{Public}.  The
capability to include the \header{Location} header should be implemented
if the {\RECORD} method is.  RTP-compliant implementations should
also implement the \header{RTP-Info} field.

\item Parse and respond appropriately to the following headers in
requests:  \header{Connection}, \header{Session}, \header{Transport},
\header{Require}.

\end{itemize}

Though not required, the following are highly recommended at the time of
publication for practical interoperability with initial implementations
and/or to be a ``good citizen''.

\begin{itemize}

\item Implement RTP/AVP/UDP as a valid transport.

\item Inclusion of the \header{Server} header.

\item Implement the {\DESCRIBE} method.

\item Generate SDP session descriptions as defined in 
Appendix~\ref{sec:sdpusage}

\end{itemize}

\motivation{There may be RTSP applications different from those
initially envisioned by the contributors to the RTSP specification for
which the requirements above do not make sense.  Therefore, the
recommendations above serve only as guidelines instead of strict
requirements.}

\subsubsection{Basic Playback}
To support on-demand playback of media streams, the server MUST
additionally be able to do the following:

\begin{itemize}
\item Recognize the \header{Range} header, and return an error if
seeking is not supported.

\item Implement the {\PAUSE} method.
\end{itemize}

In addition, in order to support commonly-accepted user interface
features, the following are highly recommended for on-demand media
servers:

\begin{itemize}
\item Include and parse the \header{Range} header, with NPT
units. Implementation of SMPTE units is recommended. 

\item Include the length of the media presentation in the media
initialization information.

\item Include mappings from data-specific timestamps to NPT.  When RTP
is used, the \header{rtptime} portion of the \header{RTP-Info} field may
be used to map RTP timestamps to NPT.

\end{itemize}

\motivation{Client implementations may use the presence of length
information to determine if the clip is seekable, and visably disable
seeking features for clips for which the length information is
unavailable.  A common use of the presentation length is to implement a
``slider bar'' which serves as both a progress indicator and a timeline
positioning tool.

Mappings from RTP timestamps to NPT are necessary to ensure correct
positioning of the slider bar.
}

\subsubsection{Authentication-enabled}
In order to correctly handle client authentication, the server MUST
additionally be able to do the following:

\begin{itemize}
\item Generate the 401 (Unauthorized) status code when authentication is
required for the resource.

\item Parse and include the \header{WWW-Authenticate} header

\item Implement Basic Authentication and Digest Authentication
\end{itemize}
