Equalizer  1.4.1
Classes | Public Member Functions | Protected Member Functions | Friends
eq::FrameData Class Reference

A holder for multiple images. More...

#include <frameData.h>

+ Inheritance diagram for eq::FrameData:
+ Collaboration diagram for eq::FrameData:

List of all members.

Classes

struct  Data
struct  ImageHeader

Public Member Functions

void assembleFrame (Frame *frame, Channel *channel)
 FrameData ()
 Construct a new frame data holder.
virtual ~FrameData ()
 Destruct this frame data.
bool addImage (const NodeFrameDataTransmitPacket *packet)
void setReady (const NodeFrameDataReadyPacket *packet)
Data Access
Frame::Type getType () const
void setType (const Frame::Type type)
 Set the storage type.
uint32_t getBuffers () const
void setBuffers (const uint32_t buffers)
 Set the enabled frame buffer attachments.
const Range & getRange () const
 Get the range.
void setRange (const Range &range)
 Set the range of this frame.
const Pixel & getPixel () const
const SubPixel & getSubPixel () const
uint32_t getPeriod () const
uint32_t getPhase () const
const ImagesgetImages () const
 The images of this frame data holder.
void setPixelViewport (const PixelViewport &pvp)
 Set the covered area for readbacks.
const PixelViewport & getPixelViewport () const
void setAlphaUsage (const bool useAlpha)
 Set alpha usage for newly allocated images.
void setQuality (const Frame::Buffer buffer, const float quality)
 Set the minimum quality after download and compression.
void setZoom (const Zoom &zoom)
const Zoom & getZoom () const
void useCompressor (const Frame::Buffer buffer, const uint32_t name)
 Sets a compressor which will be allocated and used during transmit of the image buffer.
Operations
ImagenewImage (const Frame::Type type, const DrawableConfig &config)
 Allocate and add a new image.
void clear ()
 Clear the frame by recycling the attached images.
void flush ()
 Flush the frame by deleting all images.
void deleteGLObjects (ObjectManager *om)
 Delete data allocated by the given object manager on all images.
void resetPlugins ()
 Deallocate all transfer and compression plugins on all images.
void readback (const Frame &frame, ObjectManager *glObjects, const DrawableConfig &config)
 Read back an image for this frame data.
Images startReadback (const Frame &frame, ObjectManager *glObjects, const DrawableConfig &config, const PixelViewports &regions)
 Start reading back a set of images for this frame data.
void setReady ()
 Set the frame data ready.
bool isReady () const
void waitReady (const uint32_t timeout=LB_TIMEOUT_INDEFINITE) const
 Wait for the frame data to become available.
void setVersion (const uint64_t version)
void addListener (lunchbox::Monitor< uint32_t > &listener)
 Add a ready listener.
void removeListener (lunchbox::Monitor< uint32_t > &listener)
 Remove a frame listener.
void disableBuffer (const Frame::Buffer buffer)
 Disable the usage of a frame buffer attachment for all images.

Protected Member Functions

virtual ChangeType getChangeType () const
virtual void getInstanceData (co::DataOStream &os)
 Serialize all instance information of this distributed object.
virtual void applyInstanceData (co::DataIStream &is)
 Deserialize the instance data.

Friends

struct NodeFrameDataReadyPacket
class server::FrameData

Detailed Description

A holder for multiple images.

The FrameData is used to connect the Image data for multiple frames. Equalizer uses the same frame data for all input and output frames of the same name. This enables frame-specific parameters to be set on the Frame, and generic parameters (of the output frame) to be set on the FrameData, as well as ready synchronization of the pixel data.

An application may allocate its own Frame and FrameData for application-specific purposes.

Parameters set on an Equalizer output frame data are automatically transported to the corresponding input frames.

Definition at line 56 of file include/eq/client/frameData.h.


Constructor & Destructor Documentation

Construct a new frame data holder.

Version:
1.0
virtual eq::FrameData::~FrameData ( ) [virtual]

Destruct this frame data.

Version:
1.0

Member Function Documentation

void eq::FrameData::addListener ( lunchbox::Monitor< uint32_t > &  listener)

Add a ready listener.

The listener value will will be incremented when the frame is ready, which might happen immediately.

Parameters:
listenerthe listener.
Version:
1.0
virtual void eq::FrameData::applyInstanceData ( co::DataIStream is) [protected, virtual]

Deserialize the instance data.

This method is called during object mapping to populate slave instances with the master object's data.

Parameters:
isthe input stream.

Implements co::Object.

Clear the frame by recycling the attached images.

Version:
1.0

Delete data allocated by the given object manager on all images.

void eq::FrameData::disableBuffer ( const Frame::Buffer  buffer) [inline]

Disable the usage of a frame buffer attachment for all images.

Parameters:
bufferthe buffer to disable.
Version:
1.0

Definition at line 295 of file include/eq/client/frameData.h.

Flush the frame by deleting all images.

Version:
1.0
uint32_t eq::FrameData::getBuffers ( ) const [inline]
Returns:
the enabled frame buffer attachments.
Version:
1.0

Definition at line 87 of file include/eq/client/frameData.h.

virtual ChangeType eq::FrameData::getChangeType ( ) const [inline, protected, virtual]
Returns:
how the changes are to be handled.

Reimplemented from co::Object.

Definition at line 304 of file include/eq/client/frameData.h.

References co::Object::INSTANCE.

const Images& eq::FrameData::getImages ( ) const [inline]

The images of this frame data holder.

Version:
1.0

Definition at line 137 of file include/eq/client/frameData.h.

virtual void eq::FrameData::getInstanceData ( co::DataOStream os) [protected, virtual]

