32#include <VisionX/interface/components/StreamProvider.h>
42#include <libavcodec/avcodec.h>
43#include <libswscale/swscale.h>
50 using ImageMap = std::map<std::string, CByteImage*>;
70 "Names of the StreamProvider that is to be used");
81 return "StreamReceiver";
88 void getImages(std::vector<CByteImage*>& imagesOut);
135 class StreamElements;
136 using StreamElementsPtr = std::shared_ptr<StreamElements>;
138 struct StreamElements : Stream::StreamMetaData
141 StreamElements(std::string streamName,
143 Stream::StreamProviderPrx streamProvider);
147 std::stringstream pipelineString;
150 IceUtil::Time lastFPSCheck;
151 int framesSinceLastFPSCheck;
153 Stream::StreamProviderPrx streamProvider;
159 boost::mutex mutexPulling;
162 using StreamSourceMap = boost::unordered_map<std::string, StreamElementsPtr>;
163 StreamReceiver::StreamElementsPtr getStreamElements(std::string streamName);
164 void getImageFormat(StreamElementsPtr elem,
int& height,
int& width);
167 Stream::StreamProviderPrx streamProvider;
170 StreamSourceMap streamSources;
176 long transferredBits;
180 float bandwidth_kbps;
182 Stream::CodecType codec;
184 IceUtil::Time lastReceiveTimestamp;
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
StreamReceiverPropertyDefinitions(std::string prefix)
void getImageInformation(int &imageWidth, int &imageHeight, int &imageType)
AVCodecContext * m_decoderContext
CByteImage ** ppDecodedImages
void getImages(std::vector< CByteImage * > &imagesOut)
getImages retreives the next buffered images for all streams.
virtual void onInitComponent()
void reportNewStreamData(const Stream::DataChunk &chunk, const Ice::Current &)
virtual void onDisconnectComponent()
virtual void onConnectComponent()
virtual void onExitComponent()
CByteImage * pCombinedDecodedImage
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions()
int getNumberOfImages()
getNumberOfImages can be called after the component was initialized.
virtual std::string getDefaultName() const
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::map< std::string, CByteImage * > ImageMap
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< StreamReceiver > StreamReceiverPtr