Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. General parameters for webrtc app
  2. Our signal server on Java
  3. Native client and MCU server

General parameters for webrtc app

...

It also can be improved via using some cross-browser library for RTCPeerConnection (https://github.com/otalk/rtcpeerconnection).

You also can test signal server - all instructions are in README file.

Native client

...

As I mention in Our signal server chapter the RTCPeerConnection API is oriented on p2p connections but It allows to create client-server solutions.

I need to implement server-to-client solution because OM works on server-client architecture.

For this purposes I've invented the next solution.

The solution is to add our native client into communication and dump video stream from native client on hard disk.

This will work because we use our signal server that can do anything for us. 

I've tryed to create RTCPeerConnection on java but there aren't any java api for this purposes.

There are only js api and some abandoned demos in the Internet but I've found the repository with native (c++) webrtc peerConnection api for browsers.

This native api implemenation includes java api for android. But It also broken, you can see explanation here - https://groups.google.com/forum/#!topic/discuss-webrtc/BUPq2UxIyq8.

I've implementing RTCPeerConnection api for java. I used the native webrtc source and JNI because implementing webrtc requires a lot of protocols (SRTP, SCTP,  RTP etc).

I would have done this JNI stuff but I hadn't been stuck with one problem. I couldn't glue JNI and multi-threading native client. I've received JVM errors about damaged frame stack.

So I've implemented demo native client that works via console as signaling. The native client's code is attached to the this doc.

To build and test it you must do the following tasks:

  1. Go to the https://webrtc.org/native-code/development/ and install depot tools
  2. Then checkout chromium webrtc sources. Instructions are here - https://webrtc.org/native-code/development/. Check-outing will borrow a lot of time ~ 1 hour for me.
  3. Then copy my native client code to src/webrtc/examples/peerconnection/linux (or windows if you use it)
  4. Then you must install ninja build system and run
  5. $ ninja -C out/Debug
  6. in your src directory
  7. Finally the peer_connection_client must arrive in your out/Debug directory
  8. Then just execute it and test. It provides testing instructions.

It can connect to the browser RTCPeerConnection and dump stream into hard disk.

OMStreamSaver-master.zip

signalling_server-master.zip

https://github.com/Dima00782/signalling_server

https://github.com/Dima00782/OMStreamSaver