Serialize all instance information of this distributed object.

Parameters:
osThe output stream.

Implements co::Object.

uint32_t eq::FrameData::getPeriod ( ) const [inline]
Returns:
the DPlex period relative to the destination channel.
Version:
1.0

Definition at line 128 of file include/eq/client/frameData.h.

uint32_t eq::FrameData::getPhase ( ) const [inline]
Returns:
the DPlex phase relative to the destination channel.
Version:
1.0

Definition at line 134 of file include/eq/client/frameData.h.

const Pixel& eq::FrameData::getPixel ( ) const [inline]
Returns:
the pixel decomposition wrt the destination channel.
Version:
1.0

Definition at line 116 of file include/eq/client/frameData.h.

const PixelViewport& eq::FrameData::getPixelViewport ( ) const [inline]
Returns:
the covered area for readbacks.
Version:
1.3.0

Definition at line 150 of file include/eq/client/frameData.h.

const Range& eq::FrameData::getRange ( ) const [inline]

Get the range.

The range is set for Equalizer frames to the range of the frame data relative to the destination channel.

Returns:
the database-range.
Version:
1.0

Definition at line 107 of file include/eq/client/frameData.h.

const SubPixel& eq::FrameData::getSubPixel ( ) const [inline]
Returns:
the subpixel decomposition wrt the destination channel.
Version:
1.0

Definition at line 122 of file include/eq/client/frameData.h.

Frame::Type eq::FrameData::getType ( ) const [inline]
Returns:
the storage type.
Version:
1.3.0

Definition at line 81 of file include/eq/client/frameData.h.

bool eq::FrameData::isReady ( ) const [inline]
Returns:
true if the frame data is ready.
Version:
1.0

Definition at line 262 of file include/eq/client/frameData.h.

Image* eq::FrameData::newImage ( const Frame::Type  type,
const DrawableConfig &  config 
)

Allocate and add a new image.

The allocated image inherits the current quality, storage type from this frame data and the internal format corresponding to the given drawable config.

Returns:
the image.
Version:
1.0
void eq::FrameData::readback ( const Frame frame,
ObjectManager glObjects,
const DrawableConfig &  config 
)

Read back an image for this frame data.

The newly read image is added to the data using newImage(). Existing images are retained.

Parameters:
framethe corresponding output frame holder.
glObjectsthe GL object manager for the current GL context.
configthe configuration of the source frame buffer.
Version:
1.0
Deprecated:
See also:
startReadback()
void eq::FrameData::removeListener ( lunchbox::Monitor< uint32_t > &  listener)

Remove a frame listener.

Parameters:
listenerthe listener.
Version:
1.0

Deallocate all transfer and compression plugins on all images.

Referenced by eqPixelBench::Channel::configExit().

+ Here is the caller graph for this function:

void eq::FrameData::setAlphaUsage ( const bool  useAlpha) [inline]

Set alpha usage for newly allocated images.

Disabling alpha allows the selection of download or compression plugins which drop the alpha channel for better performance.

Version:
1.0

Definition at line 159 of file include/eq/client/frameData.h.

void eq::FrameData::setBuffers ( const uint32_t  buffers) [inline]

Set the enabled frame buffer attachments.

The default buffers are set for Equalizer input and output frames according to the configuration, or to 0 for application-created frame datas.

Definition at line 96 of file include/eq/client/frameData.h.

Referenced by eVolve::Channel::Channel().

+ Here is the caller graph for this function:

void eq::FrameData::setPixelViewport ( const PixelViewport &  pvp) [inline]

Set the covered area for readbacks.

Preset for Equalizer output frames. The given pixel viewport is used together with the Frame offset to compute the area for the readback() operation.

Version:
1.0

Definition at line 147 of file include/eq/client/frameData.h.

void eq::FrameData::setQuality ( const Frame::Buffer  buffer,
const float  quality 
)

Set the minimum quality after download and compression.

Setting a lower quality decreases the image quality while increasing the performance of scalable rendering. An application typically selects a lower quality during interaction. Setting a quality of 1.0 provides lossless image compositing.

Version:
1.0
void eq::FrameData::setRange ( const Range &  range) [inline]

Set the range of this frame.

Version:
1.0

Definition at line 110 of file include/eq/client/frameData.h.

Set the frame data ready.

The frame data is automatically set ready by readback() and after receiving an output frame.

Version:
1.0
void eq::FrameData::setType ( const Frame::Type  type) [inline]

Set the storage type.

Version:
1.3.1

Definition at line 84 of file include/eq/client/frameData.h.

Images eq::FrameData::startReadback ( const Frame frame,
ObjectManager glObjects,
const DrawableConfig &  config,
const PixelViewports regions 
)

Start reading back a set of images for this frame data.

The newly read images are added to the data using newImage(). Existing images are retained.

Parameters:
framethe corresponding output frame holder.
glObjectsthe GL object manager for the current GL context.
configthe configuration of the source frame buffer.
regionsthe areas to read back.
Returns:
the new images which need finishReadback.
Version:
1.3.0
void eq::FrameData::useCompressor ( const Frame::Buffer  buffer,
const uint32_t  name 
)

Sets a compressor which will be allocated and used during transmit of the image buffer.

The default compressor is EQ_COMPRESSOR_AUTO which selects the most suitable compressor wrt the current image and buffer parameters.

See also:
_chooseCompressor()
Parameters:
bufferthe frame buffer attachment.
namethe compressor name.
void eq::FrameData::waitReady ( const uint32_t  timeout = LB_TIMEOUT_INDEFINITE) const

Wait for the frame data to become available.

Version:
1.0

The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1