openvideo::BufferSynchronizer Class Reference
Makes sure that a client can get a locked buffer in one thread without overwriting that buffer variable from another thread. More...
#include <State.h>
Public Member Functions | |
| BufferSynchronizer () | |
| ~BufferSynchronizer () | |
| void | assign (Buffer *newBuffer) |
| Buffer * | getLocked () |
Protected Attributes | |
| Buffer * | buffer |
| ACE_Thread_Mutex * | mutex |
Detailed Description
Makes sure that a client can get a locked buffer in one thread without overwriting that buffer variable from another thread.
Definition at line 201 of file State.h.
Constructor & Destructor Documentation
|
|
|
|
|
Definition at line 116 of file State.cxx. References buffer, mutex, and openvideo::Buffer::unlock(). |
Member Function Documentation
|
|
This methods synchronizes the assignment with the getLocked() operation and thereby makes sure that a client can always get a valid, locked buffer object.
Definition at line 128 of file State.cxx. References buffer, openvideo::Buffer::lock(), mutex, and openvideo::Buffer::unlock(). Referenced by openvideo::GLUTSink::process(). |
|
|
The calling instance is responsible for unlocking the buffer as soon as it is no longer used. Note: testing for NULL is suggested since getLocked() might return NULL, if no buffer of NULL was assigned! Definition at line 147 of file State.cxx. References buffer, openvideo::Buffer::lock(), and mutex. Referenced by openvideo::GLUTSink::updateTexture(). |
Member Data Documentation
|
|
Definition at line 224 of file State.h. Referenced by assign(), BufferSynchronizer(), getLocked(), and ~BufferSynchronizer(). |
|
|
Definition at line 225 of file State.h. Referenced by assign(), BufferSynchronizer(), getLocked(), and ~BufferSynchronizer(). |
The documentation for this class was generated from the following files:
