Commit d6940be7 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix compile error

parent bf18ff84
......@@ -22,13 +22,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define msrtp_hh
#include <mediastreamer2/msfilter.h>
#include <mediastreamer2/msvaddtx.h>
#include <ortp/ortp.h>
#define MS_RTP_RECV_SET_SESSION MS_FILTER_METHOD(MS_RTP_RECV_ID,0,RtpSession*)
#define MS_RTP_RECV_RESET_JITTER_BUFFER MS_FILTER_METHOD_NO_ARG(MS_RTP_RECV_ID,1)
#define MS_RTP_RECV_GENERIC_CN_RECEIVED MS_FILTER_EVENT(MS_RTP_RECV_ID,0, MSCngData)
#define MS_RTP_SEND_SET_SESSION MS_FILTER_METHOD(MS_RTP_SEND_ID,0,RtpSession*)
......@@ -43,6 +44,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_RTP_SEND_SET_RELAY_SESSION_ID MS_FILTER_METHOD(MS_RTP_SEND_ID,5,const char *)
#define MS_RTP_SEND_SEND_GENERIC_CN MS_FILTER_METHOD(MS_RTP_SEND_ID,5, const MSCngData)
......
......@@ -117,7 +117,6 @@ static void update_recv_stream(RtpSession *session, srtp_t srtp, uint32_t new_ss
*/
static int _process_on_receive(RtpSession* session,srtp_t srtp,mblk_t *m,bool_t is_rtp, int err){
int slen;
uint32_t new_ssrc;
err_status_t srtp_err;
/* keep NON-RTP data unencrypted */
......@@ -125,12 +124,10 @@ static int _process_on_receive(RtpSession* session,srtp_t srtp,mblk_t *m,bool_t
rtp_header_t *rtp=(rtp_header_t*)m->b_rptr;
if (err<RTP_FIXED_HEADER_SIZE || rtp->version!=2 )
return err;
new_ssrc=rtp->ssrc;
}else{
rtcp_common_header_t *rtcp=(rtcp_common_header_t*)m->b_rptr;
if (err<(sizeof(rtcp_common_header_t)+4) || rtcp->version!=2 )
return err;
new_ssrc=*(uint32_t*)(m->b_rptr+sizeof(rtcp_common_header_t));
}
slen=err;
......
......@@ -45,6 +45,7 @@ struct SenderData {
int relay_session_id_size;
uint64_t last_rsi_time;
char dtmf;
MSCngData cng_data;
bool_t dtmf_start;
bool_t skip;
bool_t mute;
......@@ -431,6 +432,13 @@ static void sender_process(MSFilter * f){
else _sender_process(f);
}
static int sender_send_generic_cn(MSFilter *f, void *data){
SenderData *d = (SenderData *) f->data;
ms_filter_lock(f);
memcpy(&d->cng_data, data, sizeof(MSCngData));
ms_filter_unlock(f);
return 0;
}
static MSFilterMethod sender_methods[] = {
{MS_RTP_SEND_MUTE, sender_mute},
......@@ -441,6 +449,7 @@ static MSFilterMethod sender_methods[] = {
{MS_FILTER_GET_SAMPLE_RATE, sender_get_sr },
{MS_FILTER_GET_NCHANNELS, sender_get_ch },
{MS_RTP_SEND_SET_DTMF_DURATION, sender_set_dtmf_duration },
{MS_RTP_SEND_SEND_GENERIC_CN, sender_send_generic_cn },
{0, NULL}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment