Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvPipelineEventSink Class Reference

Observer interface for an observable PvPipeline object. More...

Public Member Functions

 PvPipelineEventSink ()
 PvPipeline event sink constructor.
 
virtual ~PvPipelineEventSink ()
 PvPipeline event sink destructor.
 
virtual void OnBufferCreated (PvPipeline *aPipeline, PvBuffer *aBuffer)
 Called whenever a PvBuffer is allocated by the pipeline. More...
 
virtual void OnBufferDeleted (PvPipeline *aPipeline, PvBuffer *aBuffer)
 Called whenever a PvBuffer is deleted by the pipeline. More...
 
virtual void OnStart (PvPipeline *aPipeline)
 PvPipeline event sink OnStart event. More...
 
virtual void OnStop (PvPipeline *aPipeline)
 PvPipeline event sink OnStop event. More...
 
virtual void OnReset (PvPipeline *aPipeline)
 PvPipeline event sink OnReset event. More...
 
virtual void OnBufferTooSmall (PvPipeline *aPipeline, bool *aReallocAll, bool *aResetStats)
 PvPipeline event sink OnBufferTooSmall event. More...
 
virtual void OnBufferReady (PvPipeline *aPipeline)
 PvPipeline event sink OnBufferReady event. More...
 

Detailed Description

Observer interface for an observable PvPipeline object.

PvPipelineEventSink defines a set of callback methods from a PvPIpeline object to any object implementing this interface.

To receive PvPipeline notifications:

  1. Create an instance of your MySink class.
  2. Register your MySink class with the PvPipeline object. Use PvPipeline::RegisterEventSink.
  3. Handle events when PvPipeline calls your overriden methods.

Member Function Documentation

◆ OnBufferCreated()

void PvPipelineEventSink::OnBufferCreated ( PvPipeline aPipeline,
PvBuffer aBuffer 
)
virtual

Called whenever a PvBuffer is allocated by the pipeline.

Can be used to track memory usage or structures used to follow PvBuffer pipeline management.

This method is invoked right after the PvBuffer has been created but before its payload has been allocated.

Parameters
[in]aPipelineA pointer to the PvPipeline object.
[in]aBufferPointer to the buffer that was just created.

◆ OnBufferDeleted()

void PvPipelineEventSink::OnBufferDeleted ( PvPipeline aPipeline,
PvBuffer aBuffer 
)
virtual

Called whenever a PvBuffer is deleted by the pipeline.

Can be used to track memory usage or structures used to follow PvBuffer pipeline management.

This method is invoked right before the PvBuffer is deleted.

Parameters
[in]aPipelineA pointer to the PvPipeline object.
[in]aBufferPointer to the buffer that was just deleted.

◆ OnBufferReady()

void PvPipelineEventSink::OnBufferReady ( PvPipeline aPipeline)
virtual

PvPipeline event sink OnBufferReady event.

Invoked after a buffer has been retrieved from stream and is ready for retrieve

Parameters
[in]aPipelineA pointer to the PvPipeline object.

◆ OnBufferTooSmall()

void PvPipelineEventSink::OnBufferTooSmall ( PvPipeline aPipeline,
bool *  aReallocAll,
bool *  aResetStats 
)
virtual

PvPipeline event sink OnBufferTooSmall event.

Invoked when the pipeline retrieve a buffer from the stream object which failed with an operation result set to BUFFER_TOO_SMALL.

The user can set aRealloc all to true in order to force a complete re-allocation of the buffers performed synchronously after the notification is invoked.

If OnBufferTooSmall is not handled to aReallocAll is set to false, the buffer is re-allocated before being queued in the stream object but the other buffers are not affected until they too will fail on BUFFER_TOO_SMALL.

The aResetStats parameter is only considered if aReallocAll is set to true. The statistics do not need to be reset if the buffers are not re-allocated.

This callback is invoked from the pipeline thread.

Parameters
[in]aPipelineA pointer to the PvPipeline object.
[in]aReallocAllIf set to true by at least one of the sinks, synchronous buffer re-allocation will be performed.
[in]aResetStatsIf set to true by at least one of the sinks, stream statistics are reset.

◆ OnReset()

void PvPipelineEventSink::OnReset ( PvPipeline aPipeline)
virtual

PvPipeline event sink OnReset event.

Invoked after the pipeline has been reset.

This callback is invoked from the same thread that called PvPipeline::Reset.

Parameters
[in]aPipelineA pointer to the PvPipeline object.

◆ OnStart()

void PvPipelineEventSink::OnStart ( PvPipeline aPipeline)
virtual

PvPipeline event sink OnStart event.

Invoked when the pipeline just before the pipeline starts.

This callback is invoked from the same thread that called PvPipeline::Start.

Parameters
[in]aPipelineA pointer to the PvPipeline object.

◆ OnStop()

void PvPipelineEventSink::OnStop ( PvPipeline aPipeline)
virtual

PvPipeline event sink OnStop event.

Invoked right after the pipeline has been stopped.

This callback is invoked from the same thread that called PvPipeline::Stop.

Parameters
[in]aPipelineA pointer to the PvPipeline object.

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

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com