diff --git a/include/re_rtp.h b/include/re_rtp.h index ad9e02b..1ab9efc 100644 --- a/include/re_rtp.h +++ b/include/re_rtp.h @@ -67,6 +67,7 @@ enum rtcp_rtpfb { enum rtcp_psfb { RTCP_PSFB_PLI = 1, /**< Picture Loss Indication (PLI) */ RTCP_PSFB_SLI = 2, /**< Slice Loss Indication (SLI) */ + RTCP_PSFB_AFB = 15, /**< Application layer Feedback Messages */ }; /** Reception report block */ @@ -164,6 +165,7 @@ struct rtcp_msg { uint16_t number; uint8_t picid; } *sliv; + struct mbuf *afb; void *p; } fci; } fb; diff --git a/src/rtp/fb.c b/src/rtp/fb.c index 9d9d011..a0f94b3 100644 --- a/src/rtp/fb.c +++ b/src/rtp/fb.c @@ -146,6 +146,18 @@ int rtcp_psfb_decode(struct mbuf *mb, struct rtcp_msg *msg) } break; + case RTCP_PSFB_AFB: + if (mbuf_get_left(mb) < 4) + return EBADMSG; + + msg->r.fb.fci.afb = mbuf_alloc_ref(mb); + if (!msg->r.fb.fci.afb) + return ENOMEM; + + sz = msg->r.fb.n * 4; + msg->r.fb.fci.afb->end = msg->r.fb.fci.afb->pos + sz; + break; + default: DEBUG_NOTICE("unknown PSFB fmt %d\n", msg->hdr.count); break; diff --git a/src/rtp/rtcp.c b/src/rtp/rtcp.c index caf9b66..6e708de 100644 --- a/src/rtp/rtcp.c +++ b/src/rtp/rtcp.c @@ -268,6 +268,10 @@ int rtcp_msg_print(struct re_printf *pf, const struct rtcp_msg *msg) msg->r.fb.fci.sliv[i].picid); } } + else if (msg->hdr.count == RTCP_PSFB_AFB) { + err |= re_hprintf(pf, " AFB %u bytes", + msg->r.fb.n * 4); + } break; default: