13
|
1 |
/** |
|
2 |
* Java RTP Library (jlibrtp) |
|
3 |
* Copyright (C) 2006 Arne Kepp |
|
4 |
* |
|
5 |
* This library is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU Lesser General Public |
|
7 |
* License as published by the Free Software Foundation; either |
|
8 |
* version 2.1 of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This library is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 |
* Lesser General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU Lesser General Public |
|
16 |
* License along with this library; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
18 |
*/ |
|
19 |
package jlibrtp; |
|
20 |
import java.net.InetSocketAddress; |
|
21 |
|
|
22 |
/** |
|
23 |
* DebugAppIntf can be registered on RTPSession to provide simple |
|
24 |
* debugging functionality. This is particularly useful to determine |
|
25 |
* whether the client is receing any data at all. |
|
26 |
* |
|
27 |
* @author Arne Kepp |
|
28 |
* |
|
29 |
*/ |
|
30 |
|
|
31 |
public interface DebugAppIntf { |
|
32 |
/** |
|
33 |
* This function wil notify you of any packets received, valid or not. |
|
34 |
* Useful for network debugging, and finding bugs in jlibrtp. |
|
35 |
* |
|
36 |
* Type is an integer describing the type of event |
|
37 |
* -2 - Invalid RTCP packet received |
|
38 |
* -1 - Invalid RTP packet received |
|
39 |
* 0 - RTP packet received |
|
40 |
* 1 - RTCP packet received |
|
41 |
* |
|
42 |
* Description is a string that should be meaningful to advanced users, such as |
|
43 |
* "RTP packet received from 127.0.0.1:12312, SSRC: 1380912 , payload type 1, packet size 16 octets" |
|
44 |
* or |
|
45 |
* "Invalid RTP packet received from 127.0.0.1:12312" |
|
46 |
* |
|
47 |
* This function is synchonous and should return quickly. |
|
48 |
* |
|
49 |
* @param type , the type of event, see above. |
|
50 |
* @param socket , taken directly from the UDP packet |
|
51 |
* @param description , see above. |
|
52 |
*/ |
|
53 |
public void packetReceived(int type, InetSocketAddress socket, String description); |
|
54 |
|
|
55 |
/** |
|
56 |
* This function will notify you of any packets sent from this instance of RTPSession. |
|
57 |
* Useful for network debugging, and finding bugs in jlibrtp. |
|
58 |
* |
|
59 |
* Type is an integer describing the type of event |
|
60 |
* 0 - RTP unicast packet sent |
|
61 |
* 1 - RTP multicast packet sent |
|
62 |
* 2 - RTCP unicast packet sent |
|
63 |
* 3 - RTCP multicast packet sent |
|
64 |
* |
|
65 |
* Description is a string that should be meaningful to advanced users, such as |
|
66 |
* |
|
67 |
* This function is synchonous and should return quickly. |
|
68 |
* |
|
69 |
* @param type , the type of event, see above |
|
70 |
* @param socket , taken directly from the UDP packet |
|
71 |
* @param description , see above |
|
72 |
*/ |
|
73 |
public void packetSent(int type, InetSocketAddress socket, String description); |
|
74 |
|
|
75 |
/** |
|
76 |
* Other important events that can occur in session |
|
77 |
* -1 SSRC conflict |
|
78 |
* 0 Session is terminating |
|
79 |
* @param type see above |
|
80 |
* @param description , see above |
|
81 |
*/ |
|
82 |
public void importantEvent(int type, String description); |
|
83 |
} |