Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



PvDisplayThread Class Reference

Manages a display thread for rendering buffers and reporting callbacks. More...

#include <PvDisplayThread.h>

Public Member Functions

 PvDisplayThread ()
 Constructor.
 
virtual ~PvDisplayThread ()
 Destructor.
 
PvResult Start (PvPipeline *aPipeline, PvGenParameterArray *aParameters)
 Starts the display thread using the provided pipeline and parameters. More...
 
PvResult Stop (bool aWait)
 Stops the display thread. More...
 
PvResult WaitComplete ()
 Waits for the display thread to finish stopping. More...
 
bool IsRunning () const
 Indicates whether the display thread is running. More...
 
uint32_t GetPriority () const
 Gets the display thread priority. More...
 
PvResult SetPriority (uint32_t aPriority)
 Sets the display thread priority. More...
 
PvBufferRetrieveLatestBuffer ()
 Retrieves the most recent buffer from the pipeline. More...
 
void ReleaseLatestBuffer ()
 Releases the most recent buffer previously retrieved. More...
 
PvBufferRetrieveCompressedBuffer ()
 Retrieves the most recent compressed buffer. More...
 
void ReleaseCompressedBuffer ()
 Releases the most recent compressed buffer previously retrieved. More...
 
bool GetKeepPartialImagesEnabled () const
 Gets whether partial images are kept instead of dropped. More...
 
void SetKeepPartialImagesEnabled (bool aEnabled)
 Enables or disables keeping partial images. More...
 
bool GetBufferLogErrorEnabled () const
 Gets whether buffer error logging is enabled. More...
 
void SetBufferLogErrorEnabled (bool aValue)
 Enables or disables buffer error logging. More...
 
bool GetBufferLogAllEnabled () const
 Gets whether all buffer logging is enabled. More...
 
void SetBufferLogAllEnabled (bool aValue)
 Enables or disables logging for all buffers. More...
 
bool GetChunkLogEnabled () const
 Gets whether chunk data logging is enabled. More...
 
void SetChunkLogEnabled (bool aValue)
 Enables or disables chunk data logging. More...
 
PvDeinterlacingType GetDeinterlacing () const
 Gets the deinterlacing mode. More...
 
void SetDeinterlacing (PvDeinterlacingType aValue)
 Sets the deinterlacing mode. More...
 
uint32_t GetFPS () const
 Gets the current frames-per-second (FPS). More...
 
uint32_t GetTargetFPS () const
 Gets the target frames-per-second (FPS). More...
 
void SetTargetFPS (uint32_t aValue)
 Sets the target frames-per-second (FPS). More...
 
bool GetVSyncEnabled () const
 Gets whether vertical sync is enabled. More...
 
void SetVSyncEnabled (bool aEnabled)
 Enables or disables vertical sync. More...
 
bool GetDisplayChunkDataEnabled () const
 Gets whether chunk data is displayed. More...
 
void SetDisplayChunkDataEnabled (bool aEnabled)
 Enables or disables chunk data display. More...
 
PvTapGeometryEnum GetTapGeometry () const
 Gets the current tap geometry used for display. More...
 
void SetTapGeometry (PvTapGeometryEnum aGeometry)
 Sets the tap geometry used for display. More...
 
void ResetStatistics ()
 Resets display statistics. More...
 
virtual PvResult Save (PvPropertyList &aPropertyList)
 Saves display thread settings to a property list. More...
 
virtual PvResult Load (PvPropertyList &aPropertyList)
 Loads display thread settings from a property list. 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

Manages a display thread for rendering buffers and reporting callbacks.

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 buffer logging is enabled.

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

Returns
True if enabled.

◆ GetBufferLogErrorEnabled()

bool PvDisplayThread::GetBufferLogErrorEnabled ( ) const

Gets whether buffer error logging is enabled.

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

Returns
True if enabled.

◆ GetChunkLogEnabled()

bool PvDisplayThread::GetChunkLogEnabled ( ) const

Gets whether chunk data logging is enabled.

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

Returns
True if enabled.

◆ GetDeinterlacing()

PvDeinterlacingType PvDisplayThread::GetDeinterlacing ( ) const

Gets the deinterlacing mode.

Gets the current deinterlacing mode.

Only applicable if displaying an interlaced video stream.

Returns
Current deinterlacing mode.

◆ GetDisplayChunkDataEnabled()

bool PvDisplayThread::GetDisplayChunkDataEnabled ( ) const

Gets whether chunk data is displayed.

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

Gets the current frames-per-second (FPS).

Returns the average, effective frame per second rate.

Returns
Average, effective frame per second rate.

◆ GetKeepPartialImagesEnabled()

bool PvDisplayThread::GetKeepPartialImagesEnabled ( ) const

Gets whether partial images are kept instead of dropped.

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

Returns
True if partial images are kept, false otherwise.
True if the keep partial images option is enabled.

◆ GetPriority()

uint32_t PvDisplayThread::GetPriority ( ) const

Gets the display thread priority.

Returns
The display thread priority.
The priority of the thread

◆ GetTapGeometry()

PvTapGeometryEnum PvDisplayThread::GetTapGeometry ( ) const

Gets the current tap geometry used for display.

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

