Does anyone have advice on what to look out for when integrating libwebrtc.a? Is there a guide to integrating the provided libwebrtc library into an application?
I’ve been working on integrating the provided libwebrtc.a library into my linux C++ application. I’ve been able to integrate it to the point where I can create and accept offers/answers, and create a data channel and video channels for my rtsp video sources.
Where my integration falls short is that it’s unable to renegotiate call details (ie adding new data or video channels), and I cannot add ice candidates to my peer connection. In both of these situations the application will segfault within the libwebrtc code. My code largely follows the example provided in google’s source code examples.
To be more specific, when crashing from adding an ICE candidate the stack trace is: webrtc::PeerConnection::AddIceCandidate(webrtc::IceCandidateInterface const)->webrtc::PeerConnection::ReadyToUseRemoteCandidate(webrtc::IceCandidateInterface const*, webrtc::SessionDescriptionInterface const*, bool*)->webrtc::PeerConnection::FindContentInfo(webrtc::SessionDescriptionInterface const*, webrtc::IceCandidateInterface const*)
After including libwebrtc in my project I had to fix some include paths and deal with missing preprocessor definitions in the provided headers (ie add
#define WEBRTC_POSIX in a few select spots). Aside from that the libwebrtc headers are as provided. I’ve also had to include libraries -ldl and -lX11 when building my application for the Jetson. My application specifies use of c++17. Articles by Dr Alex G have been useful in this pursuit.
Has anyone else run into similar issues? Could I be forgetting a step when bringing in libwebrtc?
Any help or resources would be greatly appreciated.