Public Member Functions | Private Member Functions | Private Attributes | List of all members
web_video_server::WebVideoServer Class Reference

#include <web_video_server.h>

Public Member Functions

bool handle_list_streams (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, const char *begin, const char *end)
 
bool handle_snapshot (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, const char *begin, const char *end)
 
bool handle_stream (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, const char *begin, const char *end)
 
bool handle_stream_viewer (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, const char *begin, const char *end)
 
void spin ()
 Starts the server and spins. More...
 
 WebVideoServer (ros::NodeHandle &nh, ros::NodeHandle &private_nh)
 Constructor. More...
 
virtual ~WebVideoServer ()
 Destructor - Cleans up. More...
 

Private Member Functions

void cleanup_inactive_streams ()
 
void restreamFrames (double max_age)
 

Private Attributes

std::string address_
 
ros::Timer cleanup_timer_
 
async_web_server_cpp::HttpRequestHandlerGroup handler_group_
 
std::vector< boost::shared_ptr< ImageStreamer > > image_subscribers_
 
ros::NodeHandle nh_
 
int port_
 
double publish_rate_
 
int ros_threads_
 
boost::shared_ptr< async_web_server_cpp::HttpServerserver_
 
std::map< std::string, boost::shared_ptr< ImageStreamerType > > stream_types_
 
boost::mutex subscriber_mutex_
 

Detailed Description

Definition at line 21 of file web_video_server.h.

Constructor & Destructor Documentation

◆ WebVideoServer()

web_video_server::WebVideoServer::WebVideoServer ( ros::NodeHandle nh,
ros::NodeHandle private_nh 
)

Constructor.

Returns

Definition at line 46 of file web_video_server.cpp.

◆ ~WebVideoServer()

web_video_server::WebVideoServer::~WebVideoServer ( )
virtual

Destructor - Cleans up.

Definition at line 96 of file web_video_server.cpp.

Member Function Documentation

◆ cleanup_inactive_streams()

void web_video_server::WebVideoServer::cleanup_inactive_streams ( )
private

Definition at line 134 of file web_video_server.cpp.

◆ handle_list_streams()

bool web_video_server::WebVideoServer::handle_list_streams ( const async_web_server_cpp::HttpRequest request,
async_web_server_cpp::HttpConnectionPtr  connection,
const char *  begin,
const char *  end 
)

Definition at line 256 of file web_video_server.cpp.

◆ handle_snapshot()

bool web_video_server::WebVideoServer::handle_snapshot ( const async_web_server_cpp::HttpRequest request,
async_web_server_cpp::HttpConnectionPtr  connection,
const char *  begin,
const char *  end 
)

Definition at line 195 of file web_video_server.cpp.

◆ handle_stream()

bool web_video_server::WebVideoServer::handle_stream ( const async_web_server_cpp::HttpRequest request,
async_web_server_cpp::HttpConnectionPtr  connection,
const char *  begin,
const char *  end 
)

Definition at line 153 of file web_video_server.cpp.

◆ handle_stream_viewer()

bool web_video_server::WebVideoServer::handle_stream_viewer ( const async_web_server_cpp::HttpRequest request,
async_web_server_cpp::HttpConnectionPtr  connection,
const char *  begin,
const char *  end 
)

Definition at line 207 of file web_video_server.cpp.

◆ restreamFrames()

void web_video_server::WebVideoServer::restreamFrames ( double  max_age)
private

Definition at line 122 of file web_video_server.cpp.

◆ spin()

void web_video_server::WebVideoServer::spin ( )

Starts the server and spins.

Definition at line 100 of file web_video_server.cpp.

Member Data Documentation

◆ address_

std::string web_video_server::WebVideoServer::address_
private

Definition at line 65 of file web_video_server.h.

◆ cleanup_timer_

ros::Timer web_video_server::WebVideoServer::cleanup_timer_
private

Definition at line 60 of file web_video_server.h.

◆ handler_group_

async_web_server_cpp::HttpRequestHandlerGroup web_video_server::WebVideoServer::handler_group_
private

Definition at line 67 of file web_video_server.h.

◆ image_subscribers_

std::vector<boost::shared_ptr<ImageStreamer> > web_video_server::WebVideoServer::image_subscribers_
private

Definition at line 69 of file web_video_server.h.

◆ nh_

ros::NodeHandle web_video_server::WebVideoServer::nh_
private

Definition at line 56 of file web_video_server.h.

◆ port_

int web_video_server::WebVideoServer::port_
private

Definition at line 64 of file web_video_server.h.

◆ publish_rate_

double web_video_server::WebVideoServer::publish_rate_
private

Definition at line 63 of file web_video_server.h.

◆ ros_threads_

int web_video_server::WebVideoServer::ros_threads_
private

Definition at line 62 of file web_video_server.h.

◆ server_

boost::shared_ptr<async_web_server_cpp::HttpServer> web_video_server::WebVideoServer::server_
private

Definition at line 66 of file web_video_server.h.

◆ stream_types_

std::map<std::string, boost::shared_ptr<ImageStreamerType> > web_video_server::WebVideoServer::stream_types_
private

Definition at line 70 of file web_video_server.h.

◆ subscriber_mutex_

boost::mutex web_video_server::WebVideoServer::subscriber_mutex_
private

Definition at line 71 of file web_video_server.h.


The documentation for this class was generated from the following files:


web_video_server
Author(s): Mitchell Wills
autogenerated on Wed Mar 2 2022 01:13:36