18 namespace visualization {
19 namespace webrtc_server {
39 static std::shared_ptr<WebRTCWindowSystem>
GetInstance();
91 const std::string& class_name,
92 const std::function<std::string(
const std::string&)>
callback);
95 void OnFrame(
const std::string& window_uid,
96 const std::shared_ptr<core::Tensor>& im);
120 std::string
CallHttpAPI(
const std::string& entry_point,
121 const std::string& query_string =
"",
122 const std::string& data =
"")
const;
139 std::unique_ptr<Impl> impl_;
std::function< void(std::shared_ptr< core::Tensor >)> callback
WebRTCWindowSystem is a BitmapWindowSystem with a WebRTC server that sends video frames to remote cli...
std::string GetWindowUID(OSWindow w) const
std::vector< std::string > GetWindowUIDs() const
List available windows.
OSWindow GetOSWindowByUID(const std::string &uid) const
std::string CallHttpAPI(const std::string &entry_point, const std::string &query_string="", const std::string &data="") const
Call PeerConnectionManager's web request API.
void SendInitFrames(const std::string &window_uid)
virtual ~WebRTCWindowSystem()
std::string OnDataChannelMessage(const std::string &message)
static std::shared_ptr< WebRTCWindowSystem > GetInstance()
void RegisterDataChannelMessageCallback(const std::string &class_name, const std::function< std::string(const std::string &)> callback)
void CloseWindowConnections(const std::string &window_uid)
Close all WebRTC connections that correspond to a Window.
void StartWebRTCServer()
Start WebRTC server in a background thread.
OSWindow CreateOSWindow(gui::Window *o3d_window, int width, int height, const char *title, int flags) override
void OnFrame(const std::string &window_uid, const std::shared_ptr< core::Tensor > &im)
Server -> client frame.
void DisableHttpHandshake()
void DestroyWindow(OSWindow w) override
Generic file read and write utility for python interface.