MythTV
master
libs
libmythui
platforms
drm
mythdrmframebuffer.cpp
Go to the documentation of this file.
1
// MythTV
2
#include "
platforms/drm/mythdrmframebuffer.h
"
3
#include "
platforms/drm/mythdrmplane.h
"
4
8
DRMFb
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
20
MythDRMFramebuffer::MythDRMFramebuffer
([[maybe_unused]]
int
FD,
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
39
QString
MythDRMFramebuffer::Description
()
const
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
}
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:20
mythdrmframebuffer.h
MythDRMFramebuffer::Description
QString Description() const
Definition:
mythdrmframebuffer.cpp:39
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
Generated on Wed Mar 27 2024 03:19:42 for MythTV by
1.8.17