00001 #ifndef IMAGEM_TRANSPORT_COMPRESSED_PUBLISHER_H
00002 #define IMAGEM_TRANSPORT_COMPRESSED_PUBLISHER_H
00003
00004 #include <message_transport/simple_publisher_plugin.h>
00005 #include <sensor_msgs/Image.h>
00006 #include <sensor_msgs/CompressedImage.h>
00007
00008 namespace compressed_imagem_transport {
00009
00010 class CompressedPublisher : public message_transport::SimplePublisherPlugin<sensor_msgs::Image,sensor_msgs::CompressedImage>
00011 {
00012 public:
00013 virtual ~CompressedPublisher() {}
00014
00015 virtual std::string getTransportName() const
00016 {
00017 return "compressed";
00018 }
00019
00020 protected:
00021 virtual void publish(const sensor_msgs::Image& message,
00022 const message_transport::SimplePublisherPlugin<sensor_msgs::Image,sensor_msgs::CompressedImage>::PublishFn& publish_fn) const ;
00023 };
00024
00025 }
00026
00027 #endif // IMAGEM_TRANSPORT_COMPRESSED_PUBLISHER_H