Beatmup
Beatmup::DRM::ModeEncoder Class Reference

#include <drm.hpp>

Public Member Functions

 ModeEncoder ()
 
 ModeEncoder (Device &device, ModeConnector &connector)
 
 ~ModeEncoder ()
 
ModeEncoderoperator= (ModeEncoder &&other)
 
drmModeEncoder * getPointer ()
 

Private Member Functions

 ModeEncoder (const ModeEncoder &)=delete
 

Private Attributes

drmModeEncoder * encoder
 

Detailed Description

Definition at line 131 of file drm.hpp.

Constructor & Destructor Documentation

◆ ModeEncoder() [1/3]

Beatmup::DRM::ModeEncoder::ModeEncoder ( const ModeEncoder )
privatedelete

◆ ModeEncoder() [2/3]

Beatmup::DRM::ModeEncoder::ModeEncoder ( )
inline

Definition at line 136 of file drm.hpp.

136 : encoder(nullptr) {}
drmModeEncoder * encoder
Definition: drm.hpp:134

◆ ModeEncoder() [3/3]

Beatmup::DRM::ModeEncoder::ModeEncoder ( Device device,
ModeConnector connector 
)
inline

Definition at line 138 of file drm.hpp.

138  : encoder(nullptr) {
139  auto id = connector.getPointer()->encoder_id;
140  if (!id)
141  throw DRMError("Cannot get DRM encoder");
142  encoder = drmModeGetEncoder(device.getHandle(), id);
143  }

◆ ~ModeEncoder()

Beatmup::DRM::ModeEncoder::~ModeEncoder ( )
inline

Definition at line 145 of file drm.hpp.

145  {
146  if (encoder)
147  drmModeFreeEncoder(encoder);
148  }

Member Function Documentation

◆ operator=()

ModeEncoder& Beatmup::DRM::ModeEncoder::operator= ( ModeEncoder &&  other)
inline

Definition at line 150 of file drm.hpp.

150  {
151  encoder = other.encoder;
152  other.encoder = nullptr;
153  return *this;
154  }

◆ getPointer()

drmModeEncoder* Beatmup::DRM::ModeEncoder::getPointer ( )
inline

Definition at line 157 of file drm.hpp.

157 { return encoder; }

Member Data Documentation

◆ encoder

drmModeEncoder* Beatmup::DRM::ModeEncoder::encoder
private

Definition at line 134 of file drm.hpp.


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