diff options
Diffstat (limited to 'pjmedia/include/pjmedia/transport_udp.h')
-rw-r--r-- | pjmedia/include/pjmedia/transport_udp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/transport_udp.h b/pjmedia/include/pjmedia/transport_udp.h index 860ea7e3..5a348d32 100644 --- a/pjmedia/include/pjmedia/transport_udp.h +++ b/pjmedia/include/pjmedia/transport_udp.h @@ -144,8 +144,30 @@ PJ_DECL(pj_status_t) pjmedia_transport_udp_attach(pjmedia_endpt *endpt, /** + * Simulate packet lost in the specified direction (for testing purposes). + * When enabled, the transport will randomly drop packets to the specified + * direction. + * + * @param tp The UDP media transport. + * @param dir Media direction to which packets will be randomly dropped. + * @param pct_lost Percent lost (0-100). Set to zero to disable packet + * lost simulation. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_transport_udp_simulate_lost(pjmedia_transport *tp, + pjmedia_dir dir, + unsigned pct_lost); + + + +/** * Close UDP transport. Application can also use the "destroy" member of * media transport interface to close the UDP transport. + * + * @param tp The UDP media transport. + * + * @return PJ_SUCCESS on success. */ PJ_DECL(pj_status_t) pjmedia_transport_udp_close(pjmedia_transport *tp); |