EMMA Coverage Report (generated Tue Dec 18 20:38:46 CET 2007)
[all classes][cz.vutbr.feec.session.rtprtcp.internal]

## COVERAGE SUMMARY FOR SOURCE FILE [RTCPThreadHandler.java]

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
RTCPThreadHandler.java | 0% (0/1) | 0% (0/8) | 0% (0/74) | 0% (0/19)

### COVERAGE BREAKDOWN BY CLASS AND METHOD

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
class RTCPThreadHandler | 0% (0/1) | 0% (0/8) | 0% (0/74) | 0% (0/19)
<static initializer> |  | 0% (0/1) | 0% (0/12) | 0% (0/2)
RTCPThreadHandler (): void |  | 0% (0/1) | 0% (0/3) | 0% (0/2)
getDestRTCPPort (): int |  | 0% (0/1) | 0% (0/4) | 0% (0/1)
mirrorPacket (byte [], int): void |  | 0% (0/1) | 0% (0/32) | 0% (0/4)
reschedule (double): void |  | 0% (0/1) | 0% (0/8) | 0% (0/3)
startRTCPReceiverThread (): void |  | 0% (0/1) | 0% (0/4) | 0% (0/2)
startRTCPSenderThread (): void |  | 0% (0/1) | 0% (0/4) | 0% (0/2)
stopThreads (): void |  | 0% (0/1) | 0% (0/7) | 0% (0/3)

1 | package cz.vutbr.feec.session.rtprtcp.internal;
2 |
3 | import org.apache.log4j.Logger;
4 |
5 | /**
6 | * This class creates and starts the RTCP sender and receiver threads.
7 | */
8 | abstract public class RTCPThreadHandler {
9 |
10 | /** The logger. */
11 | private static Logger logger = Logger.getLogger(RTCPThreadHandler.class.getName());
12 |
13 | /** Reference to the RTCP Receiver Thread. */
14 | protected RTCPInThread rtcpReceiverThread;
15 |
16 | /** Reference to the RTCP Sender Thread. */
17 | protected RTCPOutThread rtcpSenderThread;
18 |
19 | /** The rtp session. */
20 | protected Session3550 rtpSession;
21 |
22 | protected RTCPThreadHandler() {
23 | }
24 |
25 | /**
26 | * Starts the RTCP Sender thread.
27 | */
28 | public void startRTCPSenderThread() {
29 | rtcpSenderThread.start();
30 | }
31 |
32 | /**
33 | * Starts the RTCP Receiver thread.
34 | */
35 | public void startRTCPReceiverThread() {
36 | rtcpReceiverThread.start();
37 | }
38 |
39 | /**
40 | * Reschedule the time to send RTCP packet.
41 | *
42 | * @param expireTime the expire time
43 | */
44 | public void reschedule(double expireTime) {
45 | rtcpSenderThread.schedule(expireTime);
46 | // interrupt from waiting and reschedule wait period
47 | rtcpSenderThread.interrupt();
48 | }
49 |
50 | /**
51 | * Interrupts a running RTCP sender thread. This will cause the sender to
52 | * send BYE packet and finally terminate.
53 | */
54 | public void stopThreads() {
55 | rtcpSenderThread.stopRTCPSender();
56 | rtcpReceiverThread.stopThread();
57 | }
58 |
59 | /**
60 | * Mirror packet.
61 | *
62 | * @param packet the packet
63 | */
64 | public void mirrorPacket(byte[] packet, int length) {
65 | // only sender in SSM mode can mirror packets
66 | assert rtpSession.isSSM() && rtpSession.isSender() : "Only sender in SSM mode can mirror packets.";
67 | logger.debug("MIRORRING RTCP PACKET len:"+packet.length);
68 | rtcpSenderThread.sendPacket(packet, length);
69 | }
70 |
71 | /**
72 | * Gets the dest RTCP port.
73 | *
74 | * @return the dest RTCP port
75 | */
76 | public int getDestRTCPPort() {
77 | return rtcpSenderThread.getDestRtcpPort();
78 | }
79 | }

[all classes][cz.vutbr.feec.session.rtprtcp.internal]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov