Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: PATCH: dvd-0.3.5b02_b03
Gregoire Favre wrote:
On Fri, Jun 11, 2004 at 03:02:01PM +0200, Sven Goethel wrote:
Should we still need the other patches?
patch -p1 < dvd-0.3.5b02_b03.diff
patching file ca52.c
patching file dvdspu.c
Hunk #1 FAILED at 195.
1 out of 1 hunk FAILED -- saving rejects to file dvdspu.c.rej
patching file dvdspu.h
Hunk #1 FAILED at 89.
1 out of 1 hunk FAILED -- saving rejects to file dvdspu.h.rej
patching file i18n.c
Hunk #1 FAILED at 10.
Hunk #2 FAILED at 27.
Hunk #3 FAILED at 36.
Hunk #4 FAILED at 158.
4 out of 4 hunks FAILED -- saving rejects to file i18n.c.rej
patching file i18n.h
Hunk #1 FAILED at 13.
1 out of 1 hunk FAILED -- saving rejects to file i18n.h.rej
patching file player-dvd.c
patching file setup-dvd.c
patching file setup-dvd.h
patching file tools-dvd.h
Same here!
I had to patch the files manually.
I can't promise for the attached file to be correct, but it applies here
without errors.
... and yet the problems with forced subs, I reported yesterday, have
not been resolved.
André.
diff -ruNbw dvd-0.3.5b02/ca52.c dvd-0.3.5b02_patched/ca52.c
--- dvd-0.3.5b02/ca52.c Wed Jun 9 18:05:20 2004
+++ dvd-0.3.5b02_patched/ca52.c Fri Jun 11 15:05:44 2004
@@ -220,7 +220,7 @@
blk_ptr += 9;
if (header)
- cPStream::toPTS(blk_ptr, pktpts);
+ cPStream::toPTS(blk_ptr, pktpts, false);
blk_ptr += header;
blk_ptr[0] = aLPCM; // substream ID
diff -ruNbw dvd-0.3.5b02/dvdspu.c dvd-0.3.5b02_patched/dvdspu.c
--- dvd-0.3.5b02/dvdspu.c Thu Jun 10 04:28:32 2004
+++ dvd-0.3.5b02_patched/dvdspu.c Fri Jun 11 15:07:11 2004
@@ -195,7 +195,7 @@
cSPUassembler::cSPUassembler(): simpleFIFO(SPU_BUFFER_SIZE), spucmd(*this) { };
-int cSPUassembler::Put(const uint8_t *Data, int Count, uint32_t Pts)
+int cSPUassembler::Put(const uint8_t *Data, int Count, uint64_t Pts)
{
if (Pts > 0)
pts = Pts;
diff -ruNbw dvd-0.3.5b02/dvdspu.h dvd-0.3.5b02_patched/dvdspu.h
--- dvd-0.3.5b02/dvdspu.h Thu Jun 10 04:28:56 2004
+++ dvd-0.3.5b02_patched/dvdspu.h Fri Jun 11 15:08:25 2004
@@ -89,16 +89,16 @@
class cSPUassembler: public simpleFIFO
{
private:
- uint32_t pts;
+ uint64_t pts;
public:
cSPUassembler();
bool ready(void)
{ return ((Available() > 2) && (Available() >= getSize())); };
int getSize(void) { return ((operator[](0)) << 8) | operator[](1); };
- int getPts(void) { return pts; };
+ uint64_t getPts(void) { return pts; };
- int Put(const uint8_t *Data, int Count, uint32_t Pts);
+ int Put(const uint8_t *Data, int Count, uint64_t Pts);
cSPUCommand spucmd;
};
diff -ruNbw dvd-0.3.5b02/i18n.c dvd-0.3.5b02_patched/i18n.c
--- dvd-0.3.5b02/i18n.c Fri May 28 00:19:19 2004
+++ dvd-0.3.5b02_patched/i18n.c Fri Jun 11 15:16:16 2004
@@ -10,31 +10,6 @@
#include "i18n.h"
-const char *Languages[] = {
- "English",
- "Deutsch",
- "Slovenski",
- "Italiano",
- "Nederlands",
- "Português",
- "Français",
- "Norsk",
- "Suomi",
- "Polski",
- "Español",
- "Ellinika",
- "Svenska",
- "Romaneste",
- "Magyar",
- "Català",
-#if VDRVERSNUM>=10300
- "ÀãááÚØÙ", // Russian
-#endif
-#if VDRVERSNUM>=10307
- "Hrvatski",
-#endif
-};
-
const char *ISO639code[] = {
// Language ISO 639 codes for DVD
"en",
@@ -52,7 +27,7 @@
"se",
"ro",
"hu",
- "",
+ "ca",
#if VDRVERSNUM>=10300
"ru",
#endif
@@ -61,13 +36,6 @@
#endif
};
-const char *SpuOptions[] = {
- // options for the subtitles
- "no",
- "yes",
- "forced only",
-};
-
const tI18nPhrase DvdPhrases[] = {
{
"Setup.DVD$Preferred menu language", // English
@@ -190,7 +158,100 @@
#endif
},
{
+ "Setup.DVD$forced only", // English
+ "nur geforderte" // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Portugu<EA>s
+ "", // Fran<E7>ais
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Espa<F1>ol
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+ #if VDRVERSNUM>=10300
+ "", // Russian
+ #endif
+ #if VDRVERSNUM>=10307
+ "",
+ #endif
+ },
+ {
"Setup.DVD$Hide Mainmenu Entry",
+ "Hauptmen<FC>eintrag verstecken" // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Portugu<EA>s
+ "", // Fran<E7>ais
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Espa<F1>ol
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+ #if VDRVERSNUM>=10300
+ "", // Russian
+ #endif
+ #if VDRVERSNUM>=10307
+ "",
+ #endif
+ },
+ {
+ "Error.DVD$Error opening DVD!", // English
+ "Fehler beim <F6>ffnen der DVD!", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Portugu<EA>s
+ "", // Fran<E7>ais
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Espa<F1>ol
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+ #if VDRVERSNUM>=10300
+ "", // Russian
+ #endif
+ #if VDRVERSNUM>=10307
+ "",
+ #endif
+ },
+ {
+ "Error.DVD$Error fetching data from DVD!", // English
+ "Fehler beim lesen von der DVD!", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Portugu<EA>s
+ "", // Fran<E7>ais
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Espa<F1>ol
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+ #if VDRVERSNUM>=10300
+ "", // Russian
+ #endif
+ #if VDRVERSNUM>=10307
+ "",
+ #endif
},
{ NULL }
};
diff -ruNbw dvd-0.3.5b02/i18n.h dvd-0.3.5b02_patched/i18n.h
--- dvd-0.3.5b02/i18n.h Fri May 28 01:29:00 2004
+++ dvd-0.3.5b02_patched/i18n.h Fri Jun 11 15:09:40 2004
@@ -13,9 +13,7 @@
#include <vdr/i18n.h>
-extern const char *Languages[];
extern const char *ISO639code[];
-extern const char *SpuOptions[];
extern const tI18nPhrase DvdPhrases[];
#endif // __DVD_I18N_H
diff -ruNbw dvd-0.3.5b02/player-dvd.c dvd-0.3.5b02_patched/player-dvd.c
--- dvd-0.3.5b02/player-dvd.c Thu Jun 10 16:16:27 2004
+++ dvd-0.3.5b02_patched/player-dvd.c Fri Jun 11 15:05:44 2004
@@ -396,7 +396,6 @@
if(emptyDeviceToo) {
DeviceClear();
- DevicePlay();
}
}
@@ -494,7 +493,7 @@
if (dvdnav_open(&nav, const_cast<char *>(cDVD::getDVD()->DeviceName())) != DVDNAV_STATUS_OK) {
dsyslog("input thread ended (pid=%d)", getpid());
- MSG_ERROR(tr("Error opening DVD!"));
+ MSG_ERROR(tr("Error.DVD$Error opening DVD!"));
printf("dvd player: cannot open dvdnav device %s -> input thread ended (pid=%d) !\n",
const_cast<char *>(cDVD::getDVD()->DeviceName()), getpid());
active = running = false;
@@ -531,7 +530,8 @@
uint32_t cntBlocksSkipped = 0;
cntBlocksPlayed = 0;
- Empty(); // cleanup ..
+ Empty();
+ IframeCnt = -1; // mark that we have to reset the device, before 1st PlayVideo ..
running = true;
eFrameType frameType=ftUnknown;
@@ -626,11 +626,10 @@
int res = blk_size;
if( !skipPlayVideo ) {
if ( IframeCnt < 0 && frameType==ftVideo ) {
- // we played an IFrame with DeviceStillPicture -> reset !
- DEBUG_IFRAME("I-Frame: DeviceClear, DevicePlay <- prev DeviceStillPicture\n");
+ // we played an IFrame with DeviceStillPicture, or else -> reset !
IframeCnt = 0;
- DeviceClear(); // fixme .. still necessary for softdevices ?
- DevicePlay(); // fixme .. still necessary for softdevices ?
+ DeviceClear();
+ DevicePlay();
}
res = PlayVideo(write_blk, blk_size);
@@ -679,8 +678,8 @@
if (IframeCnt > 0) {
DEBUG_IFRAME("I-Frame: DeviceStillPicture: IframeCnt=%d->-1, used=%d, ", IframeCnt, iframeAssembler->Available());
- //jau fixme DeviceClear();
- //jau fixme DevicePlay();
+ DeviceClear();
+ DevicePlay();
int iframeSize=iframeAssembler->Available();
unsigned char *iframe=iframeAssembler->Get(iframeSize);
if ( iframe && iframeSize>0 ) DeviceStillPicture(iframe, iframeSize);
@@ -858,7 +857,7 @@
// from here on, continue is not allowed,
// as it would bypass dvdnav_free_cache_block
if (dvdnav_get_next_cache_block(nav, &cache_ptr, &event, &len) != DVDNAV_STATUS_OK) {
- MSG_ERROR(tr("Error fetching data from DVD!"));
+ MSG_ERROR(tr("Error.DVD$Error fetching data from DVD!"));
running = false;
break;
}
@@ -1353,7 +1352,7 @@
if (ptsFlag) {
pktptsLast = pktpts ;
pktpts = cPStream::fromPTS(sector + 9) + ptm_offs;
- cPStream::toPTS(sector + 9, pktpts);
+ cPStream::toPTS(sector + 9, pktpts, true);
fflush(stdout);
}
@@ -1715,7 +1714,6 @@
DEBUG_NAV("DVD NAV SPU clear & empty %s:%d\n", __FILE__, __LINE__);
Empty();
}
- DeviceClear();
DevicePlay();
playMode = pmPlay;
playDir = pdForward;
diff -ruNbw dvd-0.3.5b02/setup-dvd.c dvd-0.3.5b02_patched/setup-dvd.c
--- dvd-0.3.5b02/setup-dvd.c Tue Jun 8 04:37:09 2004
+++ dvd-0.3.5b02_patched/setup-dvd.c Fri Jun 11 15:05:44 2004
@@ -48,15 +48,20 @@
cMenuSetupDVD::cMenuSetupDVD(void)
{
+ spuOptionsText[0] = tr("never");
+ spuOptionsText[1] = tr("always");
+ spuOptionsText[2] = tr("Setup.DVD$forced only");
+
data = DVDSetup;
SetSection(tr("DVD"));
- Add(new cMenuEditStraItem(tr("Setup.DVD$Preferred menu language"), &data.MenuLanguage, I18nNumLanguages, Languages));
- Add(new cMenuEditStraItem(tr("Setup.DVD$Preferred audio language"), &data.AudioLanguage, I18nNumLanguages, Languages));
- Add(new cMenuEditStraItem(tr("Setup.DVD$Preferred subtitle language"), &data.SpuLanguage, I18nNumLanguages, Languages));
+ Add(new cMenuEditStraItem(tr("Setup.DVD$Preferred menu language"), &data.MenuLanguage, I18nNumLanguages, I18nLanguages()));
+ Add(new cMenuEditStraItem(tr("Setup.DVD$Preferred audio language"), &data.AudioLanguage, I18nNumLanguages, I18nLanguages()));
+ Add(new cMenuEditStraItem(tr("Setup.DVD$Preferred subtitle language"), &data.SpuLanguage, I18nNumLanguages, I18nLanguages()));
Add(new cMenuEditIntItem( tr("Setup.DVD$Player region code"), &data.PlayerRCE));
- Add(new cMenuEditStraItem(tr("Setup.DVD$Display subtitles"), &data.ShowSubtitles, 3, SpuOptions));
+ Add(new cMenuEditStraItem(tr("Setup.DVD$Display subtitles"), &data.ShowSubtitles, 3, spuOptionsText));
Add(new cMenuEditBoolItem(tr("Setup.DVD$Hide Mainmenu Entry"), &data.HideMainMenu));
Add(new cMenuEditIntItem( tr("Setup.DVD$ReadAHead"), &data.ReadAHead));
+
}
void cMenuSetupDVD::Store(void)
diff -ruNbw dvd-0.3.5b02/setup-dvd.h dvd-0.3.5b02_patched/setup-dvd.h
--- dvd-0.3.5b02/setup-dvd.h Mon Oct 6 15:52:57 2003
+++ dvd-0.3.5b02_patched/setup-dvd.h Fri Jun 11 15:05:44 2004
@@ -35,6 +35,7 @@
class cMenuSetupDVD : public cMenuSetupPage {
private:
cDVDSetup data;
+ const char *spuOptionsText[3];
protected:
virtual void Store(void);
public:
diff -ruNbw dvd-0.3.5b02/tools-dvd.h dvd-0.3.5b02_patched/tools-dvd.h
--- dvd-0.3.5b02/tools-dvd.h Wed Feb 11 21:47:51 2004
+++ dvd-0.3.5b02_patched/tools-dvd.h Fri Jun 11 15:05:44 2004
@@ -48,11 +48,11 @@
return lpts;
}
- static void toPTS(uint8_t *p, uint64_t lpts)
+ static void toPTS(uint8_t *p, uint64_t lpts, bool ptsFlag)
{
- p[0] = 0x21 | (uint8_t)((lpts >> 30) << 1);
+ p[0] = (uint8_t)((lpts >> 29) & 0x0e) | ptsFlag ? 0x21 : 0x01;
p[1] = (uint8_t) (lpts >> 22);
- p[2] = 0x01 | (uint8_t)((lpts >> 15) << 1);
+ p[2] = 0x01 | (uint8_t)(lpts >> 14);
p[3] = (uint8_t) (lpts >> 7);
p[4] = 0x01 | (uint8_t) (lpts << 1);
}
Home |
Main Index |
Thread Index