MediaX v1.0.0rc7 [7e6cb74]
Video streaming for military vehicles
Loading...
Searching...
No Matches
mediax::DisplayManagerBase Class Referenceabstract

The display manager class. More...

#include <display_manager_base.h>

Inheritance diagram for mediax::DisplayManagerBase:
Inheritance graph
Collaboration diagram for mediax::DisplayManagerBase:
Collaboration graph

Public Member Functions

 DisplayManagerBase (std::string name="")
 Construct a new Display Manager object.
 
virtual ~DisplayManagerBase ()=default
 Destroy the Display Manager object.
 
virtual Status Initalise ()=0
 Initalise the display manager.
 
virtual void Run ()=0
 The main event loop if there is one.
 
virtual void Stop ()
 Stop the main loop if there is one.
 
virtual Resolution GetResolution ()=0
 Get the Resolution attribute.
 
void SetResolution (Resolution resolution)
 Set the Resolution object.
 
std::string GetName ()
 Get the Name object.
 
virtual int GetBytesPerPixel ()=0
 Get the Bits Per Pixel object.
 
virtual mediax::rtp::ColourspaceType GetColourspace ()
 Get the Colourspace object.
 
virtual Status DisplayBuffer (uint8_t *frame_buffer, Resolution resolution, std::string text)=0
 Buffer must be in the format RGBA.
 
Status Rescale (uint8_t *frame_buffer, void *display_buffer, Resolution resolution, int height, int width)
 Rescale the video if needed.
 
virtual void Flush ()=0
 Flush the framebuffer /dev/fb0.
 
virtual void ToggleFullscreen ()
 Toggle Fullscreen object.
 

Data Fields

Resolution last_requested_resolution_ = {0, 0, 0}
 Last requested resolution.
 
std::vector< uint8_t > scaled_frame_buffer_
 Scaled frame buffer for resolutions that do not match the display.
 
std::string name_
 The name of the display, can be used in the window title if windowing is supported.
 

Detailed Description

The display manager class.

Member Function Documentation

◆ DisplayBuffer()

virtual Status mediax::DisplayManagerBase::DisplayBuffer ( uint8_t *  frame_buffer,
Resolution  resolution,
std::string  text 
)
pure virtual

Buffer must be in the format RGBA.

Parameters
frame_bufferthe frame buffer to display
resolutionthe resolution of the frame buffer
textThe text to display
Returns
Status

Implemented in mediax::fb::DisplayManager, mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.

◆ Flush()

virtual void mediax::DisplayManagerBase::Flush ( )
pure virtual

Flush the framebuffer /dev/fb0.

Implemented in mediax::fb::DisplayManager, mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.

◆ GetBytesPerPixel()

virtual int mediax::DisplayManagerBase::GetBytesPerPixel ( )
pure virtual

Get the Bits Per Pixel object.

Returns
int Always return the bits per pixel needed for buffer allocation

Implemented in mediax::fb::DisplayManager, mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.

◆ GetColourspace()

virtual mediax::rtp::ColourspaceType mediax::DisplayManagerBase::GetColourspace ( )
inlinevirtual

◆ GetName()

std::string mediax::DisplayManagerBase::GetName ( )
inline

Get the Name object.

Returns
std::string

◆ GetResolution()

virtual Resolution mediax::DisplayManagerBase::GetResolution ( )
pure virtual

◆ Initalise()

virtual Status mediax::DisplayManagerBase::Initalise ( )
pure virtual

Initalise the display manager.

Returns
Status

Implemented in mediax::fb::DisplayManager, mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.

◆ Rescale()

Status mediax::DisplayManagerBase::Rescale ( uint8_t *  frame_buffer,
void *  display_buffer,
Resolution  resolution,
int  height,
int  width 
)

Rescale the video if needed.

Parameters
frame_bufferThe video buffer
display_bufferThe scaled video buffer
resolutionThe video buffer resolution
heightThe required height
widthThe required width
Returns
Status Returns kSuccess if the video was scales, kFailure if no scaling required, kError if an error

◆ Run()

virtual void mediax::DisplayManagerBase::Run ( )
pure virtual

The main event loop if there is one.

Implemented in mediax::fb::DisplayManager, mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.

◆ SetResolution()

void mediax::DisplayManagerBase::SetResolution ( Resolution  resolution)
inline

Set the Resolution object.

Parameters
resolution

◆ Stop()

virtual void mediax::DisplayManagerBase::Stop ( )
inlinevirtual

Stop the main loop if there is one.

Reimplemented in mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.

◆ ToggleFullscreen()

virtual void mediax::DisplayManagerBase::ToggleFullscreen ( )
inlinevirtual

Toggle Fullscreen object.

Reimplemented in mediax::gtk4::DisplayManager, and mediax::sdl::DisplayManager.


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