本文整理汇总了C++中Codec::getFrameSize方法的典型用法代码示例。如果您正苦于以下问题:C++ Codec::getFrameSize方法的具体用法?C++ Codec::getFrameSize怎么用?C++ Codec::getFrameSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Codec
的用法示例。
在下文中一共展示了Codec::getFrameSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remoteStartTransmission
void Mixer::remoteStartTransmission(const ::Ice::Current& curr) {
stringstream a;
stringstream b;
LOG4CXX_DEBUG(logger, string("Mixer::remoteStartTransmission()"));
IPV4Address *tmpAddr = new IPV4Address(getRemoteAddressFromConnection(curr.con));
a << string("Mixer::remoteStartTransmission() rem hostAddr: ") << tmpAddr->getHostname();
LOG4CXX_DEBUG(logger, a.str());
TerminalInfo *info = remoteHostsM[tmpAddr->getHostname()];
if (remoteHostsM.find(tmpAddr->getHostname()) == remoteHostsM.end() ) {
cout << "ERROR info not found\n";
}
if (this->currentState != States::PASSIVE_CONNECTED) {
LOG4CXX_DEBUG(logger, string("Mixer::remoteStartTransmission() bad state"));
} else {
changeState(States::PASSIVE_OPERATIONAL);
cout << "TRANSCEIVER STARTED\n";
// TODO start RTP.RTCP transmission
CodecFactory codecfactory;
Codec* codecInc = codecfactory.getCodec(AudioCodec::PCMU); // HACK
// Codec* codecInc = codecfactory.getCodec(info->incomingCodec);
Codec* codecOut = codecfactory.getCodec(AudioCodec::PCMU);
// Codec* codecOut = codecfactory.getCodec(info->outgoingCodec); // HACK
info->transport = new TransportCCRTP();
info->transport->setParams(codecInc->getFrameCount(), codecInc->getFrameSize());
info->transport->setLocalEndpoint("0.0.0.0", localRTPPort);
info->transport->setRemoteEndpoint(info->address, info->rtpPort);
info->buf = new RingBuffer(1024*1024, 1);
// b << "Mixer::remoteStartTransmission() creating transport,
localRTPPort += 2;
stringstream a;
a << "rem address: " << info->address << " port: " << info->rtpPort;
LOG4CXX_DEBUG(logger, a.str());
info->transport->start();
LOG4CXX_DEBUG(logger, string("Mixer::remoteStartTransmission() transmission started"));
}
}