Convenience class for implementing image transport codec plugins, which just relays the whole API to a Codec
library.
More...
#include <image_transport_codec_plugin.h>
Public Member Functions | |
ImageTransportCodec::DecodeResult | decode (const topic_tools::ShapeShifter &compressed, const dynamic_reconfigure::Config &config) const override |
Decode the given compressed image into a raw image. More... | |
ImageTransportCodec::EncodeResult | encode (const sensor_msgs::Image &raw, const dynamic_reconfigure::Config &config) const override |
Encode the given raw image into the given shapeshifter object. More... | |
ImageTransportCodec::GetCompressedContentResult | getCompressedImageContent (const topic_tools::ShapeShifter &compressed, const std::string &matchFormat) const override |
Return the part of the encoded message that represents the actual image data (i.e. the part that can be passed to external decoders or saved to a file). If the codec messages have no such meaning, empty result is returned. More... | |
std::string | getTransportName () const override |
Get the name of the codec/transport (used e.g. as topic suffix). More... | |
void | setLogHelper (const cras::LogHelperPtr &logHelper) override |
Use the given log helper for logging messages. More... | |
Public Member Functions inherited from image_transport_codecs::ImageTransportCodecPlugin | |
virtual | ~ImageTransportCodecPlugin ()=default |
Private Attributes | |
Codec | codec |
The codec used by this plugin. More... | |
Additional Inherited Members | |
Public Types inherited from image_transport_codecs::ImageTransportCodecPlugin | |
typedef boost::shared_ptr< const ImageTransportCodecPlugin > | ConstPtr |
Shared pointer to const ImageTransportCodecPlugin . More... | |
typedef boost::shared_ptr< ImageTransportCodecPlugin > | Ptr |
Shared pointer to ImageTransportCodecPlugin . More... | |
Convenience class for implementing image transport codec plugins, which just relays the whole API to a Codec
library.
Codec | Class of the codec. |
If used properly, the whole code of the codec plugin library can be as short as:
Definition at line 138 of file image_transport_codec_plugin.h.
|
inlineoverridevirtual |
Decode the given compressed image into a raw image.
[in] | compressed | The shapeshifter of the compressed image to be decoded. |
[in] | config | Config of the decompression (if it has any parameters). |
Implements image_transport_codecs::ImageTransportCodecPlugin.
Definition at line 157 of file image_transport_codec_plugin.h.
|
inlineoverridevirtual |
Encode the given raw image into the given shapeshifter object.
[in] | raw | The input raw image. |
[in] | config | Config of the compression (if it has any parameters). |
Implements image_transport_codecs::ImageTransportCodecPlugin.
Definition at line 151 of file image_transport_codec_plugin.h.
|
inlineoverridevirtual |
Return the part of the encoded message that represents the actual image data (i.e. the part that can be passed to external decoders or saved to a file). If the codec messages have no such meaning, empty result is returned.
[in] | compressed | The compressed image. |
[in] | matchFormat | If nonempty, the image data is only returned if their format field would match the given one. The matching should be case-insensitive. |
Implements image_transport_codecs::ImageTransportCodecPlugin.
Definition at line 163 of file image_transport_codec_plugin.h.
|
inlineoverridevirtual |
Get the name of the codec/transport (used e.g. as topic suffix).
Implements image_transport_codecs::ImageTransportCodecPlugin.
Definition at line 146 of file image_transport_codec_plugin.h.
|
inlineoverridevirtual |
Use the given log helper for logging messages.
[in] | logHelper | The log helper to use. |
Implements image_transport_codecs::ImageTransportCodecPlugin.
Definition at line 141 of file image_transport_codec_plugin.h.
|
private |
The codec used by this plugin.
Definition at line 170 of file image_transport_codec_plugin.h.