Go to the documentation of this file.
28 #include <Image/ByteImage.h>
36 #include <VisionX/interface/components/StreamProvider.h>
40 #include <libswscale/swscale.h>
45 #define NUMBER_OF_COMPRESSIONRATES 3 //should hold the number of compression rates (the compression rates are defined in the enum ::Stream::CompressionRate)
55 public StreamProviderImageProcessorInterface,
77 void stopCapture(const ::Ice::Current& = Ice::emptyCurrent)
override;
79 bool startCapture(const ::Ice::Current& = Ice::emptyCurrent)
override;
81 void getImageInformation(
int& imageWidth,
int& imageHeight,
int& imageType,
const Ice::Current&
c = Ice::emptyCurrent)
override;
83 void setCompressionRate(::Stream::CompressionRate = COMPRESSIONHIGH, const ::Ice::Current& = Ice::emptyCurrent)
override;
95 void step(
const Ice::Current& = Ice::emptyCurrent);
111 bool capturing =
false;
112 std::string imageProviderProxyName;
113 visionx::ImageProviderInterfacePrx imageProviderProxy;
114 visionx::ImageFormatInfo imageFormat;
119 int encodedImgHeight;
121 CByteImage** ppInputImages, * pImageForEncoder;
122 using CByteImagePtr = std::shared_ptr<CByteImage>;
123 using ImageContainer = std::vector<CByteImagePtr>;
128 x264_picture_t pic_in, pic_out;
129 SwsContext* convertCtx;
130 int frameCounter = 0;
131 Stream::StreamListenerInterfacePrx listener;
std::string getDefaultName() const override
Retrieve default name of component.
void stopCapture(const ::Ice::Current &=Ice::emptyCurrent) override
The ImageProcessor class provides an interface for access to ImageProviders via Ice and shared memory...
void getImageInformation(int &imageWidth, int &imageHeight, int &imageType, const Ice::Current &c=Ice::emptyCurrent) override
virtual void onDisConnectImageProcessor()
Is called if a dependency of the object got lost (crash, network error, stopped, ....
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
void onStartRecording(const ::Ice::Current &=Ice::emptyCurrent) override
void step(const Ice::Current &=Ice::emptyCurrent)
Executes a single cycle of the encoding process.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onInitImageProcessor() override
Is called once initialization of the ManagedIceObject is done.
bool startCapture(const ::Ice::Current &=Ice::emptyCurrent) override
starts the capture for the given source
StreamProviderPropertyDefinitions(std::string prefix)
CodecType getCodecType(const Ice::Current &) override
void process() override
Process the vision component.
void onExitImageProcessor() override
Is called once the component terminates.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
int getNumberOfImages(const ::Ice::Current &=Ice::emptyCurrent) override
This class realizes the StreamProviderImageProcessorInterface-SliceInterface and is a subclass of vis...
void onConnectImageProcessor() override
Is called once all dependencies of the object have been resolved and Ice connection is established.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void setCompressionRate(::Stream::CompressionRate=COMPRESSIONHIGH, const ::Ice::Current &=Ice::emptyCurrent) override