Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] PATCH: dvd-0.3.5b02_b03
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
again, thanx to marco & "weak"
(i hate using pseudonyms for a serious task ;-)
diffs:
- marco's pts and i18n stuff
- better (?) usage of DevicePlay/Clear ..
todo:
- LPCM (any test iso image ?)
- true I-Frame scanning/passing for ffwd/rew and goto's ..
cheers, sven
- --
health & wealth
mailto:sgoethel@jausoft.com
www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/
voice : +49-5121-999600 ; fax : +49-5121-999602
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAya1JHdOA30NoFAARAp28AJ4jT2Ef70LrJsAp/aHO2m7Cg2MdGQCePXeM
w9adyFO7aIHfRKro8crgVHc=
=TB6L
-----END PGP SIGNATURE-----
diff -Nur nope/dvd-0.3.5b02/ca52.c dvd-0.3.5b03/ca52.c
--- nope/dvd-0.3.5b02/ca52.c 2004-06-09 18:05:20.000000000 +0200
+++ dvd-0.3.5b03/ca52.c 2004-06-11 12:36:00.979443184 +0200
@@ -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 -Nur nope/dvd-0.3.5b02/dvdspu.c dvd-0.3.5b03/dvdspu.c
--- nope/dvd-0.3.5b02/dvdspu.c 2004-06-10 04:28:32.000000000 +0200
+++ dvd-0.3.5b03/dvdspu.c 2004-06-11 12:40:44.493342520 +0200
@@ -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 -Nur nope/dvd-0.3.5b02/dvdspu.h dvd-0.3.5b03/dvdspu.h
--- nope/dvd-0.3.5b02/dvdspu.h 2004-06-10 04:28:56.000000000 +0200
+++ dvd-0.3.5b03/dvdspu.h 2004-06-11 12:40:41.470802016 +0200
@@ -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 -Nur nope/dvd-0.3.5b02/i18n.c dvd-0.3.5b03/i18n.c
--- nope/dvd-0.3.5b02/i18n.c 2004-05-28 00:19:19.000000000 +0200
+++ dvd-0.3.5b03/i18n.c 2004-06-11 12:38:31.633540280 +0200
@@ -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$Hide Mainmenu Entry",
+ "Setup.DVD$forced only", // English
+ "nur geforderte" // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+#if VDRVERSNUM>=10300
+ "", // Russian
+#endif
+#if VDRVERSNUM>=10307
+ "",
+#endif
+ },
+ {
+ "Setup.DVD$Hide Mainmenu Entry",
+ "Hauptmenüeintrag verstecken" // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+#if VDRVERSNUM>=10300
+ "", // Russian
+#endif
+#if VDRVERSNUM>=10307
+ "",
+#endif
+ },
+ {
+ "Error.DVD$Error opening DVD!", // English
+ "Fehler beim öffnen der DVD!", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Españ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ês
+ "", // Français
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "",
+ "",
+#if VDRVERSNUM>=10300
+ "", // Russian
+#endif
+#if VDRVERSNUM>=10307
+ "",
+#endif
},
{ NULL }
};
diff -Nur nope/dvd-0.3.5b02/i18n.h dvd-0.3.5b03/i18n.h
--- nope/dvd-0.3.5b02/i18n.h 2004-05-28 01:29:00.000000000 +0200
+++ dvd-0.3.5b03/i18n.h 2004-06-11 12:38:58.308485072 +0200
@@ -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 -Nur nope/dvd-0.3.5b02/player-dvd.c dvd-0.3.5b03/player-dvd.c
--- nope/dvd-0.3.5b02/player-dvd.c 2004-06-10 16:16:27.000000000 +0200
+++ dvd-0.3.5b03/player-dvd.c 2004-06-11 14:49:11.039769384 +0200
@@ -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 -Nur nope/dvd-0.3.5b02/setup-dvd.c dvd-0.3.5b03/setup-dvd.c
--- nope/dvd-0.3.5b02/setup-dvd.c 2004-06-08 04:37:09.000000000 +0200
+++ dvd-0.3.5b03/setup-dvd.c 2004-06-11 12:46:17.592703720 +0200
@@ -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 -Nur nope/dvd-0.3.5b02/setup-dvd.h dvd-0.3.5b03/setup-dvd.h
--- nope/dvd-0.3.5b02/setup-dvd.h 2003-10-06 15:52:57.000000000 +0200
+++ dvd-0.3.5b03/setup-dvd.h 2004-06-11 12:36:01.040433912 +0200
@@ -35,6 +35,7 @@
class cMenuSetupDVD : public cMenuSetupPage {
private:
cDVDSetup data;
+ const char *spuOptionsText[3];
protected:
virtual void Store(void);
public:
diff -Nur nope/dvd-0.3.5b02/tools-dvd.h dvd-0.3.5b03/tools-dvd.h
--- nope/dvd-0.3.5b02/tools-dvd.h 2004-02-11 21:47:51.000000000 +0100
+++ dvd-0.3.5b03/tools-dvd.h 2004-06-11 12:36:01.044433304 +0200
@@ -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