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

Classes

class  BitmapTrackSourceInterface
 
class  BitmapTrackSource
 
class  RequestHandler
 
class  HttpServerRequestHandler
 
class  ImageCapturer
 
class  ImageTrackSource
 
struct  IceServer
 
class  PeerConnectionManager
 
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 ()
 
static void pybind_webrtc_server_functions (py::module &m)
 
void pybind_webrtc_server (py::module &m)
 

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

Definition at line 89 of file PeerConnectionManager.cpp.

◆ getCivetCallbacks()

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

Definition at line 32 of file HttpServerRequestHandler.cpp.

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.

Definition at line 63 of file WebRTCWindowSystem.cpp.

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

◆ GetEnvWebRTCIP()

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

Definition at line 71 of file WebRTCWindowSystem.cpp.

◆ GetEnvWebRTCPort()

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

Definition at line 79 of file WebRTCWindowSystem.cpp.

◆ GetIceServerFromUrl()

◆ LogMessage()

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

Definition at line 26 of file HttpServerRequestHandler.cpp.

Referenced by getCivetCallbacks().

◆ pybind_webrtc_server()

void cloudViewer::visualization::webrtc_server::pybind_webrtc_server ( py::module &  m)

◆ pybind_webrtc_server_functions()

static void cloudViewer::visualization::webrtc_server::pybind_webrtc_server_functions ( py::module &  m)
static

Variable Documentation

◆ _callbacks

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

Definition at line 26 of file HttpServerRequestHandler.cpp.

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",
}

Definition at line 43 of file WebRTCWindowSystem.cpp.

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"}

Definition at line 38 of file WebRTCWindowSystem.cpp.

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