Skip to content
Snippets Groups Projects
Commit ff313727 authored by Rafaël Carré's avatar Rafaël Carré Committed by Tristan Matthews
Browse files

AudioRtpSession : privatize members

parent 0105c75e
No related branches found
No related tags found
No related merge requests found
......@@ -45,11 +45,11 @@ namespace sfl
AudioRtpSession::AudioRtpSession (SIPCall * sipcall, RtpMethod type, ost::RTPDataQueue *queue, ost::Thread *thread) :
AudioRtpRecordHandler (sipcall)
, _ca (sipcall)
, _type(type)
, _timestamp (0)
, _timestampIncrement (0)
, _timestampCount (0)
, _isStarted (false)
, _type(type)
, _queue(queue)
, _thread(thread)
{
......
......@@ -67,6 +67,17 @@ class AudioRtpSession : public AudioRtpRecordHandler
RtpMethod getAudioRtpType() { return _type; }
void updateSessionMedia (AudioCodec *audioCodec);
int startRtpThread (AudioCodec*);
/**
* Used mostly when receiving a reinvite
*/
void updateDestinationIpAddress (void);
protected:
bool onRTPPacketRecv (ost::IncomingRTPPkt&);
/**
* Send DTMF over RTP (RFC2833). The timestamp and sequence number must be
* incremented as if it was microphone audio. This function change the payload type of the rtp session,
......@@ -76,19 +87,20 @@ class AudioRtpSession : public AudioRtpRecordHandler
void sendDtmfEvent (sfl::DtmfEvent *dtmf);
/**
* Used mostly when receiving a reinvite
* Send encoded data to peer
*/
void updateDestinationIpAddress (void);
int startRtpThread (AudioCodec*);
void sendMicData();
void stopRtpThread (void);
SIPCall *_ca;
bool onRTPPacketRecv (ost::IncomingRTPPkt&);
RtpMethod _type;
private:
protected:
/**
* Set the audio codec for this RTP session
*/
void setSessionMedia (AudioCodec*);
/**
* Set RTP Sockets send/receive timeouts
......@@ -106,25 +118,11 @@ class AudioRtpSession : public AudioRtpRecordHandler
*/
void receiveSpeakerData ();
/**
* Send encoded data to peer
*/
void sendMicData();
/**
* Set the audio codec for this RTP session
*/
void setSessionMedia (AudioCodec*);
SIPCall *_ca;
// Main destination address for this rtp session.
// Stored in case or reINVITE, which may require to forget
// this destination and update a new one.
ost::InetHostAddress _remote_ip;
// Main destination port for this rtp session.
// Stored in case reINVITE, which may require to forget
// this destination and update a new one
......@@ -142,15 +140,13 @@ class AudioRtpSession : public AudioRtpRecordHandler
int _timestampIncrement;
/**
* Timestamp reset freqeuncy specified in number of packet sent
* Timestamp reset frequency specified in number of packet sent
*/
short _timestampCount;
bool _isStarted;
RtpMethod _type;
ost::RTPDataQueue *_queue;
ost::Thread *_thread;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment