src/jlibrtp/DebugAppIntf.java
changeset 834 e8d6255306f8
parent 833 f5a5d9237d69
child 835 4e40f3481f23
equal deleted inserted replaced
833:f5a5d9237d69 834:e8d6255306f8
     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 
       
    21 import java.net.InetSocketAddress;
       
    22 
       
    23 /**
       
    24  * DebugAppIntf can be registered on RTPSession to provide simple debugging
       
    25  * functionality. This is particularly useful to determine whether the client is
       
    26  * receing any data at all.
       
    27  * 
       
    28  * @author Arne Kepp
       
    29  * 
       
    30  */
       
    31 
       
    32 public interface DebugAppIntf {
       
    33 	/**
       
    34 	 * This function wil notify you of any packets received, valid or not.
       
    35 	 * Useful for network debugging, and finding bugs in jlibrtp.
       
    36 	 * 
       
    37 	 * Type is an integer describing the type of event -2 - Invalid RTCP packet
       
    38 	 * received -1 - Invalid RTP packet received 0 - RTP packet received 1 -
       
    39 	 * RTCP packet received
       
    40 	 * 
       
    41 	 * Description is a string that should be meaningful to advanced users, such
       
    42 	 * as"RTP packet received from 127.0.0.1:12312, SSRC: 1380912 , payload type 1, packet size 16 octets"
       
    43 	 * or "Invalid RTP packet received from 127.0.0.1:12312"
       
    44 	 * 
       
    45 	 * This function is synchonous and should return quickly.
       
    46 	 * 
       
    47 	 * @param type
       
    48 	 *            , the type of event, see above.
       
    49 	 * @param socket
       
    50 	 *            , taken directly from the UDP packet
       
    51 	 * @param description
       
    52 	 *            , see above.
       
    53 	 */
       
    54 	public void packetReceived(int type, InetSocketAddress socket,
       
    55 			String description);
       
    56 
       
    57 	/**
       
    58 	 * This function will notify you of any packets sent from this instance of
       
    59 	 * RTPSession. Useful for network debugging, and finding bugs in jlibrtp.
       
    60 	 * 
       
    61 	 * Type is an integer describing the type of event 0 - RTP unicast packet
       
    62 	 * sent 1 - RTP multicast packet sent 2 - RTCP unicast packet sent 3 - RTCP
       
    63 	 * multicast packet sent
       
    64 	 * 
       
    65 	 * Description is a string that should be meaningful to advanced users, such
       
    66 	 * as
       
    67 	 * 
       
    68 	 * This function is synchonous and should return quickly.
       
    69 	 * 
       
    70 	 * @param type
       
    71 	 *            , the type of event, see above
       
    72 	 * @param socket
       
    73 	 *            , taken directly from the UDP packet
       
    74 	 * @param description
       
    75 	 *            , see above
       
    76 	 */
       
    77 	public void packetSent(int type, InetSocketAddress socket,
       
    78 			String description);
       
    79 
       
    80 	/**
       
    81 	 * Other important events that can occur in session -1 SSRC conflict 0
       
    82 	 * Session is terminating
       
    83 	 * 
       
    84 	 * @param type
       
    85 	 *            see above
       
    86 	 * @param description
       
    87 	 *            , see above
       
    88 	 */
       
    89 	public void importantEvent(int type, String description);
       
    90 }