blob: 6951a967a57db53c82febcc98b5c11e3b36f319f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
* See the README file for copyright information and how to reach the author.
*
* $Id$
*/
#ifndef SETUP_H
#define SETUP_H
#include "omx.h"
#include "tools.h"
class cRpiSetup
{
public:
static bool HwInit(void);
static cAudioPort::ePort GetAudioPort(void) {
return (GetInstance()->m_audioPort) ? cAudioPort::eHDMI : cAudioPort::eLocal; }
static bool IsAudioPassthrough(void) {
return GetInstance()->m_passthrough; }
static bool HasAudioSetupChanged(void);
static bool IsAudioFormatSupported(cAudioCodec::eCodec codec,
int channels, int samplingRate);
static bool IsVideoCodecSupported(cVideoCodec::eCodec codec) {
return codec == cVideoCodec::eMPEG2 ? GetInstance()->m_mpeg2Enabled :
codec == cVideoCodec::eH264 ? true : false;
}
static int GetDisplaySize(int &width, int &height, double &aspect);
static bool IsDisplayProgressive(void) {
return GetInstance()->m_isProgressive; }
static cRpiSetup* GetInstance(void);
static void DropInstance(void);
class cMenuSetupPage* GetSetupPage(void);
bool Parse(const char *name, const char *value);
private:
cRpiSetup() :
m_audioSetupChanged(false),
m_mpeg2Enabled(false),
m_isProgressive(false),
m_displayHeight(0),
m_displayWidth(0) { }
virtual ~cRpiSetup() { }
static cRpiSetup* s_instance;
int m_audioPort;
int m_passthrough;
bool m_audioSetupChanged;
bool m_mpeg2Enabled;
bool m_isProgressive;
int m_displayHeight;
int m_displayWidth;
};
#endif
|