RTSP Message

Posted by mady | Posted in | Posted on 8:56 PM

RTSP is a text-based protocol and uses the ISO 10646 character set in UTF-8 encoding. Lines are terminated by CRLF, but receivers should be prepared to also interpret CR and LF by themselves as line terminators. Text-based protocols make it easier to add optional parameters in a self-describing manner. Since the number of parameters and the frequency of commands are low, processing efficiency is not a concern. Text-based protocols, if done carefully, also allow easy implementation of research prototypes in scripting languages such as Tcl, Visual Basic and Perl.
The 10646 character set avoids tricky character set switching, but is invisible to the application as long as US-ASCII is being used. This is also the encoding used for RTCP. ISO 8859-1 translates directly into Unicode with a high-order octet of zero.RTSP messages can be carried over any lower-layer transport protocol that is 8-bit clean.
Requests contain methods, the object the method is operating upon and parameters to further describe the method. Methods are idempotent, unless otherwise noted. Methods are also designed to require little or no state maintenance at the media server.
Message Length
When a message body is included with a message, the length of that body is determined by one of the following (in order of precedence):
1. Any response message which MUST NOT include a message body
(such as the 1xx, 204, and 304 responses) is always terminated
by the first empty line after the header fields, regardless of
the entity-header fields present in the message.

2 If a Content-Length header field is present, its value in bytes
represents the length of the message-body.
If this header field is not present, a value of zero is assumed.

3 By the server closing the connection. (Closing the connection
cannot be used to indicate the end of a request body, since
that would leave no possibility for the server to send back a
response.)
Given the moderate length of presentation descriptions returned, the server should always be able to determine its length, even if it is generated dynamically, making the chunked transfer encoding unnecessary. Even though Content-Length must be present if there is any entity body, the rules ensure reasonable behavior even if the length is not given explicitly.

Comments (3)

Thanks for such a continuous great postings. Digital Signature Certificate

Digital Signature Certificate provider in Delhi. Digital Signature Certificate

Very good content on this site Always looking forward to new post. Class 2 Digital Signature Certificate

Post a Comment