1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jboss.netty.handler.codec.rtsp;
17
18 import org.jboss.netty.buffer.ChannelBuffer;
19 import org.jboss.netty.channel.Channel;
20 import org.jboss.netty.channel.ChannelHandler.Sharable;
21 import org.jboss.netty.channel.ChannelHandlerContext;
22 import org.jboss.netty.handler.codec.http.HttpMessage;
23 import org.jboss.netty.handler.codec.http.HttpMessageEncoder;
24
25
26
27
28
29
30
31
32 @Sharable
33 public abstract class RtspMessageEncoder extends HttpMessageEncoder {
34
35
36
37
38 protected RtspMessageEncoder() {
39 super();
40 }
41
42 @Override
43 protected Object encode(ChannelHandlerContext ctx, Channel channel,
44 Object msg) throws Exception {
45
46 if (!(msg instanceof HttpMessage)) {
47 return msg;
48 }
49 return super.encode(ctx, channel, msg);
50 }
51 }