jpeg_streamers.h
Go to the documentation of this file.
00001 #ifndef JPEG_STREAMERS_H_
00002 #define JPEG_STREAMERS_H_
00003 
00004 #include <image_transport/image_transport.h>
00005 #include "web_video_server/image_streamer.h"
00006 #include "async_web_server_cpp/http_request.hpp"
00007 #include "async_web_server_cpp/http_connection.hpp"
00008 #include "web_video_server/multipart_stream.h"
00009 
00010 namespace web_video_server
00011 {
00012 
00013 class MjpegStreamer : public ImageTransportImageStreamer
00014 {
00015 public:
00016   MjpegStreamer(const async_web_server_cpp::HttpRequest &request, async_web_server_cpp::HttpConnectionPtr connection,
00017                 ros::NodeHandle& nh);
00018   ~MjpegStreamer();
00019 protected:
00020   virtual void sendImage(const cv::Mat &, const ros::Time &time);
00021 
00022 private:
00023   MultipartStream stream_;
00024   int quality_;
00025 };
00026 
00027 class MjpegStreamerType : public ImageStreamerType
00028 {
00029 public:
00030   boost::shared_ptr<ImageStreamer> create_streamer(const async_web_server_cpp::HttpRequest &request,
00031                                                    async_web_server_cpp::HttpConnectionPtr connection,
00032                                                    ros::NodeHandle& nh);
00033   std::string create_viewer(const async_web_server_cpp::HttpRequest &request);
00034 };
00035 
00036 class JpegSnapshotStreamer : public ImageTransportImageStreamer
00037 {
00038 public:
00039   JpegSnapshotStreamer(const async_web_server_cpp::HttpRequest &request,
00040                        async_web_server_cpp::HttpConnectionPtr connection, ros::NodeHandle& nh);
00041   ~JpegSnapshotStreamer();
00042 protected:
00043   virtual void sendImage(const cv::Mat &, const ros::Time &time);
00044 
00045 private:
00046   int quality_;
00047 };
00048 
00049 }
00050 
00051 #endif


web_video_server
Author(s): Mitchell Wills
autogenerated on Thu Jun 6 2019 18:02:48