/** Implements {@link PacketTransformer#transform(RawPacket[])}. {@inheritDoc} */
  @Override
  public RawPacket transform(RawPacket pkt) {
    byte rtxPt;
    if (pkt != null
        && (rtxPt = channel.getRtxPayloadType()) != -1
        && pkt.getPayloadType() == rtxPt) {
      pkt = handleRtxPacket(pkt);
    }

    return pkt;
  }
Beispiel #2
0
 private void handleRtpPacket(RawPacket pkt) {
   if (pkt != null && pkt.getPayloadType() == vp8PayloadType) {
     int ssrc = pkt.getSSRC();
     if (!activeVideoSsrcs.contains(ssrc & 0xffffffffL)) {
       synchronized (activeVideoSsrcs) {
         if (!activeVideoSsrcs.contains(ssrc & 0xffffffffL)) {
           activeVideoSsrcs.add(ssrc & 0xffffffffL);
           rtcpFeedbackSender.sendFIR(ssrc);
         }
       }
     }
   }
 }
 /**
  * Determines whether {@code pkt} is an RTX packet.
  *
  * @param pkt the packet to check.
  * @return {@code true} iff {@code pkt} is an RTX packet.
  */
 private boolean isRtx(RawPacket pkt) {
   byte rtxPt = rtxPayloadType;
   return rtxPt != -1 && rtxPt == pkt.getPayloadType();
 }