mirror of
https://github.com/danog/libtgvoip.git
synced 2024-11-29 20:29:01 +01:00
More backwards compatibility fixes
This commit is contained in:
parent
0dc1e6c96d
commit
84c16ebcb4
@ -376,7 +376,8 @@ void VoIPController::ProcessExtraData(const Wrapped<Extra> &_data, Endpoint &src
|
||||
|
||||
for (const auto &stream : outgoingStreams)
|
||||
{
|
||||
ack->streams.v.push_back(stream->getStreamInfo());
|
||||
if (ver.isNew() || stream->type == StreamType::Audio)
|
||||
ack->streams.v.push_back(stream->getStreamInfo());
|
||||
}
|
||||
|
||||
LOGI("Sending init ack");
|
||||
@ -422,6 +423,10 @@ void VoIPController::ProcessExtraData(const Wrapped<Extra> &_data, Endpoint &src
|
||||
}
|
||||
|
||||
LOGI("peer version from init ack %d", ver.peerVersion);
|
||||
if (!ver.isNew())
|
||||
{
|
||||
incomingStreams.push_back(std::make_shared<IncomingStream>(StreamId::Signaling, StreamType::Signaling));
|
||||
}
|
||||
|
||||
shared_ptr<IncomingAudioStream> incomingAudioStream;
|
||||
for (const auto &stmInfo : data.streams)
|
||||
|
@ -22,7 +22,7 @@ struct Extra : public Serializable, MultiChoice<Extra>
|
||||
|
||||
void choose(BufferOutputStream &out, const VersionInfo &ver) const override;
|
||||
|
||||
std::string print() const override;
|
||||
virtual std::string print() const override;
|
||||
|
||||
uint64_t hash;
|
||||
|
||||
@ -91,7 +91,7 @@ public:
|
||||
std::string print() const override
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "StreamInfo id=" << streamId << ", type=" << type << ", codec=" << codec.print() << ", frameDuration=" << frameDuration << ", enabled=" << enabled;
|
||||
ss << "StreamInfo id=" << (int)streamId << ", type=" << type << ", codec=" << codec.print() << ", frameDuration=" << frameDuration << ", enabled=" << enabled;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
@ -325,6 +325,12 @@ struct ExtraInitAck : public Extra
|
||||
}
|
||||
static const uint8_t ID = 9;
|
||||
|
||||
std::string print() const override
|
||||
{
|
||||
std::stringstream s;
|
||||
s << "ExtraInitAck (peerVersion=" << peerVersion << ", minVersion=" << minVersion << ", streams: " << streams.print() << ")";
|
||||
return s.str();
|
||||
}
|
||||
size_t getConstructorSize(const VersionInfo &ver) const override
|
||||
{
|
||||
return sizeof(peerVersion) + sizeof(minVersion) + streams.getSize(ver);
|
||||
|
Loading…
Reference in New Issue
Block a user