1 #ifndef WEB_VIDEO_SERVER_H_ 2 #define WEB_VIDEO_SERVER_H_ 8 #include "async_web_server_cpp/http_server.hpp" 9 #include "async_web_server_cpp/http_request.hpp" 10 #include "async_web_server_cpp/http_connection.hpp" 12 #define ROS_HAS_STEADYTIMER (ROS_VERSION_MINIMUM(1, 13, 1) || ((ROS_VERSION_MINOR == 12) && (ROS_VERSION_PATCH >= 8))) 40 bool handle_stream(
const async_web_server_cpp::HttpRequest &request,
41 async_web_server_cpp::HttpConnectionPtr connection,
const char* begin,
const char* end);
44 async_web_server_cpp::HttpConnectionPtr connection,
const char* begin,
const char* end);
47 async_web_server_cpp::HttpConnectionPtr connection,
const char* begin,
const char* end);
50 async_web_server_cpp::HttpConnectionPtr connection,
const char* begin,
const char* end);
57 #if ROS_HAS_STEADYTIMER || defined USE_STEADY_TIMER 70 std::map<std::string, boost::shared_ptr<ImageStreamerType> >
stream_types_;
bool handle_stream_viewer(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, const char *begin, const char *end)
ros::Timer cleanup_timer_
std::map< std::string, boost::shared_ptr< ImageStreamerType > > stream_types_
bool handle_list_streams(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, const char *begin, const char *end)
boost::mutex subscriber_mutex_
virtual ~WebVideoServer()
Destructor - Cleans up.
std::vector< boost::shared_ptr< ImageStreamer > > image_subscribers_
async_web_server_cpp::HttpRequestHandlerGroup handler_group_
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)
boost::shared_ptr< async_web_server_cpp::HttpServer > server_
void spin()
Starts the server and spins.
void restreamFrames(double max_age)
void cleanup_inactive_streams()
WebVideoServer(ros::NodeHandle &nh, ros::NodeHandle &private_nh)
Constructor.