本文整理匯總了Java中org.jboss.netty.handler.codec.rtsp.RtspResponseEncoder類的典型用法代碼示例。如果您正苦於以下問題:Java RtspResponseEncoder類的具體用法?Java RtspResponseEncoder怎麽用?Java RtspResponseEncoder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RtspResponseEncoder類屬於org.jboss.netty.handler.codec.rtsp包,在下文中一共展示了RtspResponseEncoder類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getPipeline
import org.jboss.netty.handler.codec.rtsp.RtspResponseEncoder; //導入依賴的package包/類
@Override
public ChannelPipeline getPipeline() throws Exception {
final ChannelPipeline pipeline = Channels.pipeline();
final AirPlayServer airPlayServer = AirPlayServer.getIstance();
pipeline.addLast("executionHandler", airPlayServer.getChannelExecutionHandler());
pipeline.addLast("closeOnShutdownHandler", new SimpleChannelUpstreamHandler() {
@Override
public void channelOpen(final ChannelHandlerContext ctx, final ChannelStateEvent e) throws Exception {
airPlayServer.getChannelGroup().add(e.getChannel());
super.channelOpen(ctx, e);
}
});
pipeline.addLast("exceptionLogger", new ExceptionLoggingHandler());
pipeline.addLast("decoder", new RtspRequestDecoder());
pipeline.addLast("encoder", new RtspResponseEncoder());
pipeline.addLast("logger", new RtspLoggingHandler());
pipeline.addLast("errorResponse", new RtspErrorResponseHandler());
pipeline.addLast("challengeResponse", new RaopRtspChallengeResponseHandler(NetworkUtils.getInstance().getHardwareAddress()));
pipeline.addLast("header", new RaopRtspHeaderHandler());
pipeline.addLast("options", new RaopRtspOptionsHandler());
pipeline.addLast("audio", new RaopAudioHandler(airPlayServer.getExecutorService()));
pipeline.addLast("unsupportedResponse", new RtspUnsupportedResponseHandler());
return pipeline;
}
示例2: getPipeline
import org.jboss.netty.handler.codec.rtsp.RtspResponseEncoder; //導入依賴的package包/類
@Override
public ChannelPipeline getPipeline() throws Exception {
final ChannelPipeline pipeline = Channels.pipeline();
final AirPlayServer airPlayServer = AirPlayServer.getIstance(context);
pipeline.addLast("executionHandler", airPlayServer.getChannelExecutionHandler());
pipeline.addLast("closeOnShutdownHandler", new SimpleChannelUpstreamHandler() {
@Override
public void channelOpen(final ChannelHandlerContext ctx, final ChannelStateEvent e) throws Exception {
airPlayServer.getChannelGroup().add(e.getChannel());
super.channelOpen(ctx, e);
}
});
pipeline.addLast("exceptionLogger", new ExceptionLoggingHandler());
pipeline.addLast("decoder", new RtspRequestDecoder());
pipeline.addLast("encoder", new RtspResponseEncoder());
//pipeline.addLast("aggregator", new HttpChunkAggregator(655360));//buffer size
pipeline.addLast("logger", new RtspLoggingHandler(context));
pipeline.addLast("errorResponse", new RtspErrorResponseHandler());
pipeline.addLast("challengeResponse", new RaopRtspChallengeResponseHandler(NetworkUtils.getInstance().getHardwareAddress()));
pipeline.addLast("header", new RaopRtspHeaderHandler());
pipeline.addLast("options", new RaopRtspOptionsHandler());
pipeline.addLast("audio", new RaopAudioHandler(airPlayServer.getExecutorService(),context));
pipeline.addLast("unsupportedResponse", new RtspUnsupportedResponseHandler());
return pipeline;
}
示例3: getPipeline
import org.jboss.netty.handler.codec.rtsp.RtspResponseEncoder; //導入依賴的package包/類
public ChannelPipeline getPipeline() throws Exception {
// Create a default pipeline implementation.
ChannelPipeline pipeline = pipeline();
pipeline.addLast("decoder", new RtspRequestDecoder());
pipeline.addLast("encoder", new RtspResponseEncoder());
pipeline.addLast("handler", new RtspRequestHandler(this.rtspServerStackImpl));
return pipeline;
}