summaryrefslogtreecommitdiff
path: root/pjmedia/include/pjmedia/transport.h
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2008-05-02 14:50:07 +0000
committerNanang Izzuddin <nanang@teluu.com>2008-05-02 14:50:07 +0000
commiteff8a969db870c51c1d86f82384de086d9186b25 (patch)
tree720d785fe7605ca4752c9fc4a66e18f0240f4f6f /pjmedia/include/pjmedia/transport.h
parentdc883a480f6dcf1e7c7a389675e3fc312b3f8e24 (diff)
Ticket #528: committed ticket528.patch
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1944 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia/transport.h')
-rw-r--r--pjmedia/include/pjmedia/transport.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/transport.h b/pjmedia/include/pjmedia/transport.h
index 19869a9b..51bab86c 100644
--- a/pjmedia/include/pjmedia/transport.h
+++ b/pjmedia/include/pjmedia/transport.h
@@ -306,6 +306,20 @@ struct pjmedia_transport_op
pj_size_t size);
/**
+ * This function is called by the stream to send RTCP packet using the
+ * transport with destination address other than default specified in
+ * #pjmedia_transport_attach().
+ *
+ * Application should call #pjmedia_transport_send_rtcp2() instead of
+ * calling this function directly.
+ */
+ pj_status_t (*send_rtcp2)(pjmedia_transport *tp,
+ const pj_sockaddr_t *addr,
+ unsigned addr_len,
+ const void *pkt,
+ pj_size_t size);
+
+ /**
* This function is called by application to generate the SDP parts
* related to transport type, e.g: ICE, SRTP.
*
@@ -587,6 +601,31 @@ PJ_INLINE(pj_status_t) pjmedia_transport_send_rtcp(pjmedia_transport *tp,
/**
+ * Send RTCP packet with the specified media transport. This is just a simple
+ * wrapper which calls <tt>send_rtcp2()</tt> member of the transport. The
+ * RTCP packet will be delivered to the destination address specified in
+ * param addr, if addr is NULL, RTCP packet will be delivered to destination
+ * address specified in #pjmedia_transport_attach() function.
+ *
+ * @param tp The media transport.
+ * @param addr The destination address.
+ * @param addr_len Length of destination address.
+ * @param pkt The packet to send.
+ * @param size Size of the packet.
+ *
+ * @return PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_INLINE(pj_status_t) pjmedia_transport_send_rtcp2(pjmedia_transport *tp,
+ const pj_sockaddr_t *addr,
+ unsigned addr_len,
+ const void *pkt,
+ pj_size_t size)
+{
+ return (*tp->op->send_rtcp2)(tp, addr, addr_len, pkt, size);
+}
+
+
+/**
* Generate local SDP parts that are related to the specified media transport.
* Remote SDP might be needed as reference when application is in deciding
* side of negotiation (callee side), otherwise it should be NULL.