src/jlibrtp/RTCPAVPFIntf.java
changeset 823 2036ebfaccda
equal deleted inserted replaced
536:537ddd8aa407 823:2036ebfaccda
       
     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 
       
    20 package jlibrtp;
       
    21 
       
    22 /**
       
    23  * This is the callback interface for the AVPF profile (RFC 4585)
       
    24  * 
       
    25  * It is optional, you do not have to register it.
       
    26  * 
       
    27  * If there are specific events you wish to ignore, you can simply implement
       
    28  * empty functions.
       
    29  * 
       
    30  * These are all syncrhonous, make sure to return quickly or do the handling in
       
    31  * a new thread.
       
    32  * 
       
    33  * @author Arne Kepp
       
    34  */
       
    35 public interface RTCPAVPFIntf {
       
    36 
       
    37 	/**
       
    38 	 * This function is called when a Picture Loss Indication (PLI, FMT = 1) is
       
    39 	 * received
       
    40 	 * 
       
    41 	 * @param ssrcPacketSender
       
    42 	 *            the SSRC of the participant reporting loss of picture
       
    43 	 */
       
    44 	public void PSFBPktPictureLossReceived(long ssrcPacketSender);
       
    45 
       
    46 	/**
       
    47 	 * This function is called when a Slice Loss Indication (SLI, FMT=2) is
       
    48 	 * received
       
    49 	 * 
       
    50 	 * @param ssrcPacketSender
       
    51 	 *            the SSRC of the participant reporting loss of slice(s)
       
    52 	 * @param sliceFirst
       
    53 	 *            macroblock address of first macroblock
       
    54 	 * @param sliceNumber
       
    55 	 *            number of lost macroblocks, in scan order
       
    56 	 * @param slicePictureId
       
    57 	 *            the six least significant bits of the picture identifier
       
    58 	 */
       
    59 	public void PSFBPktSliceLossIndic(long ssrcPacketSender, int[] sliceFirst,
       
    60 			int[] sliceNumber, int[] slicePictureId);
       
    61 
       
    62 	/**
       
    63 	 * This function is called when a Reference Picture Selection Indication
       
    64 	 * (RPSI, FMT=3) is received
       
    65 	 * 
       
    66 	 * @param ssrcPacketSender
       
    67 	 *            the SSRC of the participant reporting the selection
       
    68 	 * @param rpsiPayloadType
       
    69 	 *            the RTP payload type related to the RPSI bit string
       
    70 	 * @param rpsiBitString
       
    71 	 *            the RPSI information as natively defined by the video codec
       
    72 	 * @param rpsiPaddingBits
       
    73 	 *            the number of padding bits at the end of the string
       
    74 	 */
       
    75 	public void PSFBPktRefPictureSelIndic(long ssrcPacketSender,
       
    76 			int rpsiPayloadType, byte[] rpsiBitString, int rpsiPaddingBits);
       
    77 
       
    78 	/**
       
    79 	 * This function is called when a Transport Layer Feedback Messages is
       
    80 	 * received
       
    81 	 * 
       
    82 	 * @param ssrcPacketSender
       
    83 	 * @param alfBitString
       
    84 	 */
       
    85 	public void PSFBPktAppLayerFBReceived(long ssrcPacketSender,
       
    86 			byte[] alfBitString);
       
    87 
       
    88 	/**
       
    89 	 * This function is called when a Transport Layer Feedback Messages is
       
    90 	 * received
       
    91 	 * 
       
    92 	 * @param ssrcPacketSender
       
    93 	 * @param FMT
       
    94 	 *            1: NACK, 0,2-30: unassigned, 31: reserved
       
    95 	 * @param packetID
       
    96 	 *            the RTP sequence number of the lost packet
       
    97 	 * @param bitmaskLostPackets
       
    98 	 *            the bitmask of following lost packets
       
    99 	 */
       
   100 	public void RTPFBPktReceived(long ssrcPacketSender, int FMT,
       
   101 			int[] packetID, int[] bitmaskLostPackets);
       
   102 }