Extractor of timed metadata. More...
#include <metadata_extractor.h>
Public Types | |
using | ConstPtr = std::shared_ptr< const TimedMetadataExtractor > |
using | Ptr = std::shared_ptr< TimedMetadataExtractor > |
![]() | |
using | ConstPtr = std::shared_ptr< const MetadataExtractor > |
using | Ptr = std::shared_ptr< MetadataExtractor > |
Public Member Functions | |
virtual void | addTimedMetadataListener (const std::shared_ptr< TimedMetadataListener > &listener) |
Add a new timed metadata listener. More... | |
virtual bool | hasTimedMetadata () const |
virtual void | prepareTimedMetadata (const std::unordered_set< MetadataType > &metadataTypes) |
Perform any required initialization of the extractor so that it is prepared to extract metadata of the given types. More... | |
virtual size_t | processTimedMetadata (MetadataType type, const StreamTime &maxTime, bool requireOptional) |
Process timed metadata up until the time passed as parameter. More... | |
virtual void | seekTimedMetadata (const StreamTime &seekTime) |
Seek timed metadata to the given stream time. More... | |
virtual std::unordered_set< MetadataType > | supportedTimedMetadata (const std::unordered_set< MetadataType > &availableMetadata) const =0 |
Get a list of timed metadata that are supported by this instance of the extractor based on the given available metadata. More... | |
TimedMetadataExtractor (const cras::LogHelperPtr &log) | |
![]() | |
virtual cras::optional< geometry_msgs::Vector3 > | getAcceleration () |
virtual cras::optional< geometry_msgs::Vector3 > | getAngularVelocity () |
virtual cras::optional< compass_msgs::Azimuth > | getAzimuth () |
virtual cras::optional< std::string > | getCameraGeneralName () |
virtual cras::optional< sensor_msgs::CameraInfo > | getCameraInfo () |
virtual cras::optional< std::string > | getCameraMake () |
virtual cras::optional< std::string > | getCameraModel () |
virtual cras::optional< std::string > | getCameraSerialNumber () |
virtual cras::optional< std::string > | getCameraUniqueName () |
virtual cras::optional< ros::Time > | getCreationTime () |
virtual cras::optional< double > | getCropFactor () |
virtual cras::optional< DistortionData > | getDistortion () |
virtual cras::optional< vision_msgs::Detection2DArray > | getFaces () |
virtual cras::optional< double > | getFocalLength35MM () |
virtual cras::optional< double > | getFocalLengthMM () |
virtual cras::optional< double > | getFocalLengthPx () |
virtual GNSSFixAndDetail | getGNSSPosition () |
virtual cras::optional< sensor_msgs::Imu > | getImu () |
virtual cras::optional< IntrinsicMatrix > | getIntrinsicMatrix () |
virtual cras::optional< std::string > | getLensMake () |
virtual cras::optional< std::string > | getLensModel () |
virtual cras::optional< sensor_msgs::MagneticField > | getMagneticField () |
virtual std::string | getName () const =0 |
Return the name of the extractor. More... | |
virtual cras::optional< geometry_msgs::Transform > | getOpticalFrameTF () |
virtual int | getPriority () const =0 |
Return the priority of the extractor (for ordering in MetadataManager). More... | |
virtual cras::optional< RollPitch > | getRollPitch () |
virtual cras::optional< int > | getRotation () |
virtual cras::optional< SensorSize > | getSensorSizeMM () |
virtual cras::optional< geometry_msgs::Transform > | getZeroRollPitchTF () |
MetadataExtractor (const cras::LogHelperPtr &log) | |
Constructor. More... | |
virtual void | processPacket (const AVPacket *packet) |
Optional processing of libav packets as they are read from the movie file. More... | |
virtual | ~MetadataExtractor () |
![]() | |
::cras::LogHelperConstPtr | getCrasLogger () const |
HasLogger (const ::cras::LogHelperPtr &log) | |
void | setCrasLogger (const ::cras::LogHelperPtr &log) |
Protected Attributes | |
std::vector< TimedMetadataListener::Ptr > | listeners |
The listeners whose callbacks should be called. More... | |
![]() | |
::cras::LogHelperPtr | log |
Extractor of timed metadata.
Different from the static metadata, timed metadata can get new values as the movie is advanced. Also, the update rates of the timed metadata may not match the framerate of the movie. That is wHy "reading" the timed metadata is implemented via callbacks to the TimedMetadataListener classes.
Definition at line 386 of file metadata_extractor.h.
using movie_publisher::TimedMetadataExtractor::ConstPtr = std::shared_ptr<const TimedMetadataExtractor> |
Definition at line 390 of file metadata_extractor.h.
using movie_publisher::TimedMetadataExtractor::Ptr = std::shared_ptr<TimedMetadataExtractor> |
Definition at line 389 of file metadata_extractor.h.
|
explicit |
[in] | log | Logger. |
|
virtual |
Add a new timed metadata listener.
[in] | listener | The listener to be added. |
|
virtual |
Reimplemented in movie_publisher::MetadataManager.
|
virtual |
Perform any required initialization of the extractor so that it is prepared to extract metadata of the given types.
[in] | metadataTypes | The types of metadata this extractor should provide. |
Reimplemented in movie_publisher::MetadataManager.
|
virtual |
Process timed metadata up until the time passed as parameter.
[in] | type | Type of the requested metadata. |
[in] | maxTime | The maximum stream timestamp of the timed metadata that should be passed to listeners. |
[in] | requireOptional | If true and the timed metadata are composed of multiple base metadata, treat even optional metadata as required. This is used by the metadata creation loop to first make sure other providers have produced as much as they can before this metadata is asked to be produced even with incomplete optional dependencies. |
Reimplemented in movie_publisher::MetadataManager.
|
virtual |
Seek timed metadata to the given stream time.
[in] | seekTime | The stream timestamp to seek to. |
Reimplemented in movie_publisher::MetadataManager.
|
pure virtual |
Get a list of timed metadata that are supported by this instance of the extractor based on the given available metadata.
[in] | availableMetadata | The timed metadata that is currently available. |
Implemented in movie_publisher::MetadataManager.
|
protected |
The listeners whose callbacks should be called.
Definition at line 459 of file metadata_extractor.h.