| 1 | package cz.vutbr.feec.session.rtprtcp.internal; |
| 2 | |
| 3 | import java.net.DatagramSocket; |
| 4 | |
| 5 | import org.apache.log4j.Logger; |
| 6 | |
| 7 | import net.java.dev.jssm.Socket; |
| 8 | |
| 9 | public class RTCPThreadHandlerSender extends RTCPThreadHandler { |
| 10 | private static Logger logger = Logger.getLogger(RTCPThreadHandler.class |
| 11 | .getName()); |
| 12 | |
| 13 | public RTCPThreadHandlerSender(Session3550 session3550, |
| 14 | DatagramSocket unicastSocket, Socket multicastRTCPSocket, |
| 15 | int unicastSendToPort) { |
| 16 | this.rtpSession = session3550; |
| 17 | |
| 18 | assert rtpSession.isSender() : "Thread-handler used inproperly as receiver!"; |
| 19 | logger.debug("RTCPThreadHandler (SENDER)" + unicastSendToPort); |
| 20 | SocketStrategy mcSock = new SocketStrategy(multicastRTCPSocket, |
| 21 | unicastSendToPort); |
| 22 | SocketStrategy ucSock = new SocketStrategy(unicastSocket, null, |
| 23 | unicastSendToPort); |
| 24 | |
| 25 | rtcpSenderThread = new RTCPOutThread(SessionType.SENDER, |
| 26 | rtpSession, mcSock, unicastSendToPort, "(R)" |
| 27 | + rtpSession.getName()); |
| 28 | rtcpReceiverThread = new RTCPInThread(SessionType.SENDER, |
| 29 | rtpSession, ucSock, unicastSendToPort, rtpSession.getName()); |
| 30 | } |
| 31 | } |