Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvDisplayThread Class Reference

Thread taking buffers out of a PvPipeline in order to display them. More...

Public Member Functions

 PvDisplayThread ()
 Constructor.
 
virtual ~PvDisplayThread ()
 Destructor.
 
PvResult Start (PvPipeline *aPipeline, PvGenParameterArray *aParameters)
 Starts the display thread. More...
 
PvResult Stop (bool aWait)
 Stops the display thread. More...
 
PvResult WaitComplete ()
 Stops the display thread. More...
 
bool IsRunning () const
 Returns whether the display thread is running or not. More...
 
uint32_t GetPriority () const
 Gets the display thread priority. More...
 
PvResult SetPriority (uint32_t aPriority)
 Set the priority of the display thread. More...
 
PvBufferRetrieveLatestBuffer ()
 Returns a pointer to the latest retrieved buffer. More...
 
void ReleaseLatestBuffer ()
 Releases the buffer obtained through RetrieveLatestBuffer.
 
bool GetKeepPartialImagesEnabled () const
 Returns true if the display thread will attempt to display partial images. More...
 
void SetKeepPartialImagesEnabled (bool aEnabled)
 Sets whether or not the display thread will attempt to display partial images. More...
 
bool GetBufferLogErrorEnabled () const
 Gets whether buffer errors are logged (invoking the log callback) More...
 
void SetBufferLogErrorEnabled (bool aValue)
 Sets whether buffer errors are logged or not. More...
 
bool GetBufferLogAllEnabled () const
 Gets whether all buffers are logged (invoking the log callback) More...
 
void SetBufferLogAllEnabled (bool aValue)
 Sets whether all buffers are logged or not. More...
 
bool GetChunkLogEnabled () const
 Gets whether buffer chunks are logged (invoking the log callback) More...
 
void SetChunkLogEnabled (bool aValue)
 Sets whether buffer chunks are logged or not. More...
 
PvDeinterlacingType GetDeinterlacing () const
 Gets the current deinterlacing mode. More...
 
void SetDeinterlacing (PvDeinterlacingType aValue)
 Sets the deinterlacing mode. More...
 
uint32_t GetFPS () const
 Returns the average, effective frame per second rate. More...
 
uint32_t GetTargetFPS () const
 Returns the targeted frame per second rate. More...
 
void SetTargetFPS (uint32_t aValue)
 Sets the targeted frame per second rate. More...
 
bool GetVSyncEnabled () const
 Returns true if vertical synchronization flags is set. More...
 
void SetVSyncEnabled (bool aEnabled)
 Sets vertical synchronization flag. More...
 
bool GetDisplayChunkDataEnabled () const
 Returns true if data chunks should be displayed as a text overlay. More...
 
void SetDisplayChunkDataEnabled (bool aEnabled)
 Sets if the data chunks should be displayed as a text overlay. More...
 
PvTapGeometryEnum GetTapGeometry () const
 Returns the tap geometry the display thread is configured with. More...
 
void SetTapGeometry (PvTapGeometryEnum aGeometry)
 Sets the tap geometry to be used to tap reconstruction. More...
 
void ResetStatistics ()
 Resets the statistics of the display thread.
 
virtual PvResult Save (PvPropertyList &aPropertyList)
 Persists the current display thread configuration. More...
 
virtual PvResult Load (PvPropertyList &aPropertyList)
 Restores a display thread options. More...
 

Protected Member Functions

virtual void OnBufferRetrieved (PvBuffer *aBuffer)
 Override to get a callback when a buffer is retrieved from the pipeline. More...
 
virtual void OnBufferDisplay (PvBuffer *aBuffer)
 Override to get a callback when a buffer needs to be displayed. More...
 
virtual void OnBufferDone (PvBuffer *aBuffer)
 Override to get a just before a buffers is returned to the pipeline. More...
 
virtual void OnBufferLog (const PvString &aLog)
 Override to get a logging events from the display thread. More...
 
virtual void OnBufferTextOverlay (const PvString &aText)
 Override to get a callback about a text overlay to be displayed. More...
 

Detailed Description

Thread taking buffers out of a PvPipeline in order to display them.

Inherit your own display thread from this class and override the virtual protected members to carry own the tasks of the display thread.

This class does not know about the display object. It interacts with your display through OnBufferXXX methods.

Member Function Documentation

◆ GetBufferLogAllEnabled()

bool PvDisplayThread::GetBufferLogAllEnabled ( ) const

Gets whether all buffers are logged (invoking the log callback)

Returns
True if enabled.

◆ GetBufferLogErrorEnabled()

bool PvDisplayThread::GetBufferLogErrorEnabled ( ) const

Gets whether buffer errors are logged (invoking the log callback)

Returns
True if enabled.

◆ GetChunkLogEnabled()

bool PvDisplayThread::GetChunkLogEnabled ( ) const

Gets whether buffer chunks are logged (invoking the log callback)

Returns
True if enabled.

◆ GetDeinterlacing()

PvDeinterlacingType PvDisplayThread::GetDeinterlacing ( ) const

Gets the current deinterlacing mode.

Only applicable if displaying an interlaced video stream.

Returns
Current deinterlacing mode.

◆ GetDisplayChunkDataEnabled()

bool PvDisplayThread::GetDisplayChunkDataEnabled ( ) const

Returns true if data chunks should be displayed as a text overlay.

The specialized class must implement the right overloaded method in order to receive text overlay updates from this class.

Returns
True if chunk data is displayed.

◆ GetFPS()

uint32_t PvDisplayThread::GetFPS ( ) const

Returns the average, effective frame per second rate.

Returns
Average, effective frame per second rate.

◆ GetKeepPartialImagesEnabled()

bool PvDisplayThread::GetKeepPartialImagesEnabled ( ) const

Returns true if the display thread will attempt to display partial images.

Returns
True if the keep partial images option is enabled.

◆ GetPriority()

uint32_t PvDisplayThread::GetPriority ( ) const

Gets the display thread priority.

Returns
The priority of the thread

◆ GetTapGeometry()

PvTapGeometryEnum PvDisplayThread::GetTapGeometry ( ) const

Returns the tap geometry the display thread is configured with.

If set to a valid tap geometry, tap reconstruction is performed before displaying the image.

Disabled by default (PvTapGeometryUnknown).

Returns
Active tap geometry for the display thread.

◆ GetTargetFPS()

uint32_t PvDisplayThread::GetTargetFPS ( ) const

Returns the targeted frame per second rate.

Returns
Targeted frame per second rate

◆ GetVSyncEnabled()

bool PvDisplayThread::GetVSyncEnabled ( ) const

Returns true if vertical synchronization flags is set.

The display thread does not use this flag, it only keeps it value so it can be read by specialized classes to request a vertical synchronization when a buffer is displayed.

Returns
Synchronization flag value.

◆ IsRunning()

bool PvDisplayThread::IsRunning ( ) const

Returns whether the display thread is running or not.

Returns
True if the display thread is running.

◆ Load()

PvResult PvDisplayThread::Load ( PvPropertyList aPropertyList)
virtual

Restores a display thread options.

The load works on a best effort basis. Whatever can be restored will be restored.

The order to properties in the aPropertyList is not important.

Defined as virtual. Can override in order to load configuration specific to specialized classes.

Parameters
[in]aPropertyListA list of name/value pairs.
Returns
Includes:

◆ OnBufferDisplay()

void PvDisplayThread::OnBufferDisplay ( PvBuffer aBuffer)
protectedvirtual

Override to get a callback when a buffer needs to be displayed.

Since the display thread does not own the display (the application owning the display thread usually does) this callback is used to ask the application to display a buffer on screen.

Parameters
[in]aBufferThe buffer to display.

◆ OnBufferDone()

void PvDisplayThread::OnBufferDone ( PvBuffer aBuffer)
protectedvirtual

Override to get a just before a buffers is returned to the pipeline.

Parameters
[in]aBufferThe buffer about to be returned to the pipeline.

◆ OnBufferLog()

void PvDisplayThread::OnBufferLog ( const PvString aLog)
protectedvirtual

Override to get a logging events from the display thread.

The display thread can be configured to generate various log events. The display thread does not have its own log, it simply calls OnBufferLog. The application must override OnBufferLog and funnel the log entry into its own log.

Parameters
[in]aLogThe string to append to a log.

◆ OnBufferRetrieved()

void PvDisplayThread::OnBufferRetrieved ( PvBuffer aBuffer)
protectedvirtual

Override to get a callback when a buffer is retrieved from the pipeline.

Parameters
[in]aBufferThe buffer retrieved from the pipeline.

◆ OnBufferTextOverlay()

void PvDisplayThread::OnBufferTextOverlay ( const PvString aText)
protectedvirtual

Override to get a callback about a text overlay to be displayed.

