summaryrefslogtreecommitdiff
path: root/src/GodotCreateSessionDescriptionObserver.cpp
blob: f9d110c814fb030bed45de30c84ab764ce49e5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "WebRTCLibPeerConnection.hpp"

using namespace godot_webrtc;

WebRTCLibPeerConnection::GodotCSDO::GodotCSDO(WebRTCLibPeerConnection *parent) {
	this->parent = parent;
}

void WebRTCLibPeerConnection::GodotCSDO::OnSuccess(webrtc::SessionDescriptionInterface *desc) {
	// serialize this offer and send it to the remote peer:
	std::string sdp; // sdp = session description protocol
	desc->ToString(&sdp);
	parent->queue_signal("session_description_created", 2, desc->type().c_str(), sdp.c_str());
};

void WebRTCLibPeerConnection::GodotCSDO::OnFailure(const std::string &error){};