summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-18 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-18 18:00:00 +0200
commit371bf0665eda455c67926999f52b4850cd8529e4 (patch)
tree383f39f92ef1f3846d89e4ae6ad7e39699334f01 /menu.c
parentefea0f64d08052b0189d962101e1a3634d4adfc8 (diff)
downloadvdr-patch-lnbsharing-371bf0665eda455c67926999f52b4850cd8529e4.tar.gz
vdr-patch-lnbsharing-371bf0665eda455c67926999f52b4850cd8529e4.tar.bz2
Version 0.92vdr-0.92
- The "channel not sync'ed" log message now also lists the card number. - Now using the EIT services from 'libdtv' (thanks to Rolf Hakenes), which provides EPG information for NVOD ("Near Video On Demand") channels. - Doing some bug fixing on the EPG data (some tv stations apparently have their own idea on how to fill in the data...). The level up to which EPG bugs are fixed can be controlled with the EPGBugfixLevel parameter in the "Setup" menu (see MANUAL for details, and cEventInfo::FixEpgBugs() in eit.c for the actual implementation). - Fixed broken recordings after a driver buffer overflow. - Fixed the chirping sound after Pause/Play of a DVD (thanks to Andreas Schultz).
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 0f89fab..4cc43f0 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.103 2001/08/12 12:42:37 kls Exp $
+ * $Id: menu.c 1.105 2001/08/19 14:45:31 kls Exp $
*/
#include "menu.h"
@@ -17,6 +17,7 @@
#include "i18n.h"
#define MENUTIMEOUT 120 // seconds
+#define MAXWAIT4EPGINFO 10 // seconds
const char *FileNameChars = " aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789-.#^";
@@ -1701,6 +1702,7 @@ void cMenuSetup::Set(void)
Add(new cMenuEditIntItem( tr("MarginStart"), &data.MarginStart));
Add(new cMenuEditIntItem( tr("MarginStop"), &data.MarginStop));
Add(new cMenuEditIntItem( tr("EPGScanTimeout"), &data.EPGScanTimeout));
+ Add(new cMenuEditIntItem( tr("EPGBugfixLevel"), &data.EPGBugfixLevel, 0, 3));
Add(new cMenuEditIntItem( tr("SVDRPTimeout"), &data.SVDRPTimeout));
Add(new cMenuEditIntItem( tr("PrimaryLimit"), &data.PrimaryLimit, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("DefaultPriority"), &data.DefaultPriority, 0, MAXPRIORITY));
@@ -2062,6 +2064,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
{
+ eventInfo = NULL;
instantId = NULL;
dvbApi = DvbApi;
if (!dvbApi) dvbApi = cDvbApi::PrimaryDvbApi;//XXX
@@ -2075,6 +2078,11 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
timer->SetPending(true);
timer->SetRecording(true);
if (Channels.SwitchTo(timer->channel, dvbApi)) {
+ if (GetEventInfo()) {
+ //XXX this is in preparation for storing recordings in subdirectories and giving them the name of the Subtitle
+ dsyslog(LOG_INFO, "Title: '%s' Subtitle: '%s'", eventInfo->GetTitle(), eventInfo->GetSubtitle());//XXX
+ //XXX modify timer's name and summary, mark it as modified (revert later when stopping)
+ }
cRecording Recording(timer);
if (dvbApi->StartRecord(Recording.FileName(), Channels.GetByNumber(timer->channel)->ca, timer->priority))
Recording.WriteSummary();
@@ -2090,6 +2098,34 @@ cRecordControl::~cRecordControl()
delete instantId;
}
+bool cRecordControl::GetEventInfo(void)
+{
+ cChannel *channel = Channels.GetByNumber(timer->channel);
+ time_t Time = timer->StartTime() + (timer->StopTime() - timer->StartTime()) / 2;
+ for (int seconds = 0; seconds <= MAXWAIT4EPGINFO; seconds++) {
+ {
+ cThreadLock ThreadLock;
+ const cSchedules *Schedules = dvbApi->Schedules(&ThreadLock);
+ if (Schedules) {
+ const cSchedule *Schedule = Schedules->GetSchedule(channel->pnr);
+ if (Schedule) {
+ eventInfo = Schedule->GetEvent(Time);
+ if (eventInfo) {
+ if (seconds > 0)
+ dsyslog(LOG_INFO, "got EPG info after %d seconds", seconds);
+ return true;
+ }
+ }
+ }
+ }
+ if (seconds == 0)
+ dsyslog(LOG_INFO, "waiting for EPG info...");
+ sleep(1);
+ }
+ dsyslog(LOG_INFO, "no EPG info available");
+ return false;
+}
+
void cRecordControl::Stop(bool KeepInstant)
{
if (timer) {