Argus Camera Sample Argus Camera Sample

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Types | Private Attributes
ArgusSamples::Composer Class Reference

The composer is used to render multiple EGL streams into the windows. More...

`#include <Composer.h>`

List of all members.

## 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

## Detailed Description

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.

## Member Typedef Documentation

typedef std::list<Stream> ArgusSamples::Composer::StreamList

private

a list of streams

Definition at line 155 of file Composer.h.

## Constructor & Destructor Documentation

ArgusSamples::Composer::Composer | ( |  | ) |

Definition at line 47 of file Composer.cpp.

ArgusSamples::Composer::~Composer | ( |  | ) |

Definition at line 58 of file Composer.cpp.

## Member Function Documentation

bool ArgusSamples::Composer::bindStream | ( | EGLStreamKHR | eglStream | ) |

Bind an EGL stream.

A bound and active stream is rendered. Newly bound streams are inactive.

Parameters:

  eglStream | [in]

Definition at line 115 of file Composer.cpp.

const GLContext& ArgusSamples::Composer::getContext | ( |  | ) | const

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.

bool ArgusSamples::Composer::onResize | ( | uint32_t | width,
|  | uint32_t | height
| ) |  |

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.

Parameters:

  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.

Parameters:

  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.

bool ArgusSamples::Composer::threadExecute | ( |  | ) |

privatevirtual

Definition at line 271 of file Composer.cpp.

bool ArgusSamples::Composer::threadInitialize | ( |  | ) |

privatevirtual

Definition at line 223 of file Composer.cpp.

bool ArgusSamples::Composer::threadShutdown | ( |  | ) |

privatevirtual

Definition at line 372 of file Composer.cpp.

bool ArgusSamples::Composer::unbindStream | ( | EGLStreamKHR | eglStream | ) |

Unbind a bound EGL stream.

Parameters:

  eglStream | [in]

Definition at line 139 of file Composer.cpp.

## Member Data Documentation

Ordered<uint32_t> ArgusSamples::Composer::m_clientSequence

private

client sequence counter

Definition at line 135 of file Composer.h.

uint32_t ArgusSamples::Composer::m_composerSequence

private

composer sequence counter

Definition at line 137 of file Composer.h.

GLContext ArgusSamples::Composer::m_context

private

GL context.

Definition at line 125 of file Composer.h.

bool ArgusSamples::Composer::m_initialized

private

set if initialized

Definition at line 124 of file Composer.h.

Mutex ArgusSamples::Composer::m_mutex

private

to protect access to the stream array

Definition at line 131 of file Composer.h.

uint32_t ArgusSamples::Composer::m_program

private

program to render streams

Definition at line 126 of file Composer.h.

ConditionVariable ArgusSamples::Composer::m_sequenceCond

private

sequence condition variable

Definition at line 134 of file Composer.h.

Mutex ArgusSamples::Composer::m_sequenceMutex

private

sequence mutex

Definition at line 133 of file Composer.h.

StreamList ArgusSamples::Composer::m_streams

private

the list of composed streams

Definition at line 156 of file Composer.h.

float ArgusSamples::Composer::m_windowAspectRatio

private

window aspect ratio

Definition at line 129 of file Composer.h.

uint32_t ArgusSamples::Composer::m_windowHeight

private

window height

Definition at line 128 of file Composer.h.

uint32_t ArgusSamples::Composer::m_windowWidth

private

window width

Definition at line 127 of file Composer.h.

The documentation for this class was generated from the following files:

- renderer/Composer.h
- renderer/Composer.cpp