Go to the documentation of this file.00001 #include "web_video_server/vp9_streamer.h"
00002
00003 namespace web_video_server
00004 {
00005
00006 Vp9Streamer::Vp9Streamer(const async_web_server_cpp::HttpRequest& request,
00007 async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle& nh) :
00008 LibavStreamer(request, connection, nh, "webm", "libvpx-vp9", "video/webm")
00009 {
00010 }
00011 Vp9Streamer::~Vp9Streamer()
00012 {
00013 }
00014
00015 void Vp9Streamer::initializeEncoder()
00016 {
00017
00018
00019
00020 av_opt_set_int(codec_context_->priv_data, "pass", 1, 0);
00021 av_opt_set_int(codec_context_->priv_data, "speed", 8, 0);
00022 av_opt_set_int(codec_context_->priv_data, "cpu-used", 4, 0);
00023 av_opt_set_int(codec_context_->priv_data, "crf", 20, 0);
00024 }
00025
00026 Vp9StreamerType::Vp9StreamerType() :
00027 LibavStreamerType("webm", "libvpx-vp9", "video/webm")
00028 {
00029 }
00030
00031 boost::shared_ptr<ImageStreamer> Vp9StreamerType::create_streamer(const async_web_server_cpp::HttpRequest& request,
00032 async_web_server_cpp::HttpConnectionPtr connection,
00033 ros::NodeHandle& nh)
00034 {
00035 return boost::shared_ptr<ImageStreamer>(new Vp9Streamer(request, connection, nh));
00036 }
00037
00038 }