MythTV
master
libs
libmythui
platforms
drm
mythdrmmode.cpp
Go to the documentation of this file.
1
// MythTV
2
#include "
platforms/drm/mythdrmmode.h
"
3
7
DRMMode
MythDRMMode::Create
(drmModeModeInfoPtr
Mode
,
int
Index)
8
{
9
if
(
auto
mode = std::shared_ptr<MythDRMMode>(
new
MythDRMMode
(
Mode
, Index)); mode && mode->m_rate > 1.0)
10
return
mode;
11
return
nullptr
;
12
}
13
14
MythDRMMode::MythDRMMode
(drmModeModeInfoPtr
Mode
,
int
Index)
15
{
16
if
(
Mode
)
17
{
18
m_index
= Index;
19
m_rate
= (
Mode
->clock * 1000.0) / (
Mode
->htotal *
Mode
->vtotal);
20
m_width
=
Mode
->hdisplay;
21
m_height
=
Mode
->vdisplay;
22
m_flags
=
Mode
->flags;
23
m_name
=
Mode
->name;
24
if
(
Mode
->flags &
DRM_MODE_FLAG_INTERLACE
)
25
m_rate
*= 2.0;
26
if
(
Mode
->flags & DRM_MODE_FLAG_DBLSCAN)
27
m_rate
/= 2.0;
28
}
29
}
MythDRMMode::m_index
int m_index
Definition:
mythdrmmode.h:15
Mode
Mode
Definition:
synaesthesia.h:23
MythDRMMode::m_width
uint16_t m_width
Definition:
mythdrmmode.h:17
DRM_MODE_FLAG_INTERLACE
#define DRM_MODE_FLAG_INTERLACE
Definition:
mythdisplaymutter.cpp:12
MythDRMMode::m_name
QString m_name
Definition:
mythdrmmode.h:20
DRMMode
std::shared_ptr< class MythDRMMode > DRMMode
Definition:
mythdrmmode.h:7
MythDRMMode::m_rate
double m_rate
Definition:
mythdrmmode.h:16
MythDRMMode::Create
static DRMMode Create(drmModeModeInfoPtr Mode, int Index)
Definition:
mythdrmmode.cpp:7
MythDRMMode::m_flags
uint32_t m_flags
Definition:
mythdrmmode.h:19
MythDRMMode::m_height
uint16_t m_height
Definition:
mythdrmmode.h:18
mythdrmmode.h
MythDRMMode::MythDRMMode
MythDRMMode(drmModeModeInfoPtr Mode, int Index)
Definition:
mythdrmmode.cpp:14
Generated on Tue Apr 16 2024 03:18:45 for MythTV by
1.8.17