Argus Camera Sample
Argus Camera Sample
|
The composer is used to render multiple EGL streams into the windows. More...
#include <Composer.h>
Classes | |
class | Stream |
Each bound EGL stream has a stream consumer and can be active or inactive. More... |
Public Member Functions | |
Composer () | |
~Composer () | |
bool | initialize () |
bool | shutdown () |
bool | bindStream (EGLStreamKHR eglStream) |
Bind an EGL stream. | |
bool | unbindStream (EGLStreamKHR eglStream) |
Unbind a bound EGL stream. | |
bool | setStreamActive (EGLStreamKHR eglStream, bool active) |
Set the active state of the stream, only active streams are rendered. | |
bool | setStreamAspectRatio (EGLStreamKHR eglStream, float aspectRatio) |
Set the stream aspect ratio. | |
const GLContext & | getContext () const |
Get the GL context the composer is rendering into. | |
bool | reCompose () |
Trigger a re-compose. |
Private Types | |
typedef std::list< Stream > | StreamList |
a list of streams |
Private Member Functions | |
Thread methods | |
virtual bool | threadInitialize () |
virtual bool | threadExecute () |
virtual bool | threadShutdown () |
IResizeObserver methods | |
virtual bool | onResize (uint32_t width, uint32_t height) |
Private Attributes | |
bool | m_initialized |
set if initialized | |
GLContext | m_context |
GL context. | |
uint32_t | m_program |
program to render streams | |
uint32_t | m_windowWidth |
window width | |
uint32_t | m_windowHeight |
window height | |
float | m_windowAspectRatio |
window aspect ratio | |
Mutex | m_mutex |
to protect access to the stream array | |
Mutex | m_sequenceMutex |
sequence mutex | |
ConditionVariable | m_sequenceCond |
sequence condition variable | |
Ordered< uint32_t > | m_clientSequence |
client sequence counter | |
uint32_t | m_composerSequence |
composer sequence counter | |
StreamList | m_streams |
the list of composed streams |
The composer is used to render multiple EGL streams into the windows.
The streams are arranged into a regular grid. Streams are only composed if the client indicates that by calling reCompose(). This updates a client sequence count and wakes up the composer thread. All functions modifying the stream configuration (bind/unbind/setActive/setAspectRatio) need to trigger a re-compose.
Definition at line 58 of file Composer.h.
|
private |
a list of streams
Definition at line 155 of file Composer.h.
ArgusSamples::Composer::Composer | ( | ) |
Definition at line 47 of file Composer.cpp.
ArgusSamples::Composer::~Composer | ( | ) |
Definition at line 58 of file Composer.cpp.
bool ArgusSamples::Composer::bindStream | ( | EGLStreamKHR | eglStream | ) |
Bind an EGL stream.
A bound and active stream is rendered. Newly bound streams are inactive.
eglStream | [in] |
Definition at line 115 of file Composer.cpp.
|
inline |
Get the GL context the composer is rendering into.
Definition at line 100 of file Composer.h.
bool ArgusSamples::Composer::initialize | ( | ) |
Definition at line 63 of file Composer.cpp.
|
privatevirtual |
Definition at line 215 of file Composer.cpp.
bool ArgusSamples::Composer::reCompose | ( | ) |
Trigger a re-compose.
Called when new images arrived in a stream or the stream configuration changed.
Definition at line 204 of file Composer.cpp.
bool ArgusSamples::Composer::setStreamActive | ( | EGLStreamKHR | eglStream, |
bool | active | ||
) |
Set the active state of the stream, only active streams are rendered.
eglStream | [in] |
active | [in] |
Definition at line 162 of file Composer.cpp.
bool ArgusSamples::Composer::setStreamAspectRatio | ( | EGLStreamKHR | eglStream, |
float | aspectRatio | ||
) |
Set the stream aspect ratio.
eglStream | [in] |
aspectRatio | [in] aspect ration of the images transported by the stream |
Definition at line 183 of file Composer.cpp.
bool ArgusSamples::Composer::shutdown | ( | ) |
Definition at line 88 of file Composer.cpp.
|
privatevirtual |
Definition at line 271 of file Composer.cpp.
|
privatevirtual |
Definition at line 223 of file Composer.cpp.
|
privatevirtual |
Definition at line 372 of file Composer.cpp.
bool ArgusSamples::Composer::unbindStream | ( | EGLStreamKHR | eglStream | ) |
|
private |
client sequence counter
Definition at line 135 of file Composer.h.
|
private |
composer sequence counter
Definition at line 137 of file Composer.h.
|
private |
GL context.
Definition at line 125 of file Composer.h.
|
private |
set if initialized
Definition at line 124 of file Composer.h.
|
private |
to protect access to the stream array
Definition at line 131 of file Composer.h.
|
private |
program to render streams
Definition at line 126 of file Composer.h.
|
private |
sequence condition variable
Definition at line 134 of file Composer.h.
|
private |
sequence mutex
Definition at line 133 of file Composer.h.
|
private |
the list of composed streams
Definition at line 156 of file Composer.h.
|
private |
window aspect ratio
Definition at line 129 of file Composer.h.
|
private |
window height
Definition at line 128 of file Composer.h.
|
private |
window width
Definition at line 127 of file Composer.h.