diff --git a/daemon/src/audio/audiortp/AudioRtpSession.cpp b/daemon/src/audio/audiortp/AudioRtpSession.cpp index 38941cc2030b0e1585e51762a8db8a2be7896488..5a6c6d82f6f88d6d850a9d60b98c65eb85c64c3a 100644 --- a/daemon/src/audio/audiortp/AudioRtpSession.cpp +++ b/daemon/src/audio/audiortp/AudioRtpSession.cpp @@ -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) + , _isStarted (false) , _queue(queue) , _thread(thread) { diff --git a/daemon/src/audio/audiortp/AudioRtpSession.h b/daemon/src/audio/audiortp/AudioRtpSession.h index d5f14c662c86b7cc664828de85e904a4989c5178..1e737196d301c4df9c98d384a0a41de16b6f6cd6 100644 --- a/daemon/src/audio/audiortp/AudioRtpSession.h +++ b/daemon/src/audio/audiortp/AudioRtpSession.h @@ -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;