vp9_streamer.cpp
Go to the documentation of this file.
2 
3 namespace web_video_server
4 {
5 
6 Vp9Streamer::Vp9Streamer(const async_web_server_cpp::HttpRequest& request,
7  async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle& nh) :
8  LibavStreamer(request, connection, nh, "webm", "libvpx-vp9", "video/webm")
9 {
10 }
12 {
13 }
14 
16 {
17 
18  // codec options set up to provide somehow reasonable performance in cost of poor quality
19  // should be updated as soon as VP9 encoding matures
20  av_opt_set_int(codec_context_->priv_data, "pass", 1, 0);
21  av_opt_set_int(codec_context_->priv_data, "speed", 8, 0);
22  av_opt_set_int(codec_context_->priv_data, "cpu-used", 4, 0); // 8 is max
23  av_opt_set_int(codec_context_->priv_data, "crf", 20, 0); // 0..63 (higher is lower quality)
24 }
25 
27  LibavStreamerType("webm", "libvpx-vp9", "video/webm")
28 {
29 }
30 
31 boost::shared_ptr<ImageStreamer> Vp9StreamerType::create_streamer(const async_web_server_cpp::HttpRequest& request,
32  async_web_server_cpp::HttpConnectionPtr connection,
33  ros::NodeHandle& nh)
34 {
35  return boost::shared_ptr<ImageStreamer>(new Vp9Streamer(request, connection, nh));
36 }
37 
38 }
virtual boost::shared_ptr< ImageStreamer > create_streamer(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh)
Vp9Streamer(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh)
Definition: vp9_streamer.cpp:6


web_video_server
Author(s): Mitchell Wills
autogenerated on Wed Jun 5 2019 20:38:04