44 "FPS", 30.0f,
"Frames per second with that the capture function is called.");
54 virtual public CapturingImageProviderInterface
69 const Ice::Current&
c = Ice::emptyCurrent)
override;
75 void stopCapture(
const Ice::Current&
c = Ice::emptyCurrent)
override;
132 virtual bool capture(
void** ppImageBuffers) = 0;
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
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)
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
CapturingImageProviderPropertyDefinitions(std::string prefix)
The CapturingImageProvider provides a callback function to trigger the capturing of images with diffe...
virtual void onStopCapture()=0
This is called when the image provider capturing has been stopped.
virtual void onStartCapturingImageProvider()
This is called when the Component::onConnectComponent() setup is called.
ImageSyncMode getImageSyncMode()
Returns the image sync mode.
virtual void onInitCapturingImageProvider()=0
This is called when the Component::onInitComponent() is called.
virtual bool capture(void **ppImageBuffers)=0
Main capturing function.
float frameRate
Required frame rate.
void stopCapture(const Ice::Current &c=Ice::emptyCurrent) override
Stops image capturing.
void startCapture(float framesPerSecond, const Ice::Current &c=Ice::emptyCurrent) override
Starts image capturing.
void onConnectImageProvider() override
void setImageSyncMode(ImageSyncMode imageSyncMode)
Sets the image synchronization mode.
FPSCounter fpsCounter
FPS manager.
armarx::SharedMemoryScopedWriteLockPtr getScopedWriteLock()
Retrieve scoped lock for writing to the memory.
virtual void onExitCapturingImageProvider()=0
This is called when the Component::onExitComponent() setup is called.
void onInitImageProvider() override
virtual void onStartCapture(float framesPerSecond)=0
This is called when the image provider capturing has been started.
void onExitImageProvider() override
armarx::RunningTask< CapturingImageProvider >::pointer_type captureTask
Capture thread.
std::mutex captureMutex
mutex for capturing for proper exit
ImageSyncMode imageSyncMode
Image synchronization information.
bool captureEnabled
Indicates that capturing is enabled and running.
The FPSCounter class provides methods for calculating the frames per second (FPS) count in periodic t...
ImageProvider abstract class defines a component which provide images via ice or shared memory.
armarx::IceSharedMemoryProvider< unsignedchar >::pointer_type sharedMemoryProvider
shared memory provider
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< SharedMemoryScopedWriteLock > SharedMemoryScopedWriteLockPtr