Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: vdr-dvd-0.3.4-rc2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 09 October 2003 20:33, Thomas Schmidt wrote:
> Hi
> I guess it should be easy to check, if the setup-parameter
> "bitstreamout.Active" is != 0?
yep .. mimik Setup.Get for the config line ..
please check the attached patch
prost, sven
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/hk3nHdOA30NoFAARAgZ8AJ92/t1UFxVK3sq5+Zlm6KNt38glPgCguq0X
VEUtYJEziOW8wPsIbKUMRPM=
=xNlD
-----END PGP SIGNATURE-----
diff -Nur dvd-0.3.4-rc2/dvd.c dvd-0.3.4-rc3/dvd.c
--- dvd-0.3.4-rc2/dvd.c 2003-10-09 03:04:36.000000000 +0200
+++ dvd-0.3.4-rc3/dvd.c 2003-10-10 08:02:14.000000000 +0200
@@ -8,40 +8,7 @@
*
*/
-#include <vdr/plugin.h>
-#include <vdr/i18n.h>
-#include <getopt.h>
-#include "dvddev.h"
-#include "tools-dvd.h"
-#include "player-dvd.h"
-#include "control-dvd.h"
-#include "setup-dvd.h"
-#include "i18n.h"
-
-static const char *VERSION = "0.3.4-rc2";
-static const char *DESCRIPTION = "turn VDR into an (almost) full featured DVD player";
-static const char *MAINMENUENTRY = "DVD";
-
-// --- cPluginDvd ------------------------------------------------------------
-
-class cPluginDvd : public cPlugin {
-private:
- // Add any member variables or functions you may need here.
-public:
- cPluginDvd(void);
- virtual ~cPluginDvd();
- virtual const char *Version(void) { return VERSION; }
- virtual const char *Description(void) { return DESCRIPTION; }
- virtual const char *CommandLineHelp(void);
- virtual bool ProcessArgs(int argc, char *argv[]);
- virtual bool Start(void);
- virtual const char *MainMenuEntry(void) {
- return DVDSetup.HideMainMenu ? NULL : MAINMENUENTRY;
- }
- virtual cOsdMenu *MainMenuAction(void);
- virtual cMenuSetupPage *SetupMenu(void);
- virtual bool SetupParse(const char *Name, const char *Value);
- };
+#include "dvd.h"
// --- cPluginDvd ------------------------------------------------------------
cPluginDvd::cPluginDvd(void)
@@ -118,6 +85,17 @@
return DVDSetup.SetupParse(Name, Value);
}
+cSetupLine *cPluginDvd::GetSetupLine(const char *Name, const char *Plugin)
+{
+ for (cSetupLine *l = Setup.First(); l; l = Setup.Next(l)) {
+ if ((l->Plugin() == NULL) == (Plugin == NULL)) {
+ if ((!Plugin || strcasecmp(l->Plugin(), Plugin) == 0) && strcasecmp(l->Name(), Name) == 0)
+ return l;
+ }
+ }
+ return NULL;
+}
+
VDRPLUGINCREATOR(cPluginDvd); // Don't touch this!
diff -Nur dvd-0.3.4-rc2/dvd.h dvd-0.3.4-rc3/dvd.h
--- dvd-0.3.4-rc2/dvd.h 1970-01-01 01:00:00.000000000 +0100
+++ dvd-0.3.4-rc3/dvd.h 2003-10-10 08:07:48.000000000 +0200
@@ -0,0 +1,49 @@
+/*
+ * DVD Player plugin for VDR
+ *
+ * Copyright (C) 2001.2002 Andreas Schultz <aschultz@warp10.net>
+ *
+ * This code is distributed under the terms and conditions of the
+ * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
+ *
+ */
+
+#include <vdr/plugin.h>
+#include <vdr/i18n.h>
+#include <getopt.h>
+#include "dvddev.h"
+#include "tools-dvd.h"
+#include "player-dvd.h"
+#include "control-dvd.h"
+#include "setup-dvd.h"
+#include "i18n.h"
+
+static const char *VERSION = "0.3.4-rc3";
+static const char *DESCRIPTION = "turn VDR into an (almost) full featured DVD player";
+static const char *MAINMENUENTRY = "DVD";
+
+// --- cPluginDvd ------------------------------------------------------------
+
+class cPluginDvd : public cPlugin {
+ friend class cDvdPlayer;
+ friend class cDvdPlayerControl;
+ static cSetupLine *GetSetupLine(const char *Name, const char *Plugin);
+private:
+ // Add any member variables or functions you may need here.
+public:
+ cPluginDvd(void);
+ virtual ~cPluginDvd();
+ virtual const char *Version(void) { return VERSION; }
+ virtual const char *Description(void) { return DESCRIPTION; }
+ virtual const char *CommandLineHelp(void);
+ virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual bool Start(void);
+ virtual const char *MainMenuEntry(void) {
+ return DVDSetup.HideMainMenu ? NULL : MAINMENUENTRY;
+ }
+ virtual cOsdMenu *MainMenuAction(void);
+ virtual cMenuSetupPage *SetupMenu(void);
+ virtual bool SetupParse(const char *Name, const char *Value);
+ };
+
+
diff -Nur dvd-0.3.4-rc2/player-dvd.c dvd-0.3.4-rc3/player-dvd.c
--- dvd-0.3.4-rc2/player-dvd.c 2003-10-09 05:15:20.000000000 +0200
+++ dvd-0.3.4-rc3/player-dvd.c 2003-10-10 08:06:14.000000000 +0200
@@ -27,6 +27,7 @@
#include "tools-dvd.h"
#include "player-dvd.h"
#include "control-dvd.h"
+#include "dvd.h"
/**
#define CTRLDEBUG
@@ -130,7 +131,7 @@
#define MAX_MAX_SPEEDS MAX_SPEEDS*MAX_SPEEDS // the super speed maximum
#define SPEED_MULT 12 // the speed multiplier
int cDvdPlayer::Speeds[] = { 0, 0, 0, 0, 0, 0, 0, -2, -4, -8, 1, 2, 4, 12, 0, 0, 0, 0, 0, 0, 0 };
-bool cDvdPlayer::HasBitStreamOut = false;
+bool cDvdPlayer::BitStreamOutActive = false;
const int cDvdPlayer::MaxAudioTracks = 8;
const int cDvdPlayer::MaxSubpStreams = 8;
@@ -299,8 +300,18 @@
unsigned char event_buf[2048];
memset(event_buf, 0, sizeof(event_buf));
- HasBitStreamOut = (cPluginManager::GetPlugin("bitstreamout") != NULL);
- printf("dvd player: HasBitStreamOut=%d\n", HasBitStreamOut);
+ BitStreamOutActive = false;
+ bool HasBitStreamOut = (cPluginManager::GetPlugin("bitstreamout") != NULL);
+
+ cSetupLine *slBitStreamOutActive = NULL;
+
+ if(HasBitStreamOut) {
+ slBitStreamOutActive = cPluginDvd::GetSetupLine("active", "bitstreamout");
+ if(slBitStreamOutActive!=NULL)
+ BitStreamOutActive = atoi ( slBitStreamOutActive->Value() ) ? true: false ;
+ }
+ printf("dvd player: BitStreamOutActive=%d, HasBitStreamOut=%d (%d)\n",
+ BitStreamOutActive, HasBitStreamOut, slBitStreamOutActive!=NULL);
#if defined(DO_COPY) && (DO_COPY > 0)
{
@@ -1022,7 +1033,7 @@
currentNavAudioTrackType = audioType;
- if ( !(playMULTICHANNEL) && HasBitStreamOut )
+ if ( !(playMULTICHANNEL) && BitStreamOutActive )
{
uchar *b = sector;
for (int i = 0; i < r - 6; i++) {
diff -Nur dvd-0.3.4-rc2/player-dvd.h dvd-0.3.4-rc3/player-dvd.h
--- dvd-0.3.4-rc2/player-dvd.h 2003-10-09 04:37:59.000000000 +0200
+++ dvd-0.3.4-rc3/player-dvd.h 2003-10-10 07:49:41.000000000 +0200
@@ -168,7 +168,7 @@
void StripAudioPackets(uchar *b, int Length, uchar Except = 0x00);
int Resume(void);
bool Save(void);
- static bool HasBitStreamOut;
+ static bool BitStreamOutActive;
//dvd stuff
int currButtonN;
Home |
Main Index |
Thread Index