jlibrtp
Class RtcpPktPSFB

java.lang.Object
  extended by jlibrtp.RtcpPkt
      extended by jlibrtp.RtcpPktPSFB

public class RtcpPktPSFB
extends RtcpPkt

RTCP packets for Payload-Specific Feedback Messages

Author:
Arne Kepp

Field Summary
protected  byte[] alfBitString
          Application Layer Feedback Message
protected  boolean notRelevant
          If this packet was for a different SSRC
protected  byte[] rpsiBitString
          RPSI information as natively defined by the video codec
protected  int rpsiPadding
          RPSI number of padded bits at end of bitString
protected  int rpsiPayloadType
          RPSI payloadType RTP payload type
private  RTPSession rtpSession
          Parent RTP Session
protected  int[] sliFirst
          SLI macroblock (MB) address of the first lost macroblock number
protected  int[] sliNumber
          SLI number of lost macroblocks
protected  int[] sliPictureId
          SLI six least significant bits of the codec-specific identifier
protected  long ssrcMediaSource
          SSRC we are sending feeback to
 
Fields inherited from class jlibrtp.RtcpPkt
itemCount, length, packetType, padding, problem, rawPkt, received, ssrc, time, version
 
Constructor Summary
protected RtcpPktPSFB(byte[] aRawPkt, int start, RTPSession rtpSession)
          Constructor that parses a raw packet to retrieve information
protected RtcpPktPSFB(long ssrcPacketSender, long ssrcMediaSource)
          Generic constructor, then call make
 
Method Summary
 void debugPrint()
          Debug purposes only
private  void decAppLayerFB(byte[] aRawPkt, int start)
          Decode Application specific feedback message
private  void decPictureLossIndic()
          Decode Picture Loss indication
private  void decRefPictureSelIndic(byte[] aRawPkt, int start)
          Decode Reference Picture Selection Indication
private  void decSliceLossIndic(byte[] aRawPkt, int start)
          Decode Slice Loss Indication
private  void encAppLayerFB()
          Encode Application Layer Feedback
protected  void encode()
          Encode the packet into a byte[], saved in .rawPkt CompRtcpPkt will call this automatically
private  void encRefPictureSelIndic()
          Encode a Reference Picture Selection Indication
private  void encSliceLossIndic()
          Encode a Slice Loss Indication
protected  int getFMT()
          Get the FMT (Feedback Message Type)
protected  void makeAppLayerFeedback(byte[] bitString)
          Make this packet an Application specific feedback message
protected  void makePictureLossIndication()
          Make this packet a Picture loss indication
protected  void makeRefPictureSelIndic(int bitPadding, int payloadType, byte[] bitString)
          Make this packet a Reference Picture Selection Indication
protected  void makeSliceLossIndication(int[] sliFirst, int[] sliNumber, int[] sliPictureId)
          Make this packet a Slice Loss Indication
 
Methods inherited from class jlibrtp.RtcpPkt
check, parseHeaders, writeHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

notRelevant

protected boolean notRelevant
If this packet was for a different SSRC


rtpSession

private RTPSession rtpSession
Parent RTP Session


ssrcMediaSource

protected long ssrcMediaSource
SSRC we are sending feeback to


sliFirst

protected int[] sliFirst
SLI macroblock (MB) address of the first lost macroblock number


sliNumber

protected int[] sliNumber
SLI number of lost macroblocks


sliPictureId

protected int[] sliPictureId
SLI six least significant bits of the codec-specific identifier


rpsiPadding

protected int rpsiPadding
RPSI number of padded bits at end of bitString


rpsiPayloadType

protected int rpsiPayloadType
RPSI payloadType RTP payload type


rpsiBitString

protected byte[] rpsiBitString
RPSI information as natively defined by the video codec


alfBitString

protected byte[] alfBitString
Application Layer Feedback Message

Constructor Detail

RtcpPktPSFB

protected RtcpPktPSFB(long ssrcPacketSender,
                      long ssrcMediaSource)
Generic constructor, then call make

Parameters:
ssrcPacketSender -
ssrcMediaSource -

RtcpPktPSFB

protected RtcpPktPSFB(byte[] aRawPkt,
                      int start,
                      RTPSession rtpSession)
Constructor that parses a raw packet to retrieve information

Parameters:
aRawPkt - the raw packet to be parsed
start - the start of the packet, in bytes
rtpSession - the session on which the callback interface resides
Method Detail

makePictureLossIndication

protected void makePictureLossIndication()
Make this packet a Picture loss indication


makeSliceLossIndication

protected void makeSliceLossIndication(int[] sliFirst,
                                       int[] sliNumber,
                                       int[] sliPictureId)
Make this packet a Slice Loss Indication

Parameters:
sliFirst - macroblock (MB) address of the first lost macroblock
sliNumber - number of lost macroblocks
sliPictureId - six least significant bits of the codec-specific identifier

makeRefPictureSelIndic

protected void makeRefPictureSelIndic(int bitPadding,
                                      int payloadType,
                                      byte[] bitString)
Make this packet a Reference Picture Selection Indication

Parameters:
bitPadding - number of padded bits at end of bitString
payloadType - RTP payload type for codec
bitString - RPSI information as natively defined by the video codec

makeAppLayerFeedback

protected void makeAppLayerFeedback(byte[] bitString)
Make this packet an Application specific feedback message

Parameters:
bitString - the original application message

decPictureLossIndic

private void decPictureLossIndic()
Decode Picture Loss indication


decSliceLossIndic

private void decSliceLossIndic(byte[] aRawPkt,
                               int start)
Decode Slice Loss Indication

Parameters:
aRawPkt -
start -

decRefPictureSelIndic

private void decRefPictureSelIndic(byte[] aRawPkt,
                                   int start)
Decode Reference Picture Selection Indication

Parameters:
aRawPkt -
start -

decAppLayerFB

private void decAppLayerFB(byte[] aRawPkt,
                           int start)
Decode Application specific feedback message

Parameters:
aRawPkt -
start -

encSliceLossIndic

private void encSliceLossIndic()
Encode a Slice Loss Indication


encRefPictureSelIndic

private void encRefPictureSelIndic()
Encode a Reference Picture Selection Indication


encAppLayerFB

private void encAppLayerFB()
Encode Application Layer Feedback


getFMT

protected int getFMT()
Get the FMT (Feedback Message Type)

Returns:
value stored in .itemcount, same field

encode

protected void encode()
Encode the packet into a byte[], saved in .rawPkt CompRtcpPkt will call this automatically

Overrides:
encode in class RtcpPkt

debugPrint

public void debugPrint()
Debug purposes only