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