Basic RTSP in Netty example?

jgalyan jgalyan at adbrite.com
Mon Nov 29 14:17:22 EST 2010


I think you need an RtspRequestEncoder in your pipeline instead of the
decoder you already have (decoders are for inbound requests, encoders are
for outbound requests).  You'll also need an upstream handler if you want to
do anything with the responses, which will necessitate making a new class
instead of using anonymous instances.

For example:

public class RtspClientPipelineFactory implements ChannelPipelineFactory {
  @Override
  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline result = pipeline();
    result.addLast("encoder", new RtspRequestEncoder());
    result.addLast("decoder", new RtspResponseDecoder());
    // add a handler here to deal with the response from the other side
    result.addLast("handler", new MyExcellentRtspResponseHandler());
    return result;
  }
}
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Basic-RTSP-in-Netty-example-tp5775338p5785595.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list