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