@@ -33,6 +33,11 @@ static bool ros_connection_logger(async_web_server_cpp::HttpServerRequestHandler
33
33
try
34
34
{
35
35
forward (request, connection, begin, end);
36
+ if (__verbose)
37
+ {
38
+ ROS_INFO_STREAM (" Request forwarded: " << request.uri );
39
+ }
40
+
36
41
return true ;
37
42
}
38
43
catch (std::exception &e)
@@ -64,6 +69,9 @@ WebVideoServer::WebVideoServer(ros::NodeHandle &nh, ros::NodeHandle &private_nh)
64
69
private_nh.param (" ros_threads" , ros_threads_, 2 );
65
70
private_nh.param (" publish_rate" , publish_rate_, -1.0 );
66
71
72
+ if (__verbose) {
73
+ ROS_INFO_STREAM (" Starting with args server threads: " << server_threads << " ros_threads: " << ros_threads_);
74
+ }
67
75
private_nh.param <std::string>(" default_stream_type" , __default_stream_type, " mjpeg" );
68
76
69
77
stream_types_[" mjpeg" ] = boost::shared_ptr<ImageStreamerType>(new MjpegStreamerType ());
@@ -101,7 +109,7 @@ WebVideoServer::~WebVideoServer()
101
109
void WebVideoServer::spin ()
102
110
{
103
111
server_->run ();
104
- ROS_INFO_STREAM (" Waiting For connections on " << address_ << " :" << port_);
112
+ ROS_INFO_STREAM (" Waiting For connections on " << address_ << " :" << port_);
105
113
106
114
ros::AsyncSpinner spinner (ros_threads_);
107
115
spinner.start ();
@@ -144,7 +152,7 @@ void WebVideoServer::cleanup_inactive_streams()
144
152
{
145
153
for (itr_type itr = new_end; itr < image_subscribers_.end (); ++itr)
146
154
{
147
- ROS_INFO_STREAM (" Removed Stream: " << (*itr)->getTopic ());
155
+ ROS_INFO_STREAM (" Removed Stream: " << (*itr)->getTopic () << " now serving " << image_subscribers_. size () );
148
156
}
149
157
}
150
158
image_subscribers_.erase (new_end, image_subscribers_.end ());
@@ -184,6 +192,10 @@ bool WebVideoServer::handle_stream(const async_web_server_cpp::HttpRequest &requ
184
192
streamer->start ();
185
193
boost::mutex::scoped_lock lock (subscriber_mutex_);
186
194
image_subscribers_.push_back (streamer);
195
+ if (__verbose)
196
+ {
197
+ ROS_INFO_STREAM (" Serving " << image_subscribers_.size () << " streams" );
198
+ }
187
199
}
188
200
else
189
201
{
0 commit comments