summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorAndreas Regel <andreas.regel@powarman.de>2004-01-28 19:11:00 +0100
committerAndreas Regel <andreas.regel@powarman.de>2004-01-28 19:11:00 +0100
commit64fe6b70d0a5b34a80ff458fbf1664018d5c0182 (patch)
tree4fe036adaf90fef0d0dc910b84dbc11269e40008 /config.c
parent310f5b2a62343d0c9b7624c09efe35828785ef26 (diff)
downloadvdr-plugin-osdpip-64fe6b70d0a5b34a80ff458fbf1664018d5c0182.tar.gz
vdr-plugin-osdpip-64fe6b70d0a5b34a80ff458fbf1664018d5c0182.tar.bz2
Release version 0.0.3v0.0.3
- new TS->ES remuxer: now using VDR's cRemux for TS->PES and some own code for PES->ES - now using libavcodec from ffmpeg instead of mpeg2dec - frames to decode configurable (I-frames, I-/P-frames, all frames) - frame dropping configurable - added new color depths: - 128 shades greyscale - 128 colors with variable palette using Wu's quantizer (patch needed) - changed osd size setting to 6 configurable values
Diffstat (limited to 'config.c')
-rw-r--r--config.c80
1 files changed, 66 insertions, 14 deletions
diff --git a/config.c b/config.c
index 647a5a3..86ceb87 100644
--- a/config.c
+++ b/config.c
@@ -1,26 +1,68 @@
+/*
+ * OSD Picture in Picture plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ */
+
#include "config.h"
-int ColorDepths = (MAXNUMCOLORS == 256 ? 2 : 1);
#if MAXNUMCOLORS < 256
-# warning WARNING: YOU WILL NOT BE ABLE TO USE RGB PIP
+# warning WARNING: YOU WILL NOT BE ABLE TO USE 256 COLOR PIP
+#endif
+
+#ifndef VDR_OSDPIP_PATCHED
+# warning WARNING: YOU WILL NOT BE ABLE TO USE VARIABLE COLOR PIP
+#endif
+
+#if MAXNUMCOLORS < 256
+const int kColorDepths = 1;
+#else
+# ifndef VDR_OSDPIP_PATCHED
+const int kColorDepths = 3;
+# else
+const int kColorDepths = 4;
+# endif
#endif
+const int kSizes = 6;
+const int kFrameModes = 3;
+
const char *ColorDepthItems[] = {
- "Greyscale",
- "256 colors"
+ "Greyscale (16)",
+ "Greyscale (128)",
+ "Color (256, fixed)",
+ "Color (128, variable)"
+};
+
+const char *SizeItems[] = {
+ "120x96",
+ "160x128",
+ "200x160",
+ "240x192",
+ "280x224",
+ "320x256"
+};
+
+const char *FrameModeItems[] = {
+ "I-Frames",
+ "I-, P-Frames",
+ "I-, P-, B-Frames"
};
cOsdPipSetup OsdPipSetup;
cOsdPipSetup::cOsdPipSetup(void) {
- XPosition = 20;
- YPosition = 20;
+ XPosition = 50;
+ YPosition = 50;
CropLeft = 5;
CropRight = 5;
CropTop = 5;
CropBottom = 5;
- ZoomFactor = 3;
- ColorDepth = (MAXNUMCOLORS == 256 ? 1 : 0);
+ ColorDepth = kDepthGrey16;
+ Size = 2;
+ FrameMode = kFrameModeI;
+ FrameDrop = 0;
+ SwapFfmpeg = 1;
}
bool cOsdPipSetup::SetupParse(const char *Name, const char *Value) {
@@ -30,8 +72,11 @@ bool cOsdPipSetup::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "CropRight") == 0) CropRight = atoi(Value);
else if (strcmp(Name, "CropTop") == 0) CropTop = atoi(Value);
else if (strcmp(Name, "CropBottom") == 0) CropBottom = atoi(Value);
- else if (strcmp(Name, "ZoomFactor") == 0) ZoomFactor = atoi(Value);
else if (strcmp(Name, "ColorDepth") == 0) ColorDepth = atoi(Value);
+ else if (strcmp(Name, "Size") == 0) Size = atoi(Value);
+ else if (strcmp(Name, "FrameMode") == 0) FrameMode = atoi(Value);
+ else if (strcmp(Name, "FrameDrop") == 0) FrameDrop = atoi(Value);
+ else if (strcmp(Name, "SwapFfmpeg") == 0) SwapFfmpeg = atoi(Value);
else return false;
return true;
}
@@ -46,10 +91,14 @@ cOsdPipSetupPage::cOsdPipSetupPage(void) {
80));
Add(new cMenuEditIntItem(tr("Crop at bottom"), &m_NewOsdPipSetup.CropBottom,
0, 80));
- Add(new cMenuEditIntItem(tr("Zoom factor"), &m_NewOsdPipSetup.ZoomFactor, 2,
- 4));
- Add(new cMenuEditStraItem(tr("Colordepth"), &m_NewOsdPipSetup.ColorDepth,
- ColorDepths, ColorDepthItems));
+ Add(new cMenuEditStraItem(tr("Color depth"),
+ &m_NewOsdPipSetup.ColorDepth, kColorDepths, ColorDepthItems));
+ Add(new cMenuEditStraItem(tr("Size"),
+ &m_NewOsdPipSetup.Size, kSizes, SizeItems));
+ Add(new cMenuEditStraItem(tr("Frames to display"),
+ &m_NewOsdPipSetup.FrameMode, kFrameModes, FrameModeItems));
+ Add(new cMenuEditIntItem(tr("Drop frames"), &m_NewOsdPipSetup.FrameDrop, 0, 2));
+ Add(new cMenuEditBoolItem(tr("Swap FFMPEG output"), &m_NewOsdPipSetup.SwapFfmpeg));
}
cOsdPipSetupPage::~cOsdPipSetupPage() {
@@ -64,6 +113,9 @@ void cOsdPipSetupPage::Store(void) {
SetupStore("CropRight", OsdPipSetup.CropRight);
SetupStore("CropTop", OsdPipSetup.CropTop);
SetupStore("CropBottom", OsdPipSetup.CropBottom);
- SetupStore("ZoomFactor", OsdPipSetup.ZoomFactor);
SetupStore("ColorDepth", OsdPipSetup.ColorDepth);
+ SetupStore("Size", OsdPipSetup.Size);
+ SetupStore("FrameMode", OsdPipSetup.FrameMode);
+ SetupStore("FrameDrop", OsdPipSetup.FrameDrop);
+ SetupStore("SwapFfmpeg", OsdPipSetup.SwapFfmpeg);
}