int b = ioctl(fdAudio, AV_SET_AUD_DISABLE_SYNC, &a);
- printf("Audio sync disable = %i\n", b); // is in a DEV block
+ /*OK*/ printf("Audio sync disable = %i\n", b);
return 1;
viewman->add(vconnect);
vconnect->run();
-
UCHAR button = 0;
while(irun)
{
#else
ReleaseMutex(masterLock);
#endif
-
button = remote->getButtonPress(2); // FIXME why is this set to 2 and not 0? so it can quit
// something happened, lock and process
theInstance = this;
myPort = port;
addrlen = sizeof(struct sockaddr);
+ initted = false;
}
DatagramSocket::~DatagramSocket()
{
- CLOSESOCKET(socketnum);
+ if (initted) shutdown();
}
DatagramSocket* DatagramSocket::theInstance = 0;
int DatagramSocket::init()
{
- CLOSESOCKET(socketnum);
+ if (initted) return 0;
+
if ((socketnum = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
{ perror("socket"); return 0; }
int allowed = 1;
setsockopt(socketnum, SOL_SOCKET, SO_BROADCAST, (char*)&allowed, sizeof(allowed));
+ initted = true;
+
return 1;
}
+void DatagramSocket::shutdown()
+{
+ if (!initted) return;
+ CLOSESOCKET(socketnum);
+ initted = false;
+}
+
unsigned char DatagramSocket::waitforMessage(unsigned char how)
{
+ if (!initted) return 0;
+
/* how = 0 - block
how = 1 - start new wait
how = 2 - continue wait
void DatagramSocket::send(char *ipa, short port, char *message, int length)
{
+ if (!initted) return;
+
if (DSOCKDEBUG)
{
printf("%s:%i\tOUT %i\t", ipa, port, length);
~DatagramSocket();
static DatagramSocket* getInstance(void);
int init();
+ void shutdown();
unsigned char waitforMessage(unsigned char); // int =0-block =1-new wait =2-continue wait
int getDataLength(void) const;
char *getData(void); // returns a pointer to the data
void send(char *, short, char *, int); // send wants: IP Address ddn style, port,
// data, length of data
private:
+ bool initted;
ULONG getIPNumber(ULONG num);
static ULONG iterate_ip;
const static char DSOCKDEBUG = 0;
"4",
},
{ "4. Timers",
- "",
+ "4. Timer",
"",
"4. Felvétel",
- "",
+ "4. Ajastukset",
"",
"5",
},
"[ok] = Menü",
"[ok] = meny",
"[ok] = menü",
- "[ok] = menu",
"[ok] = valikko",
+ "[ok] = menu",
"12",
},
{ "%lu%% used, %iGB free",
"Options",
"27",
},
+ { "General",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.1",
+ },
+ { "Advanced",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.3",
+ },
+ { "General Options",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.4",
+ },
+ { "Timer Options",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.5",
+ },
+ { "Default start margin (minutes)",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.51",
+ },
+ { "Default end margin (minutes)",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.52",
+ },
+ { "Default priority",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.53",
+ },
+ { "Default lifetime",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.54",
+ },
+ { "Advanced Options",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "27.6",
+ },
{ "TV connection type",
"TV-Anschlußart",
"Typ av TV-anslutning",
"VDR-Pri 0=OK !lásd. fórum!",
"VDR-Pri 0=OK !Lue forumit!",
"VDR-Pri 0=OK !Voir forums!",
- "34a",
+ "34.1",
+ },
+ { "TCP receive window size",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "34.2",
},
// Option choices
{ "Old",
"38",
},
{ "Chop sides",
- "Seiten abschneiden",
+ "Zuschneiden",
"Ta bort på sidorna",
"Szélek levágva",
"Leikkaa sivut",
"61.5",
},
{ "Guide / Back: Close",
- "Back: EPG schließen",
+ "Back:EPG schließen",
"Guide / Back: Stäng",
"Guide/Back: Bezárás",
"Guide / Back: Sulje",
"62",
},
{ "Rec: Set timer",
- "Rec: Aufnahme programmieren",
+ "Rec: Neuer Timer",
"Rec: Programmera timer",
"Rec: Felvétel beállítása",
"Rec: Aseta ajastus",
"Pas de detail du programme",
"66",
},
+ { "Set Timer",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "66.1",
+ },
+ { "Create this timer?",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "66.2",
+ },
+ // Timers
+ { "Timers",
+ "Timer",
+ "",
+ "Felvétel",
+ "Ajastukset",
+ "",
+ "66.5",
+ },
// Edit timer
{ "Edit Timer",
+ "Timer bearbeiten",
"",
"",
+ "Muuta ajastusta",
"",
+ "67",
+ },
+ { "Active",
"",
"",
- "67",
+ "",
+ "",
+ "",
+ "68",
+ },
+ { "Channel",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "69",
+ },
+ { "Name",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "70",
+ },
+ { "Directory",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "71",
+ },
+ { "Start",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "72",
+ },
+ { "Stop",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "73",
+ },
+ { "Priority",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "74",
+ },
+ { "Lifetime",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "75",
+ },
+ { "Current",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "76",
+ },
+ { "Recording",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "77",
},
// End marker.
{ NULL }
/*
Region Region::subtract(Region& other)
{
- printf("This: %i %i %i %i\n", x, y, w, h);
- printf("Subtract this: %i %i %i %i\n", other.x, other.y, other.w, other.h);
+ OK printf("This: %i %i %i %i\n", x, y, w, h);
+ OK printf("Subtract this: %i %i %i %i\n", other.x, other.y, other.w, other.h);
Region s;
s.w = 0;
s.h = 0;
}
- printf("Result: %i %i %i %i\n", s.x, s.y, s.w, s.h);
+ OK printf("Result: %i %i %i %i\n", s.x, s.y, s.w, s.h);
return s;
}
{
if (waitType == 1)
{
+ ds.shutdown();
ds.init();
logger->log("VDR", Log::NOTICE, "Broadcasting for server");
ds.send("255.255.255.255", 3024, message, strlen(message));
WButton* wb;
wb = new WButton();
- wb->setText("General");
+ wb->setText(tr("General"));
wb->setSurface(surface);
wb->setSurfaceOffset(160, 60);
wb->setDimensions(140, fontHeight);
buttons.push_back(wb);
wb = new WButton();
- wb->setText("Timers");
+ wb->setText(tr("Timers"));
wb->setSurface(surface);
wb->setSurfaceOffset(160, 100);
wb->setDimensions(140, fontHeight);
buttons.push_back(wb);
wb = new WButton();
- wb->setText("Advanced");
+ wb->setText(tr("Advanced"));
wb->setSurface(surface);
wb->setSurfaceOffset(160, 140);
wb->setDimensions(140, fontHeight);
int xpos = 20;
int ypos = 50;
- drawText("Active", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Channel", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Name", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Directory", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Active"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Channel"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Name"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Directory"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
ypos += surface->getFontHeight();
- drawText("Start", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Stop", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Priority", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Lifetime", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Start"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Stop"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Priority"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Lifetime"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
ypos += surface->getFontHeight();
- drawText("Current", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
- drawText("Recording", xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Current"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
+ drawText(tr("Recording"), xpos, ypos, Colour::LIGHTTEXT); ypos += surface->getFontHeight();
// Temp