43 async_web_server_cpp::HttpConnectionPtr connection,
ros::NodeHandle& nh) :
44 LibavStreamer(request, connection, nh,
"webm",
"libvpx",
"video/webm")
46 quality_ = request.get_query_param_value_or_default(
"quality",
"realtime");
54 typedef std::map<std::string, std::string> AvOptMap;
57 av_opt_map[
"deadline"] =
"1";
58 av_opt_map[
"auto-alt-ref"] =
"0";
59 av_opt_map[
"lag-in-frames"] =
"1";
60 av_opt_map[
"rc_lookahead"] =
"1";
61 av_opt_map[
"drop_frame"] =
"1";
62 av_opt_map[
"error-resilient"] =
"1";
64 for (AvOptMap::iterator itr = av_opt_map.begin(); itr != av_opt_map.end(); ++itr)
66 av_opt_set(
codec_context_->priv_data, itr->first.c_str(), itr->second.c_str(), 0);
74 av_opt_set_int(
codec_context_->priv_data,
"buf-initial", bufsize, 0);
75 av_opt_set_int(
codec_context_->priv_data,
"buf-optimal", bufsize, 0);
76 av_opt_set_int(
codec_context_->priv_data,
"skip_threshold", 10, 0);
85 async_web_server_cpp::HttpConnectionPtr connection,
virtual void initializeEncoder()
virtual boost::shared_ptr< ImageStreamer > create_streamer(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh)
Vp8Streamer(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh)
AVCodecContext * codec_context_