fix MODAPP-3
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6037 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2414ad8c69
commit
673b1cff3b
|
@ -632,6 +632,7 @@ SFF_CNG = (1 << 0) - Frame represents comfort noise
|
|||
SFF_RAW_RTP = (1 << 1) - Frame has raw rtp accessible
|
||||
SFF_RTP_HEADER = (1 << 2) - Get the rtp header from the frame header
|
||||
SFF_PLC = (1 << 3) - Frame has generated PLC data
|
||||
SFF_RFC2833 = (1 << 4) - Frame has rfc2833 dtmf data
|
||||
</pre>
|
||||
*/
|
||||
typedef enum {
|
||||
|
@ -639,7 +640,8 @@ typedef enum {
|
|||
SFF_CNG = (1 << 0),
|
||||
SFF_RAW_RTP = (1 << 1),
|
||||
SFF_RTP_HEADER = (1 << 2),
|
||||
SFF_PLC = (1 << 3)
|
||||
SFF_PLC = (1 << 3),
|
||||
SFF_RFC2833 = (1 << 4)
|
||||
} switch_frame_flag_t;
|
||||
|
||||
|
||||
|
|
|
@ -1219,6 +1219,9 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
|
|||
frame->packetlen = bytes;
|
||||
frame->source = __FILE__;
|
||||
frame->flags |= SFF_RAW_RTP;
|
||||
if (frame->payload == rtp_session->te) {
|
||||
frame->flags |= SFF_RFC2833;
|
||||
}
|
||||
frame->timestamp = ntohl(rtp_session->recv_msg.header.ts);
|
||||
frame->seq = (uint16_t)ntohs((u_short)rtp_session->recv_msg.header.seq);
|
||||
frame->ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
|
||||
|
@ -1282,8 +1285,15 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
|
|||
if (fwd) {
|
||||
bytes = datalen;
|
||||
send_msg = (rtp_msg_t *) data;
|
||||
if (*flags & SFF_RFC2833) {
|
||||
send_msg->header.pt = rtp_session->te;
|
||||
}
|
||||
} else {
|
||||
uint8_t m = 0;
|
||||
|
||||
if (*flags & SFF_RFC2833) {
|
||||
payload = rtp_session->te;
|
||||
}
|
||||
|
||||
if ((rtp_session->ts > (rtp_session->last_write_ts + (rtp_session->samples_per_interval * 10)))
|
||||
|| rtp_session->ts == rtp_session->samples_per_interval) {
|
||||
|
|
Loading…
Reference in New Issue