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

The display manager class. More...

#include <display_manager_fb.h>

Inheritance diagram for mediax::fb::DisplayManager:
Inheritance graph
Collaboration diagram for mediax::fb::DisplayManager:
Collaboration graph

Public Member Functions

 DisplayManager ()=default
 Construct a new Display Manager object.
 
 ~DisplayManager ()
 Destroy the Display Manager object.
 
 DisplayManager (const DisplayManager &)=delete
 Construct a new Display Manager object (deleted)
 
DisplayManageroperator= (const DisplayManager &)=delete
 Delete the copy operator.
 
Status Initalise () override
 Initalise the display manager.
 
void Run () override
 Run the main loop if these is one.
 
Resolution GetResolution () override
 Get the Resolution attribute.
 
int GetBytesPerPixel () final
 Get the Bits Per Pixel object.
 
mediax::rtp::ColourspaceType GetColourspace () final
 Get the Colourspace object.
 
Status DisplayBuffer (uint8_t *frame_buffer, Resolution resolution, std::string text) override
 Buffer must be in the format RGBA.
 
void Flush () override
 Flush the framebuffer /dev/fb0.
 
- Public Member Functions inherited from mediax::DisplayManagerBase
 DisplayManagerBase (std::string name="")
 Construct a new Display Manager object.
 
virtual ~DisplayManagerBase ()=default
 Destroy the Display Manager object.
 
virtual void Stop ()
 Stop the main loop if there is one.
 
void SetResolution (Resolution resolution)
 Set the Resolution object.
 
std::string GetName ()
 Get the Name object.
 
Status Rescale (uint8_t *frame_buffer, void *display_buffer, Resolution resolution, int height, int width)
 Rescale the video if needed.
 
virtual void ToggleFullscreen ()
 Toggle Fullscreen object.
 

Private Attributes

std::string fb_name_ = "/dev/fb0"
 Frame buffer device name.
 
void * frame_buffer_
 Frame buffer device.
 
struct fb_fix_screeninfo fix_info_
 Frame buffer device.
 
struct fb_var_screeninfo var_info_
 Frame buffer info.
 
int32_t frame_buffer_frame_device_
 Frame buffer device handle.
 
bool initaliased_ = false
 Initalized flag.
 

Additional Inherited Members

- Data Fields inherited from mediax::DisplayManagerBase
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()

Status mediax::fb::DisplayManager::DisplayBuffer ( uint8_t *  frame_buffer,
Resolution  resolution,
std::string  text 
)
overridevirtual

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

Implements mediax::DisplayManagerBase.

◆ Flush()

void mediax::fb::DisplayManager::Flush ( )
overridevirtual

Flush the framebuffer /dev/fb0.

Implements mediax::DisplayManagerBase.

◆ GetBytesPerPixel()

int mediax::fb::DisplayManager::GetBytesPerPixel ( )
inlinefinalvirtual

Get the Bits Per Pixel object.

Returns
int Always return for for RGB24

Implements mediax::DisplayManagerBase.

◆ GetColourspace()

mediax::rtp::ColourspaceType mediax::fb::DisplayManager::GetColourspace ( )
inlinefinalvirtual

Get the Colourspace object.

Returns
mediax::rtp::ColourspaceType

Reimplemented from mediax::DisplayManagerBase.

◆ GetResolution()

Resolution mediax::fb::DisplayManager::GetResolution ( )
overridevirtual

Get the Resolution attribute.

Returns
Resolution

Implements mediax::DisplayManagerBase.

◆ Initalise()

Status mediax::fb::DisplayManager::Initalise ( )
overridevirtual

Initalise the display manager.

Returns
StatusDisplayManager

Implements mediax::DisplayManagerBase.

◆ operator=()

DisplayManager & mediax::fb::DisplayManager::operator= ( const DisplayManager )
delete

Delete the copy operator.

Returns
DisplayManager&

◆ Run()

void mediax::fb::DisplayManager::Run ( )
inlineoverridevirtual

Run the main loop if these is one.

Implements mediax::DisplayManagerBase.


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