// // Created by ax on 25/09/16. // #include "CreateSessionObserver.h" #include "Console.h" #include "Peer.h" #include "SetLocalSessionDescriptionObserver.h" using namespace webrtc; CreateSessionObserver::CreateSessionObserver(Peer *peer): _peer(peer) { } void CreateSessionObserver::OnSuccess(SessionDescriptionInterface* desc) { rtc::scoped_refptr observer = new rtc::RefCountedObject(desc); _peer->SetLocalSessionDescription(desc, observer); } void CreateSessionObserver::OnFailure(const std::string& error) { Console::Print("[CreateSessionObserver::OnFailure] %s", error.c_str()); }