mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 13:07:06 +00:00
1 of many PRI/SIP gateway related updates
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@653 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
45d1b5cc87
commit
3dcc973c9d
4 files changed
+64
-3
No files matched your search
@@ -113,12 +113,14 @@ extern "C" {
|
||||
jrtp4c->session->AbortWait();
|
||||
}
|
||||
|
||||
int jrtp4c_read(struct jrtp4c *jrtp4c, void *data, int datalen)
|
||||
int jrtp4c_read(struct jrtp4c *jrtp4c, void *data, int datalen, int *payload_type)
|
||||
{
|
||||
RTPPacket *pack;
|
||||
int slen = 0;
|
||||
bool hasdata = 0;
|
||||
|
||||
*payload_type = 0;
|
||||
|
||||
jrtp4c->session->BeginDataAccess();
|
||||
|
||||
jrtp4c->session->WaitForIncomingData(RTPTime(.5), &hasdata);
|
||||
@@ -136,7 +138,11 @@ extern "C" {
|
||||
slen = datalen;
|
||||
}
|
||||
|
||||
|
||||
*payload_type = pack->GetPayloadType();
|
||||
|
||||
memcpy(data, pack->GetPayloadData(), slen);
|
||||
|
||||
delete pack;
|
||||
}
|
||||
jrtp4c->session->EndDataAccess();
|
||||
|
||||
@@ -49,7 +49,7 @@ extern "C" {
|
||||
struct jrtp4c;
|
||||
struct jrtp4c *jrtp4c_new(char *rx_ip, int rx_port, char *tx_ip, int tx_port, int payload, int sps, const char **err);
|
||||
void jrtp4c_destroy(struct jrtp4c **jrtp4c);
|
||||
int jrtp4c_read(struct jrtp4c *jrtp4c, void *data, int datalen);
|
||||
int jrtp4c_read(struct jrtp4c *jrtp4c, void *data, int datalen, int *payload_type);
|
||||
int jrtp4c_write(struct jrtp4c *jrtp4c, void *data, int datalen, uint32_t ts);
|
||||
uint32_t jrtp4c_start(struct jrtp4c *jrtp4c);
|
||||
uint32_t jrtp4c_get_ssrc(struct jrtp4c *jrtp4c);
|
||||
|
||||
Reference in new issue
Block a user