Since the display thread does not own the display (the application owning the display thread usually does) this callback is used to ask the application to display a text overlay.

A text overlay can be expected if chunk display is enabled and the buffers retrieved from PvBuffer data chunks.

Parameters
[in]aTextThe text overlay to be displayed.

◆ RetrieveLatestBuffer()

PvBuffer * PvDisplayThread::RetrieveLatestBuffer ( )

Returns a pointer to the latest retrieved buffer.

Important: calling this method pretty much blocks the display thread. You need to call ReleaseLatestBuffer in order to unblock the display thread.

Returns
A pointer to the latest retrieved buffer

◆ Save()

PvResult PvDisplayThread::Save ( PvPropertyList aPropertyList)
virtual

Persists the current display thread configuration.

This call builds a list of properties containing pairs of names/values.

Defined as virtual. Can override in order to save configuration specific to specialized classes. Call the base implementation first.

Parameters
[in]aPropertyListA list of pairs of names/values.
Returns
Includes:

◆ SetBufferLogAllEnabled()

void PvDisplayThread::SetBufferLogAllEnabled ( bool  aValue)

Sets whether all buffers are logged or not.

Parameters
aValue[in] True if enabled.

◆ SetBufferLogErrorEnabled()

void PvDisplayThread::SetBufferLogErrorEnabled ( bool  aValue)

Sets whether buffer errors are logged or not.

Parameters
aValue[in] True if enabled.

◆ SetChunkLogEnabled()

void PvDisplayThread::SetChunkLogEnabled ( bool  aValue)

Sets whether buffer chunks are logged or not.

Parameters
aValue[in] True if enabled.

◆ SetDeinterlacing()

void PvDisplayThread::SetDeinterlacing ( PvDeinterlacingType  aValue)

Sets the deinterlacing mode.

Only applicable if display an interlaced video stream.

Parameters
[in]aValueDeinterlacing mdoe.

◆ SetDisplayChunkDataEnabled()

void PvDisplayThread::SetDisplayChunkDataEnabled ( bool  aEnabled)

Sets if the data chunks should be displayed as a text overlay.

The specialized class must implement the right overloaded method in order to receive text overlay updates from this class.

Parameters
aEnabled[in] New display chunk data mode.

◆ SetKeepPartialImagesEnabled()

void PvDisplayThread::SetKeepPartialImagesEnabled ( bool  aEnabled)

Sets whether or not the display thread will attempt to display partial images.

Parameters
[in]aEnabledTrue to attempt to display partial images.

◆ SetPriority()

PvResult PvDisplayThread::SetPriority ( uint32_t  aPriority)

Set the priority of the display thread.

See PvDevice::GetHeartbeatThreadPriority

Parameters
[in]aPrioritySee PvPipeline::SetBufferHandlingThreadPriority for description of the supported values
Returns
Includes:

◆ SetTapGeometry()

void PvDisplayThread::SetTapGeometry ( PvTapGeometryEnum  aGeometry)

Sets the tap geometry to be used to tap reconstruction.

Parameters
[in]aGeometryTap geometry: use PvTapGeometryUnknown to disable.

◆ SetTargetFPS()

void PvDisplayThread::SetTargetFPS ( uint32_t  aValue)

Sets the targeted frame per second rate.

Parameters
[in]aValueTargeted frame per second rate.

◆ SetVSyncEnabled()

void PvDisplayThread::SetVSyncEnabled ( bool  aEnabled)

Sets vertical synchronization flag.

The display thread does not use this flag, it only keeps it value so it can be read by specialized classes to request a vertical synchronization when a buffer is displayed.

This flag will only have an effect if it is used when the specialized class. Not all display implementations support vertical synchronization.

Parameters
aEnabled[in] New vertical synchronization flag.

◆ Start()

PvResult PvDisplayThread::Start ( PvPipeline aPipeline,
PvGenParameterArray aParameters 
)

Starts the display thread.

Parameters
[in]aPipelineThe pipeline to retrieve the buffers from.
[in]aParametersThe display thread parameters.
Returns
Includes:

◆ Stop()

PvResult PvDisplayThread::Stop ( bool  aWait)

Stops the display thread.

Parameters
[in]aWaitIf true, waits until the thread completes. If false, call WaitComplete to wait
Returns
Includes:

◆ WaitComplete()

PvResult PvDisplayThread::WaitComplete ( )

Stops the display thread.

Returns
Includes:

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

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