rtp: added rtcp application feedback support
This commit is contained in:
parent
20a43ff3c3
commit
ea44ed1506
3 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
|
|
12
src/rtp/fb.c
12
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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue