summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-01-20 22:38:18 +0000
committerHenri Herscher <henri@oreka.org>2006-01-20 22:38:18 +0000
commite07f34274b8912f773993ed96624242115440a3b (patch)
tree6b2f35398ceb7ff5c6a5afc9991f9a3670cb3a27 /orkaudio/audiocaptureplugins/voip/RtpSession.cpp
parent4ab4f3d3b2f0c3c51922eaeea49df162a9c892cd (diff)
VoIP mixing and decoding does now happen in the batch processing thread instead of immediately. Additionally, the system now supports filter plugins such as codecs.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@120 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index 9065eb4..2cac30c 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -237,6 +237,7 @@ void RtpSession::ReportMetadata()
void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
{
CStdString logMsg;
+ unsigned char channel = 0;
if(m_lastRtpPacket.get() == NULL)
{
@@ -262,6 +263,7 @@ void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
{
// First RTP packet for side 1
m_lastRtpPacketSide1 = rtpPacket;
+ channel = 1;
if(m_log->isInfoEnabled())
{
rtpPacket->ToString(logMsg);
@@ -274,6 +276,7 @@ void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
if(rtpPacket->m_sourceIp.s_addr == m_lastRtpPacketSide1->m_sourceIp.s_addr)
{
m_lastRtpPacketSide1 = rtpPacket;
+ channel = 1;
}
else
{
@@ -288,6 +291,7 @@ void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
}
}
m_lastRtpPacketSide2 = rtpPacket;
+ channel = 2;
}
}
@@ -333,7 +337,19 @@ void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
if(m_started)
{
- m_rtpRingBuffer.AddRtpPacket(rtpPacket);
+ AudioChunkDetails details;
+ details.m_arrivalTimestamp = rtpPacket->m_arrivalTimestamp;
+ details.m_numBytes = rtpPacket->m_payloadSize;
+ details.m_timestamp = rtpPacket->m_timestamp;
+ details.m_rtpPayloadType = rtpPacket->m_payloadType;
+ details.m_sequenceNumber = rtpPacket->m_seqNum;
+ details.m_channel = channel;
+ details.m_encoding = AlawAudio;
+ AudioChunkRef chunk(new AudioChunk());
+ chunk->SetBuffer(rtpPacket->m_payload, rtpPacket->m_payloadSize, details);
+ g_audioChunkCallBack(chunk, m_capturePort); // ##### after
+ //m_rtpRingBuffer.AddRtpPacket(rtpPacket); // ##### before
+
m_lastUpdated = rtpPacket->m_arrivalTimestamp;
}
}