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