ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::visualization::webrtc_server Namespace Reference

Classes

class  BitmapTrackSource
 
class  BitmapTrackSourceInterface
 
class  HttpServerRequestHandler
 
struct  IceServer
 
class  ImageCapturer
 
class  ImageTrackSource
 
class  PeerConnectionManager
 
class  RequestHandler
 
class  VideoFilter
 VideoFilter is a templated class for video frame processing. More...
 
class  VideoScaler
 
class  WebRTCWindowSystem
 WebRTCWindowSystem is a BitmapWindowSystem with a WebRTC server that sends video frames to remote clients for visualization. More...
 

Functions

static int LogMessage (const struct mg_connection *conn, const char *message)
 
static const struct CivetCallbacks * getCivetCallbacks ()
 
static IceServer GetIceServerFromUrl (const std::string &url)
 
static webrtc::PeerConnectionFactoryDependencies CreatePeerConnectionFactoryDependencies ()
 
static std::string GetCustomSTUNServer ()
 
static std::string GetEnvWebRTCIP ()
 
static std::string GetEnvWebRTCPort ()
 

Variables

static struct CivetCallbacks _callbacks
 
const char k_candidate_sdp_mid_name [] = "sdpMid"
 
const char k_candidate_sdp_mline_index_name [] = "sdpMLineIndex"
 
const char k_candidate_sdp_name [] = "candidate"
 
const char k_session_description_type_name [] = "type"
 
const char k_session_description_sdp_name [] = "sdp"
 
static const std::list< std::string > s_public_ice_servers
 
static const std::list< std::string > s_cloudViewer_ice_servers
 

Function Documentation

◆ CreatePeerConnectionFactoryDependencies()

static webrtc::PeerConnectionFactoryDependencies cloudViewer::visualization::webrtc_server::CreatePeerConnectionFactoryDependencies ( )
static

◆ getCivetCallbacks()

static const struct CivetCallbacks* cloudViewer::visualization::webrtc_server::getCivetCallbacks ( )
static

References _callbacks, and LogMessage().

◆ GetCustomSTUNServer()

static std::string cloudViewer::visualization::webrtc_server::GetCustomSTUNServer ( )
static

Get custom STUN server address from WEBRTC_STUN_SERVER environment variable. If there are more than one server, separate them with ";". Example usage:

  1. Set WEBRTC_STUN_SERVER to:
    • UDP only WEBRTC_STUN_SERVER="turn:user:password@$(curl -s ifconfig.me):3478"
    • TCP only WEBRTC_STUN_SERVER="turn:user:password@$(curl -s ifconfig.me):3478?transport=tcp"
    • UDP and TCP WEBRTC_STUN_SERVER="turn:user:password@$(curl -s ifconfig.me):3478;turn:user:password@$(curl -s ifconfig.me):3478?transport=tcp"
  2. Start your TURN server binding to a local IP address and port
  3. Set router configurations to forward your local IP address and port to the public IP address and port.

Referenced by cloudViewer::visualization::webrtc_server::WebRTCWindowSystem::StartWebRTCServer().

◆ GetEnvWebRTCIP()

static std::string cloudViewer::visualization::webrtc_server::GetEnvWebRTCIP ( )
static

◆ GetEnvWebRTCPort()

static std::string cloudViewer::visualization::webrtc_server::GetEnvWebRTCPort ( )
static

◆ GetIceServerFromUrl()

◆ LogMessage()

static int cloudViewer::visualization::webrtc_server::LogMessage ( const struct mg_connection *  conn,
const char *  message 
)
static

References LogInfo.

Referenced by getCivetCallbacks().

Variable Documentation

◆ _callbacks

struct CivetCallbacks cloudViewer::visualization::webrtc_server::_callbacks
static

Referenced by getCivetCallbacks().

◆ k_candidate_sdp_mid_name

const char cloudViewer::visualization::webrtc_server::k_candidate_sdp_mid_name[] = "sdpMid"

◆ k_candidate_sdp_mline_index_name

const char cloudViewer::visualization::webrtc_server::k_candidate_sdp_mline_index_name[] = "sdpMLineIndex"

◆ k_candidate_sdp_name

const char cloudViewer::visualization::webrtc_server::k_candidate_sdp_name[] = "candidate"

◆ k_session_description_sdp_name

const char cloudViewer::visualization::webrtc_server::k_session_description_sdp_name[] = "sdp"

◆ k_session_description_type_name

const char cloudViewer::visualization::webrtc_server::k_session_description_type_name[] = "type"

◆ s_cloudViewer_ice_servers

const std::list<std::string> cloudViewer::visualization::webrtc_server::s_cloudViewer_ice_servers
static
Initial value:
{
std::string("turn:user:password@34.69") + ".27.100:3478",
std::string("turn:user:password@34.69") + ".27.100:3478?transport=tcp",
}

Referenced by cloudViewer::visualization::webrtc_server::WebRTCWindowSystem::StartWebRTCServer().

◆ s_public_ice_servers

const std::list<std::string> cloudViewer::visualization::webrtc_server::s_public_ice_servers
static
Initial value:
{
"stun:stun.l.google.com:19302"}

Referenced by cloudViewer::visualization::webrtc_server::WebRTCWindowSystem::StartWebRTCServer().