Messanger *rtc = new Messanger(this);
Conductor *conductor = new Conductor(rtc);
rtc->Connect();
void Conductor::OnSignedIn()
{
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
nullptr /* network_thread */,
nullptr /* worker_thread */,
nullptr /* signaling_thread */,
nullptr /* default_adm */,
webrtc::CreateBuiltinAudioEncoderFactory(),
webrtc::CreateBuiltinAudioDecoderFactory(),
webrtc::CreateBuiltinVideoEncoderFactory(), webrtc::CreateBuiltinVideoDecoderFactory(), nullptr /* audio_mixer */, nullptr /* audio_processing */);
/* some checks not nullptrs
...
*/
webrtc::PeerConnectionInterface::RTCConfiguration config;
config.sdp_semantics = webrtc::SdpSemantics::kUnifiedPlan;
config.enable_dtls_srtp = dtls;
webrtc::PeerConnectionInterface::IceServer server;
server.uri = "stun:stun.l.google.com:19302";
config.servers.push_back(server);
peer_connection_ = peer_connection_factory_->CreatePeerConnection(config, nullptr, nullptr, this);
peer_connection_->CreateOffer(this, webrtc::PeerConnectionInterface::RTCOfferAnswerOptions());
}
What i'm doing wrong? Is it really threading-related problem? If I'll be grateful for any help
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/b27fcb97-0bda-459a-bcbd-03130dc0eceao%40googlegroups.com.
I suppose you are using the new m84 signature which takes the RTCError as an argument?
void Conductor::OnSuccess(webrtc::SessionDescriptionInterface* desc)
{
qDebug() << "OnSuccess";
peer_connection_->SetLocalDescription(DummySetSessionDescriptionObserver::Create(), desc);
std::string sdp;
desc->ToString(&sdp);
Q_EMIT SDPGen(sdp);
}
void Conductor::OnFailure(webrtc::RTCError error) {
qDebug() << ToString(error.type()) << ": " << error.message();
}
v=0
o=- 5454879051792501191 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS stream_id
void Conductor::AddTracks() {
rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
peer_connection_factory_->CreateAudioTrack(
kAudioLabel, peer_connection_factory_->CreateAudioSource(
cricket::AudioOptions())));
auto result_or_error = peer_connection_->AddTrack(audio_track, {kStreamId});
if (!result_or_error.ok()) {
qDebug() << "Failed to add audio track to PeerConnection: " << result_or_error.error().message();
}
rtc::scoped_refptr<CapturerTrackSource> video_device = CapturerTrackSource::Create();
if (video_device) {
rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track_(
peer_connection_factory_->CreateVideoTrack(kVideoLabel, video_device));
// TODO start rendering
result_or_error = peer_connection_->AddTrack(video_track_, {kStreamId});
if (!result_or_error.ok()) {
qDebug() << "Failed to add video track to PeerConnection: " << result_or_error.error().message();
}
} else {
qDebug() << "OpenVideoCaptureDevice failed";
}
}
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/b27fcb97-0bda-459a-bcbd-03130dc0eceao%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/30fae1b6-faa8-4bc5-8c6a-0fb0f142ff67o%40googlegroups.com.
v=0
o=- 99157163530396358 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS stream_id
m=audio 9
v=0
o=- 99157163530396358 5 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDL
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/30fae1b6-faa8-4bc5-8c6a-0fb0f142ff67o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/01f0e97b-d5b1-4da8-b655-99d289294ad3n%40googlegroups.com.