Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
web_video_server::LibavStreamer Class Reference

#include <libav_streamer.h>

Inheritance diagram for web_video_server::LibavStreamer:
Inheritance graph
[legend]

Public Member Functions

 LibavStreamer (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh, const std::string &format_name, const std::string &codec_name, const std::string &content_type)
 
 ~LibavStreamer ()
 
- Public Member Functions inherited from web_video_server::ImageTransportImageStreamer
 ImageTransportImageStreamer (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh)
 
virtual void start ()
 
virtual ~ImageTransportImageStreamer ()
 
- Public Member Functions inherited from web_video_server::ImageStreamer
std::string getTopic ()
 
 ImageStreamer (const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle &nh)
 
bool isInactive ()
 
virtual ~ImageStreamer ()
 

Protected Member Functions

virtual void initialize (const cv::Mat &)
 
virtual void initializeEncoder ()
 
virtual void sendImage (const cv::Mat &, const ros::Time &time)
 
- Protected Member Functions inherited from web_video_server::ImageTransportImageStreamer
virtual void restreamFrame (double max_age)
 

Protected Attributes

AVCodec * codec_
 
AVCodecContext * codec_context_
 
AVFormatContext * format_context_
 
AVDictionary * opt_
 
AVOutputFormat * output_format_
 
AVStream * video_stream_
 
- Protected Attributes inherited from web_video_server::ImageTransportImageStreamer
std::string default_transport_
 
image_transport::Subscriber image_sub_
 
bool invert_
 
ros::Time last_frame
 
int output_height_
 
cv::Mat output_size_image
 
int output_width_
 
boost::mutex send_mutex_
 
- Protected Attributes inherited from web_video_server::ImageStreamer
async_web_server_cpp::HttpConnectionPtr connection_
 
image_transport::Subscriber image_sub_
 
bool inactive_
 
ros::NodeHandle nh_
 
async_web_server_cpp::HttpRequest request_
 
std::string topic_
 

Private Attributes

int bitrate_
 
std::string codec_name_
 
std::string content_type_
 
boost::mutex encode_mutex_
 
ros::Time first_image_timestamp_
 
std::string format_name_
 
AVFrame * frame_
 
int gop_
 
uint8_t * io_buffer_
 
int qmax_
 
int qmin_
 
struct SwsContext * sws_context_
 

Detailed Description

Definition at line 24 of file libav_streamer.h.

Constructor & Destructor Documentation

◆ LibavStreamer()

web_video_server::LibavStreamer::LibavStreamer ( const async_web_server_cpp::HttpRequest request,
async_web_server_cpp::HttpConnectionPtr  connection,
ros::NodeHandle nh,
const std::string &  format_name,
const std::string &  codec_name,
const std::string &  content_type 
)

Definition at line 51 of file libav_streamer.cpp.

◆ ~LibavStreamer()

web_video_server::LibavStreamer::~LibavStreamer ( )

Definition at line 69 of file libav_streamer.cpp.

Member Function Documentation

◆ initialize()

void web_video_server::LibavStreamer::initialize ( const cv::Mat &  img)
protectedvirtual

Reimplemented from web_video_server::ImageTransportImageStreamer.

Definition at line 103 of file libav_streamer.cpp.

◆ initializeEncoder()

void web_video_server::LibavStreamer::initializeEncoder ( )
protectedvirtual

◆ sendImage()

void web_video_server::LibavStreamer::sendImage ( const cv::Mat &  img,
const ros::Time time 
)
protectedvirtual

Implements web_video_server::ImageTransportImageStreamer.

Definition at line 243 of file libav_streamer.cpp.

Member Data Documentation

◆ bitrate_

int web_video_server::LibavStreamer::bitrate_
private

Definition at line 54 of file libav_streamer.h.

◆ codec_

AVCodec* web_video_server::LibavStreamer::codec_
protected

Definition at line 39 of file libav_streamer.h.

◆ codec_context_

AVCodecContext* web_video_server::LibavStreamer::codec_context_
protected

Definition at line 40 of file libav_streamer.h.

◆ codec_name_

std::string web_video_server::LibavStreamer::codec_name_
private

Definition at line 52 of file libav_streamer.h.

◆ content_type_

std::string web_video_server::LibavStreamer::content_type_
private

Definition at line 53 of file libav_streamer.h.

◆ encode_mutex_

boost::mutex web_video_server::LibavStreamer::encode_mutex_
private

Definition at line 49 of file libav_streamer.h.

◆ first_image_timestamp_

ros::Time web_video_server::LibavStreamer::first_image_timestamp_
private

Definition at line 48 of file libav_streamer.h.

◆ format_context_

AVFormatContext* web_video_server::LibavStreamer::format_context_
protected

Definition at line 38 of file libav_streamer.h.

◆ format_name_

std::string web_video_server::LibavStreamer::format_name_
private

Definition at line 51 of file libav_streamer.h.

◆ frame_

AVFrame* web_video_server::LibavStreamer::frame_
private

Definition at line 46 of file libav_streamer.h.

◆ gop_

int web_video_server::LibavStreamer::gop_
private

Definition at line 57 of file libav_streamer.h.

◆ io_buffer_

uint8_t* web_video_server::LibavStreamer::io_buffer_
private

Definition at line 59 of file libav_streamer.h.

◆ opt_

AVDictionary* web_video_server::LibavStreamer::opt_
protected

Definition at line 43 of file libav_streamer.h.

◆ output_format_

AVOutputFormat* web_video_server::LibavStreamer::output_format_
protected

Definition at line 37 of file libav_streamer.h.

◆ qmax_

int web_video_server::LibavStreamer::qmax_
private

Definition at line 56 of file libav_streamer.h.

◆ qmin_

int web_video_server::LibavStreamer::qmin_
private

Definition at line 55 of file libav_streamer.h.

◆ sws_context_

struct SwsContext* web_video_server::LibavStreamer::sws_context_
private

Definition at line 47 of file libav_streamer.h.

◆ video_stream_

AVStream* web_video_server::LibavStreamer::video_stream_
protected

Definition at line 41 of file libav_streamer.h.


The documentation for this class was generated from the following files:


web_video_server
Author(s): Mitchell Wills
autogenerated on Wed Mar 2 2022 01:13:36