Gets the target frames-per-second (FPS).

Returns the targeted frame per second rate.

Returns
Targeted frame per second rate

◆ GetVSyncEnabled()

bool PvDisplayThread::GetVSyncEnabled ( ) const

Gets whether vertical sync is enabled.

Returns true if vertical synchronization flags is set.

Returns
True if VSync is enabled, false otherwise.

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

Indicates whether the display thread is running.

Returns whether the display thread is running or not.

Returns
True if the display thread is running.

◆ Load()

PvResult PvDisplayThread::Load ( PvPropertyList aPropertyList)
virtual

Loads display thread settings from a property list.

Restores a display thread options.

Parameters
[in]aPropertyListProperty list containing settings to load.
Returns
Result of the operation.

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.

◆ ReleaseCompressedBuffer()

void PvDisplayThread::ReleaseCompressedBuffer ( )

Releases the most recent compressed buffer previously retrieved.

Releases the buffer obtained through RetrieveCompressedBuffer.

◆ ReleaseLatestBuffer()

void PvDisplayThread::ReleaseLatestBuffer ( )

Releases the most recent buffer previously retrieved.

Releases the buffer obtained through RetrieveLatestBuffer.

◆ ResetStatistics()

void PvDisplayThread::ResetStatistics ( )

Resets display statistics.

Resets the statistics of the display thread.

◆ RetrieveCompressedBuffer()

PvBuffer * PvDisplayThread::RetrieveCompressedBuffer ( )

Retrieves the most recent compressed buffer.

Returns a pointer to the latest compressed buffer.

Returns
Pointer to the most recent compressed PvBuffer.

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

Returns
A pointer to the latest compressed buffer

◆ RetrieveLatestBuffer()

PvBuffer * PvDisplayThread::RetrieveLatestBuffer ( )

Retrieves the most recent buffer from the pipeline.

Returns a pointer to the latest retrieved buffer.

Returns
Pointer to the most recent PvBuffer.

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

Saves display thread settings to a property list.

Persists the current display thread configuration.

Parameters
[out]aPropertyListProperty list to receive current settings.
Returns
Result of the operation.

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)

Enables or disables logging for all buffers.

Sets whether all buffers are logged or not.

Parameters
[in]aValueTrue to log all buffers, false to disable.
aValue[in] True if enabled.

◆ SetBufferLogErrorEnabled()

void PvDisplayThread::SetBufferLogErrorEnabled ( bool  aValue)

Enables or disables buffer error logging.

Sets whether buffer errors are logged or not.

Parameters
[in]aValueTrue to log buffer errors, false to disable.
aValue[in] True if enabled.

◆ SetChunkLogEnabled()

void PvDisplayThread::SetChunkLogEnabled ( bool  aValue)

Enables or disables chunk data logging.

Sets whether buffer chunks are logged or not.

Parameters
[in]aValueTrue to enable chunk logging, false to disable.
aValue[in] True if enabled.

◆ SetDeinterlacing()

void PvDisplayThread::SetDeinterlacing ( PvDeinterlacingType  aValue)

Sets the deinterlacing mode.

Parameters
[in]aValueDeinterlacing mode to apply.

Only applicable if display an interlaced video stream.

Parameters
[in]aValueDeinterlacing mdoe.

◆ SetDisplayChunkDataEnabled()

void PvDisplayThread::SetDisplayChunkDataEnabled ( bool  aEnabled)

Enables or disables chunk data display.

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

Parameters
[in]aEnabledTrue to display chunk data, false otherwise.

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)

Enables or disables keeping partial images.

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

Parameters
[in]aEnabledTrue to keep partial images, false to drop them.
[in]aEnabledTrue to attempt to display partial images.

◆ SetPriority()

PvResult PvDisplayThread::SetPriority ( uint32_t  aPriority)

Sets the display thread priority.

Set the priority of the display thread.

Parameters
[in]aPriorityPriority value to assign to the display thread.
Returns
Result of the operation.

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 used for display.

Sets the tap geometry to be used to tap reconstruction.

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

◆ SetTargetFPS()

void PvDisplayThread::SetTargetFPS ( uint32_t  aValue)

Sets the target frames-per-second (FPS).

Sets the targeted frame per second rate.

Parameters
[in]aValueTarget FPS value.
[in]aValueTargeted frame per second rate.

◆ SetVSyncEnabled()

void PvDisplayThread::SetVSyncEnabled ( bool  aEnabled)

Enables or disables vertical sync.

Sets vertical synchronization flag.

Parameters
[in]aEnabledTrue to enable VSync, false to disable.

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 using the provided pipeline and parameters.

Starts the display thread.

Parameters
[in]aPipelinePointer to the PvPipeline to retrieve buffers from.
[in]aParametersPointer to the PvGenParameterArray for configuration.
Returns
Result of the operation.
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]aWaitIndicates whether to wait for the thread to stop.
Returns
Result of the operation.
Parameters
[in]aWaitIf true, waits until the thread completes. If false, call WaitComplete to wait
Returns
Includes:

◆ WaitComplete()

PvResult PvDisplayThread::WaitComplete ( )

Waits for the display thread to finish stopping.

Stops the display thread.

Returns
Result of the operation.
Includes:

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

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