MythTV  master
mythdrmframebuffer.cpp
Go to the documentation of this file.
1 // MythTV
4 
8 DRMFb MythDRMFramebuffer::Create(int FD, uint32_t Id)
9 {
10  /*
11  Currently disabled as drmModeGetFB2 is not available on older systems and
12  this functionality is not currently an absolute requirement
13  if (auto fb = std::shared_ptr<MythDRMFramebuffer>(new MythDRMFramebuffer(FD, Id)); fb.get() && fb->m_id)
14  return fb;
15  */
16  (void)FD;
17  (void)Id;
18  return nullptr;
19 }
20 
22 {
23  (void)FD;
24  (void)Id;
25  /*
26  if (auto fb = drmModeGetFB2(FD, Id); fb)
27  {
28  m_id = fb->fb_id;
29  m_width = fb->width;
30  m_height = fb->height;
31  m_format = fb->pixel_format;
32  m_modifiers = fb->modifier;
33  std::copy(std::begin(fb->handles), std::end(fb->handles), std::begin(m_handles));
34  std::copy(std::begin(fb->pitches), std::end(fb->pitches), std::begin(m_pitches));
35  std::copy(std::begin(fb->offsets), std::end(fb->offsets), std::begin(m_offsets));
36  drmModeFreeFB2(fb);
37  }
38  */
39 }
40 
42 {
43  return QString("Framebuffer #%1 Size: %2x%3 Format: %4 Mods: 0x%5")
44  .arg(m_id).arg(m_width).arg(m_height).arg(MythDRMPlane::FormatToString(m_format)).arg(m_modifiers, 0, 16);
45 }
DRMFb
std::shared_ptr< class MythDRMFramebuffer > DRMFb
Definition: mythdrmframebuffer.h:7
MythDRMPlane::FormatToString
static QString FormatToString(uint32_t Format)
Definition: mythdrmplane.cpp:124
MythDRMFramebuffer::m_height
uint32_t m_height
Definition: mythdrmframebuffer.h:18
MythDRMFramebuffer::m_id
uint32_t m_id
Definition: mythdrmframebuffer.h:16
MythDRMFramebuffer::m_format
uint32_t m_format
Definition: mythdrmframebuffer.h:19
MythDRMFramebuffer::m_modifiers
uint64_t m_modifiers
Definition: mythdrmframebuffer.h:20
mythdrmplane.h
MythDRMFramebuffer::MythDRMFramebuffer
MythDRMFramebuffer(int FD, uint32_t Id)
Definition: mythdrmframebuffer.cpp:21
mythdrmframebuffer.h
MythDRMFramebuffer::Description
QString Description() const
Definition: mythdrmframebuffer.cpp:41
MythDRMFramebuffer::Create
static DRMFb Create(int FD, uint32_t Id)
Definition: mythdrmframebuffer.cpp:8
MythDRMFramebuffer::m_width
uint32_t m_width
Definition: mythdrmframebuffer.h:17