mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 11:15:13 +00:00
24 lines
No EOL
676 B
C++
24 lines
No EOL
676 B
C++
//
|
|
// 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<SetLocalSessionDescriptionObserver> observer =
|
|
new rtc::RefCountedObject<SetLocalSessionDescriptionObserver>(desc);
|
|
|
|
_peer->SetLocalSessionDescription(desc, observer);
|
|
}
|
|
|
|
void CreateSessionObserver::OnFailure(const std::string& error) {
|
|
Console::Print("[CreateSessionObserver::OnFailure] %s", error.c_str());
|
|
} |