Commit 2e3b0e00 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Anthony Léonard

sipcall: use dual-buffered ice transport

This patch refactor the ICE transport system used for media streams
by using a dual-buffered like transport:
- one temporary used during the connection establishment
- one used when established and used by other components

When the established is used, the temporary is used to hide all the
connection stuff that can take time to succeed.

This has the (good) side-effect to resolve an issue on holding media
during a call (unhold doesn't work, media using an old transport).

Change-Id: I6b634443e06ece2dec2dd26a4b7ea429319d98d2
Reviewed-by: default avatarAnthony Léonard <>
parent c04cde48
This diff is collapsed.
......@@ -201,8 +201,6 @@ public: // NOT SIP RELATED (good candidates to be moved elsewhere)
void generateMediaPorts();
bool startIce();
void startAllMedia();
void openPortsUPnP();
......@@ -217,8 +215,8 @@ public: // NOT SIP RELATED (good candidates to be moved elsewhere)
std::unique_ptr<IceSocket> newIceSocket(unsigned compId);
std::shared_ptr<IceTransport> getIceMediaTransport() const {
return mediaTransport_;
IceTransport* getIceMediaTransport() const {
return tmpMediaTransport_ ? tmpMediaTransport_.get() : mediaTransport_.get();
......@@ -281,7 +279,10 @@ private:
unsigned int localVideoPort_ {0};
///< Transport used for media streams
std::shared_ptr<IceTransport> mediaTransport_ {};
std::shared_ptr<IceTransport> mediaTransport_;
///< Temporary transport for media. Replace mediaTransport_ when connected with success
std::shared_ptr<IceTransport> tmpMediaTransport_;
// Helpers
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment