|
Link Here
|
| 4 |
|
4 |
|
| 5 |
#include <vdr/plugin.h> |
5 |
#include <vdr/plugin.h> |
| 6 |
#include <vdr/videodir.h> |
6 |
#include <vdr/videodir.h> |
|
|
7 |
#if VDRVERSNUM >= 10307 |
| 8 |
#include <vdr/interface.h> |
| 9 |
#include <vdr/status.h> |
| 10 |
#endif |
| 7 |
|
11 |
|
| 8 |
#ifdef VDRRIP_DVD |
12 |
#ifdef VDRRIP_DVD |
| 9 |
#include <dvdnav/ifo_read.h> |
13 |
#include <dvdnav/ifo_read.h> |
|
Link Here
|
| 92 |
# ifdef VDRRIP_DVD |
96 |
# ifdef VDRRIP_DVD |
| 93 |
|
97 |
|
| 94 |
cMenuVdrripWarning::cMenuVdrripWarning(const char *Title, const char *Text) |
98 |
cMenuVdrripWarning::cMenuVdrripWarning(const char *Title, const char *Text) |
|
|
99 |
#if VDRVERSNUM >= 10307 |
| 100 |
:cMenuText(Title, "") |
| 101 |
#else |
| 95 |
:cOsdMenu(Title) |
102 |
:cOsdMenu(Title) |
|
|
103 |
#endif |
| 96 |
{ |
104 |
{ |
| 97 |
bool warning; |
105 |
bool warning; |
| 98 |
warning = true; |
106 |
warning = true; |
| 99 |
//warning = false; |
107 |
//warning = false; |
| 100 |
|
108 |
|
| 101 |
if (warning) { |
109 |
if (warning) { |
|
|
110 |
#if VDRVERSNUM >= 10307 |
| 111 |
SetText(Text); |
| 112 |
#else |
| 102 |
Add(new cMenuTextItem(Text, 1, 2, Setup.OSDwidth - 2, MAXOSDITEMS, clrWhite, clrBackground, fontOsd)); |
113 |
Add(new cMenuTextItem(Text, 1, 2, Setup.OSDwidth - 2, MAXOSDITEMS, clrWhite, clrBackground, fontOsd)); |
|
|
114 |
#endif |
| 103 |
SetHelp(tr("back"), tr("accept"), NULL, NULL); |
115 |
SetHelp(tr("back"), tr("accept"), NULL, NULL); |
| 104 |
hadsubmenu = false; |
116 |
hadsubmenu = false; |
| 105 |
} else { |
117 |
} else { |
|
Link Here
|
| 120 |
if (hadsubmenu) {return osBack;} |
132 |
if (hadsubmenu) {return osBack;} |
| 121 |
|
133 |
|
| 122 |
switch (Key) { |
134 |
switch (Key) { |
|
|
135 |
#if VDRVERSNUM >= 10307 |
| 136 |
// cMenuText::ProcessKey don't handle submenus |
| 137 |
case kUp|k_Repeat: |
| 138 |
case kUp: |
| 139 |
case kDown|k_Repeat: |
| 140 |
case kDown: |
| 141 |
case kLeft|k_Repeat: |
| 142 |
case kLeft: |
| 143 |
case kRight|k_Repeat: |
| 144 |
case kRight: |
| 145 |
DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, |
| 146 |
NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight); |
| 147 |
cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp); |
| 148 |
return osContinue; |
| 149 |
#endif |
| 150 |
|
| 123 |
case kRed: return osBack; |
151 |
case kRed: return osBack; |
| 124 |
|
152 |
|
| 125 |
case kGreen: { |
153 |
case kGreen: { |
|
Link Here
|
| 138 |
ifo_handle_t *ifo_zero = NULL; |
166 |
ifo_handle_t *ifo_zero = NULL; |
| 139 |
ifo_handle_t *ifo_tmp = NULL; |
167 |
ifo_handle_t *ifo_tmp = NULL; |
| 140 |
|
168 |
|
|
|
169 |
#if VDRVERSNUM >= 10307 |
| 170 |
Skins.Message(mtStatus, tr("checking dvd...")); |
| 171 |
Skins.Flush(); |
| 172 |
#else |
| 141 |
Interface->Status(tr("checking dvd...")); |
173 |
Interface->Status(tr("checking dvd...")); |
| 142 |
Interface->Flush(); |
174 |
Interface->Flush(); |
|
|
175 |
#endif |
| 143 |
|
176 |
|
| 144 |
if (access(DVD, R_OK) == -1) { |
177 |
if (access(DVD, R_OK) == -1) { |
| 145 |
char *s = NULL; |
178 |
char *s = NULL; |
| 146 |
asprintf(&s, "No read privileges on %s !", DVD); |
179 |
asprintf(&s, "No read privileges on %s !", DVD); |
|
|
180 |
#if VDRVERSNUM >= 10307 |
| 181 |
Skins.Message(mtError, s); |
| 182 |
#else |
| 147 |
Interface->Error(s); |
183 |
Interface->Error(s); |
|
|
184 |
#endif |
| 148 |
FREE(s); |
185 |
FREE(s); |
| 149 |
return false; |
186 |
return false; |
| 150 |
} |
187 |
} |
|
Link Here
|
| 160 |
else { |
197 |
else { |
| 161 |
char *s = NULL; |
198 |
char *s = NULL; |
| 162 |
asprintf(&s, "Can't open ifo %d !", i); |
199 |
asprintf(&s, "Can't open ifo %d !", i); |
|
|
200 |
#if VDRVERSNUM >= 10307 |
| 201 |
Skins.Message(mtError, s); |
| 202 |
#else |
| 163 |
Interface->Error(s); |
203 |
Interface->Error(s); |
|
|
204 |
#endif |
| 164 |
FREE(s); |
205 |
FREE(s); |
| 165 |
DVDClose(dvd); |
206 |
DVDClose(dvd); |
| 166 |
return false; |
207 |
return false; |
|
Link Here
|
| 171 |
return true; |
212 |
return true; |
| 172 |
} else { |
213 |
} else { |
| 173 |
DVDClose(dvd); |
214 |
DVDClose(dvd); |
|
|
215 |
#if VDRVERSNUM >= 10307 |
| 216 |
Skins.Message(mtError, "Can't open main ifo from dvd !"); |
| 217 |
#else |
| 174 |
Interface->Error("Can't open main ifo from dvd !"); |
218 |
Interface->Error("Can't open main ifo from dvd !"); |
|
|
219 |
#endif |
| 175 |
return false; |
220 |
return false; |
| 176 |
} |
221 |
} |
| 177 |
} |
222 |
} |
| 178 |
|
223 |
|
| 179 |
char *s = NULL; |
224 |
char *s = NULL; |
| 180 |
asprintf(&s, "Can 't open %s !", DVD); |
225 |
asprintf(&s, "Can 't open %s !", DVD); |
|
|
226 |
#if VDRVERSNUM >= 10307 |
| 227 |
Skins.Message(mtError, s); |
| 228 |
#else |
| 181 |
Interface->Error(s); |
229 |
Interface->Error(s); |
|
|
230 |
#endif |
| 182 |
FREE(s); |
231 |
FREE(s); |
| 183 |
return false; |
232 |
return false; |
| 184 |
} |
233 |
} |
|
Link Here
|
| 190 |
cMenuVdrripEncode::cMenuVdrripEncode():cOsdMenu(tr("encode vdr-recording")) { |
239 |
cMenuVdrripEncode::cMenuVdrripEncode():cOsdMenu(tr("encode vdr-recording")) { |
| 191 |
R = NULL; |
240 |
R = NULL; |
| 192 |
|
241 |
|
|
|
242 |
#if VDRVERSNUM >= 10307 |
| 243 |
Skins.Message(mtStatus, tr("scanning recordings...")); |
| 244 |
Skins.Flush(); |
| 245 |
#else |
| 193 |
Interface->Status(tr("scanning recordings...")); |
246 |
Interface->Status(tr("scanning recordings...")); |
| 194 |
Interface->Flush(); |
247 |
Interface->Flush(); |
|
|
248 |
#endif |
| 195 |
|
249 |
|
| 196 |
R = new cVdrripRecordings; |
250 |
R = new cVdrripRecordings; |
| 197 |
Set(); |
251 |
Set(); |
|
Link Here
|
| 259 |
FREE(s1); |
313 |
FREE(s1); |
| 260 |
} |
314 |
} |
| 261 |
|
315 |
|
| 262 |
if (Q->getLockStat()) {Interface->Error(tr("the queuefile is locked by the queuehandler !"));} |
316 |
if (Q->getLockStat()) { |
|
|
317 |
#if VDRVERSNUM >= 10307 |
| 318 |
Skins.Message(mtError, tr("the queuefile is locked by the queuehandler !")); |
| 319 |
#else |
| 320 |
Interface->Error(tr("the queuefile is locked by the queuehandler !")); |
| 321 |
#endif |
| 322 |
} |
| 263 |
|
323 |
|
| 264 |
SetHelpKeys(); |
324 |
SetHelpKeys(); |
| 265 |
} |
325 |
} |
|
Link Here
|
| 353 |
} |
413 |
} |
| 354 |
|
414 |
|
| 355 |
void cMenuVdrripQueue::AddColItem(cOsdItem *i) { |
415 |
void cMenuVdrripQueue::AddColItem(cOsdItem *i) { |
|
|
416 |
#if VDRVERSNUM < 10307 |
| 356 |
#ifdef clrScrolLine |
417 |
#ifdef clrScrolLine |
| 357 |
i->SetColor(clrScrolLine, clrBackground); |
418 |
i->SetColor(clrScrolLine, clrBackground); |
| 358 |
#else |
419 |
#else |
| 359 |
i->SetColor(clrCyan, clrBackground); |
420 |
i->SetColor(clrCyan, clrBackground); |
| 360 |
#endif |
421 |
#endif |
|
|
422 |
#endif |
| 361 |
|
423 |
|
| 362 |
Add(i); |
424 |
Add(i); |
| 363 |
} |
425 |
} |
|
Link Here
|
| 584 |
} |
646 |
} |
| 585 |
|
647 |
|
| 586 |
void cMenuVdrripEditTemplate::AddColItem(cOsdItem *i) { |
648 |
void cMenuVdrripEditTemplate::AddColItem(cOsdItem *i) { |
|
|
649 |
#if VDRVERSNUM < 10307 |
| 587 |
#ifdef clrScrolLine |
650 |
#ifdef clrScrolLine |
| 588 |
i->SetColor(clrScrolLine, clrBackground); |
651 |
i->SetColor(clrScrolLine, clrBackground); |
| 589 |
#else |
652 |
#else |
| 590 |
i->SetColor(clrCyan, clrBackground); |
653 |
i->SetColor(clrCyan, clrBackground); |
| 591 |
#endif |
654 |
#endif |
|
|
655 |
#endif |
| 592 |
|
656 |
|
| 593 |
Add(i); |
657 |
Add(i); |
| 594 |
} |
658 |
} |
|
Link Here
|
| 600 |
MovOSDsaveName = NULL; |
664 |
MovOSDsaveName = NULL; |
| 601 |
FileSize[0] = MovieData[0] = CropData[0] = ScaleData[0] = NULL; |
665 |
FileSize[0] = MovieData[0] = CropData[0] = ScaleData[0] = NULL; |
| 602 |
|
666 |
|
|
|
667 |
#if VDRVERSNUM >= 10307 |
| 668 |
Skins.Message(mtStatus, tr("reading movie-data...")); |
| 669 |
Skins.Flush(); |
| 670 |
#else |
| 603 |
Interface->Status(tr("reading movie-data...")); |
671 |
Interface->Status(tr("reading movie-data...")); |
| 604 |
Interface->Flush(); |
672 |
Interface->Flush(); |
|
|
673 |
#endif |
| 605 |
|
674 |
|
| 606 |
M = new cMovie(p, n); |
675 |
M = new cMovie(p, n); |
| 607 |
Init(); |
676 |
Init(); |
|
Link Here
|
| 888 |
|
957 |
|
| 889 |
#ifdef VDRRIP_DVD |
958 |
#ifdef VDRRIP_DVD |
| 890 |
} else if (M->isDVD() && MovOSD.Title != MovOSDsave.Title && MovOSD.Title > 0) { |
959 |
} else if (M->isDVD() && MovOSD.Title != MovOSDsave.Title && MovOSD.Title > 0) { |
|
|
960 |
#if VDRVERSNUM >= 10307 |
| 961 |
Skins.Message(mtStatus, tr("reading audio-data from dvd...")); |
| 962 |
Skins.Flush(); |
| 963 |
#else |
| 891 |
Interface->Status(tr("reading audio-data from dvd...")); |
964 |
Interface->Status(tr("reading audio-data from dvd...")); |
| 892 |
Interface->Flush(); |
965 |
Interface->Flush(); |
|
|
966 |
#endif |
| 893 |
M->setDVDTitle(MovOSD.Title, true); |
967 |
M->setDVDTitle(MovOSD.Title, true); |
| 894 |
M->saveMovieData(); |
968 |
M->saveMovieData(); |
| 895 |
Set(); |
969 |
Set(); |
|
Link Here
|
| 1067 |
FREE(q); |
1141 |
FREE(q); |
| 1068 |
DELETE(Q); |
1142 |
DELETE(Q); |
| 1069 |
return osBack; |
1143 |
return osBack; |
| 1070 |
} else {Interface->Error(tr("the queuefile is locked by the queuehandler !"));} |
1144 |
} else { |
|
|
1145 |
#if VDRVERSNUM >= 10307 |
| 1146 |
Skins.Message(mtError, tr("the queuefile is locked by the queuehandler !")); |
| 1147 |
#else |
| 1148 |
Interface->Error(tr("the queuefile is locked by the queuehandler !")); |
| 1149 |
#endif |
| 1150 |
} |
| 1071 |
|
1151 |
|
| 1072 |
FREE(q); |
1152 |
FREE(q); |
| 1073 |
DELETE(Q); |
1153 |
DELETE(Q); |
|
Link Here
|
| 1089 |
} else { |
1169 |
} else { |
| 1090 |
if (Interface->Confirm(tr("crop black movie boarders ?"))) { |
1170 |
if (Interface->Confirm(tr("crop black movie boarders ?"))) { |
| 1091 |
CropReset = true; |
1171 |
CropReset = true; |
|
|
1172 |
#if VDRVERSNUM >= 10307 |
| 1173 |
Skins.Message(mtStatus, tr("search for black movie boarders")); |
| 1174 |
Skins.Flush(); |
| 1175 |
#else |
| 1092 |
Interface->Status(tr("search for black movie boarders")); |
1176 |
Interface->Status(tr("search for black movie boarders")); |
| 1093 |
Interface->Flush(); |
1177 |
Interface->Flush(); |
|
|
1178 |
#endif |
| 1094 |
if (! M->setCropValues()) { |
1179 |
if (! M->setCropValues()) { |
| 1095 |
CropReset = false; |
1180 |
CropReset = false; |
|
|
1181 |
#if VDRVERSNUM >= 10307 |
| 1182 |
Skins.Message(mtError, tr("couldn't detect black movie boarders !")); |
| 1183 |
#else |
| 1096 |
Interface->Error(tr("couldn't detect black movie boarders !")); |
1184 |
Interface->Error(tr("couldn't detect black movie boarders !")); |
|
|
1185 |
#endif |
| 1097 |
} |
1186 |
} |
| 1098 |
M->saveMovieData(); |
1187 |
M->saveMovieData(); |
| 1099 |
} |
1188 |
} |
|
Link Here
|
| 1133 |
} |
1222 |
} |
| 1134 |
|
1223 |
|
| 1135 |
void cMenuVdrripMovie::AddColItem(cOsdItem *i) { |
1224 |
void cMenuVdrripMovie::AddColItem(cOsdItem *i) { |
|
|
1225 |
#if VDRVERSNUM < 10307 |
| 1136 |
#ifdef clrScrolLine |
1226 |
#ifdef clrScrolLine |
| 1137 |
i->SetColor(clrScrolLine, clrBackground); |
1227 |
i->SetColor(clrScrolLine, clrBackground); |
| 1138 |
#else |
1228 |
#else |
| 1139 |
i->SetColor(clrCyan, clrBackground); |
1229 |
i->SetColor(clrCyan, clrBackground); |
| 1140 |
#endif |
1230 |
#endif |
|
|
1231 |
#endif |
| 1141 |
|
1232 |
|
| 1142 |
Add(i); |
1233 |
Add(i); |
| 1143 |
} |
1234 |
} |
|
Link Here
|
| 1163 |
eOSState state = cOsdMenu::ProcessKey(Key); |
1254 |
eOSState state = cOsdMenu::ProcessKey(Key); |
| 1164 |
|
1255 |
|
| 1165 |
if (Key == kOk) { |
1256 |
if (Key == kOk) { |
|
|
1257 |
#if VDRVERSNUM >= 10307 |
| 1258 |
Skins.Message(mtStatus, tr("reading audio-data from dvd...")); |
| 1259 |
Skins.Flush(); |
| 1260 |
#else |
| 1166 |
Interface->Status(tr("reading audio-data from dvd...")); |
1261 |
Interface->Status(tr("reading audio-data from dvd...")); |
| 1167 |
Interface->Flush(); |
1262 |
Interface->Flush(); |
|
|
1263 |
#endif |
| 1168 |
M->setDVDTitle(Current() + 1, true); |
1264 |
M->setDVDTitle(Current() + 1, true); |
| 1169 |
M->saveMovieData(); |
1265 |
M->saveMovieData(); |
| 1170 |
return osBack; |
1266 |
return osBack; |