vdr  2.0.5
PLUGINS/src/dvbhddevice/menu.c
Go to the documentation of this file.
1 /*
2  * menu.c: The DVB HD Full Featured device main menu
3  *
4  * See the README file for copyright information and how to reach the author.
5  */
6 
7 #include "menu.h"
8 #include "setup.h"
9 
11 : cOsdMenu("dvbhddevice"),
12  mHdffCmdIf(pHdffCmdIf)
13 {
14  mVideoConversionItem = new cOsdItem("", osUnknown, false);
16  SetHelp(tr("Video Conversion"), tr("TV on"), tr("TV off"));
18 }
19 
21 {
22 }
23 
25 {
26  eOSState state = cOsdMenu::ProcessKey(key);
27  if (state == osUnknown)
28  {
29  switch (key)
30  {
31  case kRed:
34  break;
35 
36  case kGreen:
38  state = osEnd;
39  break;
40 
41  case kYellow:
43  state = osEnd;
44  break;
45 
46  case kOk:
47  state = osEnd;
48  break;
49 
50  default:
51  break;
52  }
53  }
54  return state;
55 }
56 
58 {
59  HdffVideoFormat_t videoFormat;
60  videoFormat.AutomaticEnabled = true;
61  videoFormat.AfdEnabled = false;
64  mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat);
65 
66  char str[128];
67  sprintf(str, "%s: %s", tr("Video Conversion"), gHdffSetup.GetVideoConversionString());
69  Display();
70 }
const char * GetVideoConversionString(void)
Definition: setup.c:161
void CmdHdmiSendCecCommand(HdffCecCommand_t Command)
Definition: hdffcmd.c:384
void Add(cOsdItem *Item, bool Current=false, cOsdItem *After=NULL)
Definition: osdbase.c:203
virtual eOSState ProcessKey(eKeys Key)
cHdffSetup gHdffSetup
Definition: setup.c:16
cHdffMenu(HDFF::cHdffCmdIf *pHdffCmdIf)
Definition: keys.h:25
void CmdAvSetVideoFormat(uint8_t DecoderIndex, const HdffVideoFormat_t *pVideoFormat)
Definition: hdffcmd.c:116
eOSState
Definition: osdbase.h:18
cOsdItem * mVideoConversionItem
virtual eOSState ProcessKey(eKeys Key)
Definition: osdbase.c:559
Definition: osdbase.h:36
void SetText(const char *Text, bool Copy=true)
Definition: osdbase.c:42
virtual void Display(void)
Definition: osdbase.c:217
Definition: keys.h:20
Definition: keys.h:26
int TvFormat
Definition: setup.h:24
HdffTvFormat_t TvFormat
Definition: hdffcmd_av.h:77
HdffTvFormat_t
Definition: hdffcmd_av.h:56
#define tr(s)
Definition: i18n.h:85
void SetHelp(const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL)
Definition: osdbase.c:179
HdffVideoConversion_t VideoConversion
Definition: hdffcmd_av.h:78
HDFF::cHdffCmdIf * mHdffCmdIf
Definition: keys.h:24
HdffVideoConversion_t
Definition: hdffcmd_av.h:62
void SetNextVideoConversion(void)
Definition: setup.c:121
int VideoConversion
Definition: setup.h:25
eKeys
Definition: keys.h:16