fixed VOIP compilation (patch from electron)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7803 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-12-30 14:26:04 +00:00
parent 530fcab61d
commit 326d91d4c7
5 changed files with 12 additions and 6 deletions

View File

@ -33,7 +33,7 @@ void PluginGUIHandler::ReceivedVoipData(const QString& qpeer_id)
return ;
}
ChatDialog *di = ChatDialog::getExistingChat(peer_id) ;
ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ;
if (di) {
ChatWidget *cw = di->getChatWidget();
if (cw) {
@ -74,7 +74,7 @@ void PluginGUIHandler::ReceivedVoipBandwidthInfo(const QString& qpeer_id,int byt
{
RsPeerId peer_id(qpeer_id.toStdString()) ;
ChatDialog *di = ChatDialog::getExistingChat(peer_id) ;
ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ;
std::cerr << "PluginGUIHandler::received bw info for peer " << qpeer_id.toStdString() << ": " << bytes_per_sec << " Bps" << std::endl;
if(!di)

View File

@ -304,7 +304,7 @@ void VOIPChatWidgetHolder::sendVideoData()
RsVoipDataChunk chunk ;
while(inputVideoDevice && inputVideoDevice->getNextEncodedPacket(chunk))
rsVoip->sendVoipData(mChatWidget->getPeerId(),chunk) ;
rsVoip->sendVoipData(mChatWidget->getChatId().toPeerId(),chunk) ;
}
void VOIPChatWidgetHolder::sendAudioData()
@ -315,7 +315,7 @@ void VOIPChatWidgetHolder::sendAudioData()
chunk.size = qbarray.size();
chunk.data = (void*)qbarray.constData();
chunk.type = RsVoipDataChunk::RS_VOIP_DATA_TYPE_AUDIO ;
rsVoip->sendVoipData(mChatWidget->getPeerId(),chunk);
rsVoip->sendVoipData(mChatWidget->getChatId().toPeerId(),chunk);
}
}

View File

@ -1,5 +1,5 @@
TEMPLATE = subdirs
SUBDIRS += \
#VOIP \
#FeedReader
VOIP \
FeedReader

View File

@ -306,6 +306,11 @@ void ChatWidget::init(const ChatId &chat_id, const QString &title)
processSettings(true);
}
ChatId ChatWidget::getChatId()
{
return chatId;
}
ChatWidget::ChatType ChatWidget::chatType()
{
// transformation from ChatId::Type to ChatWidget::ChatType

View File

@ -72,6 +72,7 @@ public:
~ChatWidget();
void init(const ChatId &chat_id, const QString &title);
ChatId getChatId();
ChatType chatType();
bool hasNewMessages() { return newMessages; }