RTSP Streaming server using Netty
rpardridge
bobbyucsd006 at yahoo.com
Thu Jul 28 20:37:19 EDT 2011
I checked out some Rtsp examples by Mobicents
http://mobicents-media-server.blogspot.com/2009/09/mobicents-rtsp-stack-100bta1-released.html
But I still don't see it doing much, most of the encode/decode methods just
call their super() methods, except the response encoder which basically just
writes out some basic info regardless of what the request message was
(DESCRIBE, PLAY, SHUTDOWN, etc)
public class RtspResponseEncoder extends HttpMessageEncoder {
public RtspResponseEncoder() {
super();
}
@Override
protected void encodeInitialLine(ChannelBuffer buf, HttpMessage message) {
HttpResponse response = (HttpResponse) message;
try {
buf.writeBytes(response.getProtocolVersion().toString().getBytes(
"ASCII"));
buf.writeByte(RtspCodecUtil.SP);
buf.writeBytes(String.valueOf(response.getStatus().getCode())
.getBytes("ASCII"));
buf.writeByte(RtspCodecUtil.SP);
buf.writeBytes(String.valueOf(
response.getStatus().getReasonPhrase()).getBytes("ASCII"));
buf.writeBytes(RtspCodecUtil.CRLF);
} catch (UnsupportedEncodingException e) {
throw (Error) new Error().initCause(e);
}
}
}
So I am guessing even using Netty, it is still up to me to properly parse
incoming request messages and send the appropriate response messages,
writing out the actual bytes in the messages myself. Is this correct? And if
so, where should I begin to figure all that out?
I've looked briefly at http://www.ietf.org/rfc/rfc2326.txt but that looks a
little cryptic =( I'm hoping to find something a little easier to
understandThanks all!
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/RTSP-Streaming-server-using-Netty-tp6628163p6631866.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list