Esempio n. 1
0
  /**
   * Adds a Picture Loss Indication to the feedback queue
   *
   * @param ssrcMediaSource
   * @param bitString the original application message
   * @return 0 if packet was queued, -1 if no feedback support, 1 if redundant
   */
  public int fbAppLayerFeedback(long ssrcMediaSource, byte[] bitString) {
    int ret = 0;

    if (this.rtcpAVPFIntf == null) return -1;

    RtcpPktPSFB pkt = new RtcpPktPSFB(this.ssrc, ssrcMediaSource);
    pkt.makeAppLayerFeedback(bitString);
    ret = this.rtcpSession.addToFbQueue(ssrcMediaSource, pkt);
    if (ret == 0) this.rtcpSession.wakeSenderThread(ssrcMediaSource);
    return ret;
  }
Esempio n. 2
0
  /**
   * Adds a Picture Loss Indication to the feedback queue
   *
   * @param ssrcMediaSource
   * @return 0 if packet was queued, -1 if no feedback support, 1 if redundant
   */
  public int fbPictureLossIndication(long ssrcMediaSource) {
    int ret = 0;

    if (this.rtcpAVPFIntf == null) return -1;

    RtcpPktPSFB pkt = new RtcpPktPSFB(this.ssrc, ssrcMediaSource);
    pkt.makePictureLossIndication();
    ret = this.rtcpSession.addToFbQueue(ssrcMediaSource, pkt);
    if (ret == 0) this.rtcpSession.wakeSenderThread(ssrcMediaSource);
    return ret;
  }
Esempio n. 3
0
  /**
   * Adds a Reference Picture Selection Indication to the feedback queue
   *
   * @param ssrcMediaSource
   * @param bitPadding number of padded bits at end of bitString
   * @param payloadType RTP payload type for codec
   * @param bitString RPSI information as natively defined by the video codec
   * @return 0 if packet was queued, -1 if no feedback support, 1 if redundant
   */
  public int fbRefPictureSelIndic(
      long ssrcMediaSource, int bitPadding, int payloadType, byte[] bitString) {
    int ret = 0;

    if (this.rtcpAVPFIntf == null) return -1;

    RtcpPktPSFB pkt = new RtcpPktPSFB(this.ssrc, ssrcMediaSource);
    pkt.makeRefPictureSelIndic(bitPadding, payloadType, bitString);
    ret = this.rtcpSession.addToFbQueue(ssrcMediaSource, pkt);
    if (ret == 0) this.rtcpSession.wakeSenderThread(ssrcMediaSource);
    return ret;
  }
Esempio n. 4
0
  /**
   * Adds a Slice Loss Indication to the feedback queue
   *
   * @param ssrcMediaSource
   * @param sliFirst macroblock (MB) address of the first lost macroblock
   * @param sliNumber number of lost macroblocks
   * @param sliPictureId six least significant bits of the codec-specific identif
   * @return 0 if packet was queued, -1 if no feedback support, 1 if redundant
   */
  public int fbSlicLossIndication(
      long ssrcMediaSource, int[] sliFirst, int[] sliNumber, int[] sliPictureId) {
    int ret = 0;
    if (this.rtcpAVPFIntf == null) return -1;

    RtcpPktPSFB pkt = new RtcpPktPSFB(this.ssrc, ssrcMediaSource);
    pkt.makeSliceLossIndication(sliFirst, sliNumber, sliPictureId);

    ret = this.rtcpSession.addToFbQueue(ssrcMediaSource, pkt);
    if (ret == 0) this.rtcpSession.wakeSenderThread(ssrcMediaSource);
    return ret;
  }