looking for resources for native C++ API

662 views
Skip to first unread message

Sebastian Kunz

unread,
Jun 28, 2019, 9:08:24 AM6/28/19
to discuss-webrtc
Hello everyone!
I'm looking for useful resources and code examples that cover WebRTC's native C++ API. I am familiar with the javascript api and WebRTC's concepts, but I struggle to fight myself trough the huge codebase. Therefore I'm looking for any guidance.

Thank you!
Sebastian

Alexandre GOUAILLARD

unread,
Jun 28, 2019, 2:49:53 PM6/28/19
to discuss...@googlegroups.com
which part are you most interested in?

--

---
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/7c05f8d5-5eb0-47ca-95f0-344ba3e92968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------

Harshil Makwana

unread,
Jun 30, 2019, 1:40:52 AM6/30/19
to discuss-webrtc
Hi

I am interested in learning and developing live audio video streaming and recording part, could you suggest any documents?

Regards,
Harshil

Alexandre GOUAILLARD

unread,
Jun 30, 2019, 3:45:07 AM6/30/19
to discuss...@googlegroups.com
what you describing is the entire code base.
there is no existing documentation yet.

you have two points of entry in the code:
- the PeerConnection API, which reflect the JS API and you might  be more familiar with,
- the Call Level API which handles the core media streaming (codecs and RTP only: NO encryption, NO ICE, NO JSEP).

(slides courtesy google). That s more or less the view: PeerConnection Object is taking care of the API, transport controller takes care of SDP and extract what s needed for the encryption (DTLStransport), the codec choice (MediaCodecInfo), and the ICE part (p2ptransport). the channel manager handles getting the info back and forth with the transport, getting frames from the capturer and pushing it to call (the encoder, then RTP). Once done, it brings the rtp packets out of "call" and send it to DTLS for encryption, and push it down to p2ptransport for the streaming itself.



Eventually, webrtc 1.0 should look like that, and the channel, media, and call interfaces should be under the Sender / Receiver objects.


The best way to understand the usable APIs, is to go look at the /api folder:
- media_stream_interface.h describes all the media capture and data management for raw frames
- then peerconnection_interface is a good read
- then rtp_transceiver, sender, receiver
and so on and so forth depending on your needs.

You have one C++ example in the code as well under:
src/peerconnection/...

This is a simplified view of the Call internals in M73 (attached).

Hope this helps.

Dr. Alex.


--

---
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.

For more options, visit https://groups.google.com/d/optout.
Call.jpg

Harshil Makwana

unread,
Jul 2, 2019, 2:02:35 PM7/2/19
to discuss-webrtc
yes it really helped, Thanks, Will talk to you when in doubt.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.

Sebastian Kunz

unread,
Jul 12, 2019, 8:57:57 AM7/12/19
to discuss-webrtc
Hello Alexandre!
Thank you very much for providing helpful sources! I am most interested in integrating webrtc into my C# WPF application to allow remote access from a browser. This means I want to capture the application's window and stream it to the other peer. The other peer sends mouse coordinates via a datachannel and those are injected in the c# application, thus allowing remote access. I implemented the p2p connection and the data transfer is successful. Now it comes down to capturing the window. Do you have any good information on that? I would highly appreciate it. 

Best Wishes
Sebastian


Am Freitag, 28. Juni 2019 20:49:53 UTC+2 schrieb Alexandre GOUAILLARD:
which part are you most interested in?

On Fri, Jun 28, 2019 at 9:08 PM Sebastian Kunz <sebast...@precipoint.de> wrote:
Hello everyone!
I'm looking for useful resources and code examples that cover WebRTC's native C++ API. I am familiar with the javascript api and WebRTC's concepts, but I struggle to fight myself trough the huge codebase. Therefore I'm looking for any guidance.

Thank you!
Sebastian

--

---
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...@googlegroups.com.

Alexandre GOUAILLARD

unread,
Jul 12, 2019, 11:44:00 AM7/12/19
to discuss...@googlegroups.com
- look at webrtc/src/modules/desktop_capture
- add the corresponding library to your build (the classes are not in the main libwebrtc.[a|lib] )
- You might have to change the type from DesktopFrame to something else.
- use the AdapterVideoCapturer (or something like that) to bring the frame in the usual pipeline: source -> track -> stream as cricket:VideoCapturer has been deprecated.
- corresponding UML diagram for 73 attached.

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/c4e718d6-e3e3-4b00-9311-0cb9e24a2d23%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
webrtc73_MST.pdf

T G

unread,
Jul 22, 2019, 9:09:35 PM7/22/19
to discuss-webrtc
Hi Alexandre,
This diagram is super helpful. Did you draw it yourself or it's somewhere public?
Any other parts of the webrtc?


On Friday, July 12, 2019 at 8:44:00 AM UTC-7, Alexandre GOUAILLARD wrote:
- look at webrtc/src/modules/desktop_capture
- add the corresponding library to your build (the classes are not in the main libwebrtc.[a|lib] )
- You might have to change the type from DesktopFrame to something else.
- use the AdapterVideoCapturer (or something like that) to bring the frame in the usual pipeline: source -> track -> stream as cricket:VideoCapturer has been deprecated.
- corresponding UML diagram for 73 attached.

Alexandre GOUAILLARD

unread,
Jul 23, 2019, 7:20:58 AM7/23/19
to discuss...@googlegroups.com
On Mon, Jul 22, 2019 at 9:09 PM T G <gete...@gmail.com> wrote:
Hi Alexandre,
This diagram is super helpful. Did you draw it yourself or it's somewhere public?

Someone from my team did the heavy lifting of going through all the classes manually with a dedicated software, and each of my engineer then worked on the small part they were focussing on.

Not public yet, but we re working on making it a reference that could dbe used by engineers or in the classroom. We re trying to make it on time for the first semester (october).
 
Any other parts of the webrtc?

we got most of it covered. Class diagrams and sequence diagrams.
 
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/d5753eb1-8e73-47df-9799-febe5d9779fa%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages