Go to the documentation of this file.
30 #include <VisionX/interface/components/StreamProvider.h>
40 #include <libavcodec/avcodec.h>
41 #include <libswscale/swscale.h>
48 using ImageMap = std::map<std::string, CByteImage*>;
57 public Stream::StreamListenerInterface
67 defineOptionalProperty<std::string>(
"UsedStreamProvider",
"StreamProvider",
"Names of the StreamProvider that is to be used");
77 return "StreamReceiver";
84 void getImages(std::vector<CByteImage*>& imagesOut);
132 class StreamElements;
133 using StreamElementsPtr = std::shared_ptr<StreamElements>;
134 struct StreamElements : Stream::StreamMetaData
137 StreamElements(std::string streamName,
int streamID, Stream::StreamProviderPrx streamProvider);
141 std::stringstream pipelineString;
145 int framesSinceLastFPSCheck;
147 Stream::StreamProviderPrx streamProvider;
153 boost::mutex mutexPulling;
156 using StreamSourceMap = boost::unordered_map<std::string, StreamElementsPtr>;
157 StreamReceiver::StreamElementsPtr getStreamElements(std::string streamName);
158 void getImageFormat(StreamElementsPtr elem,
int& height,
int& width);
161 Stream::StreamProviderPrx streamProvider;
164 StreamSourceMap streamSources;
170 long transferredBits;
174 float bandwidth_kbps;
176 Stream::CodecType codec;
virtual void onExitComponent()
void getImageInformation(int &imageWidth, int &imageHeight, int &imageType)
std::map< std::string, CByteImage * > ImageMap
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
CByteImage * pCombinedDecodedImage
virtual std::string getDefaultName() const
void getImages(std::vector< CByteImage * > &imagesOut)
getImages retreives the next buffered images for all streams.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
CByteImage ** ppDecodedImages
AVCodecContext * m_decoderContext
int getNumberOfImages()
getNumberOfImages can be called after the component was initialized.
void reportNewStreamData(const Stream::DataChunk &chunk, const Ice::Current &)
armarx::core::time::DateTime Time
Baseclass for all ArmarX ManagedIceObjects requiring properties.
virtual void onConnectComponent()
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Default component property definition container.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
virtual void onDisconnectComponent()
StreamReceiverPropertyDefinitions(std::string prefix)
virtual void onInitComponent()
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions()
This file offers overloads of toIce() and fromIce() functions for STL container types.