Commit f06d2c27 authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 1.1.3

- Improved the VDR Makefile to avoid a warning if the '.dependencies' file does
  not exist, and also using $(MAKE) to call recursive makes.
- Changed the name of the 'package' target in the plugin Makefiles to 'dist'
  (following the suggestions in the "GNU Make" manual). If you already have started
  a plugin project, you may want to change this in your Makefile accordingly.
- Improved the plugin Makefile to avoid a warning if the '.dependencies' file does
  not exist, and also using $(shell...) to get the version numbers. If you already have
  started a plugin project, you may want to change this in your Makefile accordingly.
- Fixed some function headers to make them compile with gcc 3.x (thanks to
  Gregoire Favre).
- Fixed the cutting mechanism to make it re-sync in case a frame is larger than the
  buffer (thanks to Sven Grothklags).
- Added an error message if the directory specified in the '-L' option can't be
  accessed (suggested by Stefan Huelswitt).
- Rearranged OSD class names to make 'cOsd' available for the main OSD interface.
- Completely moved OSD handling out of the cDvbApi class, into the new cOsd.
- Implemented cStatus to allow plugins to set up a status monitor.
  See PLUGINS.html for details.
- Moved the cEITScanner out of dvbapi.h/.c, into the new eitscan.h/.c.
- Added Swedish language texts (thanks to Tomas Prybil).
- Fixed parsing 'E' records in epg2html.pl (thanks to Matthias Fechner for pointing
  out this one).
- Removed compiler option '-m486' to make it work on non-Intel platforms. If you
  have already started a plugin project, you may want to make sure you remove this
  option from your existing Makefile.
- Completely rearranged the recording and replay functions to make them available
  to plugins.
- Replay is now done in a single thread (no more syncing between input and output
  thread necessary).
- It is now possible to record several channels on the same transponder with "budget
  cards". VDR automatically attaches a recording timer to a card that already
  records on the appropriate transponder. How many parallel recordings can actually
  be done depends on the computer's performance. Currently any number of recordings
  gets attached to a card, so you should carefully plan your timers to not exceed
  the limit. On a K6-II/450 it was possible to record three channels from transponder
  12480 with a single WinTV NOVA-S.
- Timers that record two successive shows on the same channel may now overlap and
  will use the same DVB card. During the time where both timers record the data
  is simply saved to both files.
- The following limitations apply to this version:
  + Transfer mode doesn't work yet.
  + The '-a' option (for Dolby Digital audio) doesn't work yet.
  + Switching between different language tracks doesn't work yet.
  + Cutting doesn't work yet.
parent d07e3829
......@@ -137,6 +137,8 @@ Stefan Huelswitt <huels@iname.com>
for suggesting to make 'package' target in the plugin's Makefile produce a package that
expands to a directory with just the plugin name and version number
for suggesting to make the config directory available to plugins
for suggesting to add an error message if the directory specified in the '-L'
option can't be accessed
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than
......@@ -338,3 +340,25 @@ Oliver Lorei <oliverlorei@cityweb.de>
Andreas Böttger <fboettger@t-online.de>
for reporting a bug in skipping forward in time shift mode near the end of the recording
Onno Kreuzinger <ok@solutas.net>
for reporting leftover references to the file FORMATS in MANUAL and svdrp.c
Rudi Hofer (Rudi.Hofer@cadsoft.de)
for his help in keeping 'channels.conf' up to date
Gregoire Favre <greg@ulima.unil.ch>
for fixing some function headers to make them compile with gcc 3.x
Sven Grothklags <sven@uni-paderborn.de>
for fixing the cutting mechanism to make it re-sync in case a frame is larger
than the buffer
Tomas Prybil <tomas.prybil@copper.se>
for translating OSD texts to the Swedish language
Matthias Fechner <matthiasfechner@web.de>
for pointing out a bug in parsing 'E' records in epg2html.pl
Paul Lacatus <paul@campina.iiruc.ro>
for translating OSD texts to the Romanian language
......@@ -951,7 +951,7 @@ Video Disk Recorder Revision History
- Changed the [dei]syslog macros in tools.h to use a variable number of args,
thus making it safe to use them in nested 'if/else' statements.
- Fixed error handling in establishing an SVDRP connection (thanks to Davide
Achilli) for pointing this out).
Achilli for pointing out this one).
- The new configuration file 'svdrphosts.conf' is now used to define which
hosts may access the SVDRP port (by default only 'localhost' has access).
See FORMATS for details.
......@@ -1144,7 +1144,7 @@ Video Disk Recorder Revision History
- New command command line option '-V' to display the VDR version.
- Adjusting column width for channel numbers in case there are more than 999
channels.
- Checking the return value of '...FileRady...' calls in dvbapi.c for better
- Checking the return value of '...FileReady...' calls in dvbapi.c for better
performance under heavy system load.
- New 'make' target 'install', which copies the manual pages and executables
to their appropriate system locations and creates the /video directory if
......@@ -1188,7 +1188,7 @@ Video Disk Recorder Revision History
- Now the EPG scan skips channels that have their 'Ca' parameter explicitly set
to an other DVB card (suggested by Sergei Haller).
- Fixed a possible hangup when reading a broken epg.data file (thanks to Henning
Holtschneider for pointing this one out).
Holtschneider for pointing out this one).
- Fixed a bug in the editing process in case a previously edited file with the
same name was manually deleted on a system with more than one video directory
(thanks to Dirk Wiebel for reporting this one).
......@@ -1261,7 +1261,8 @@ Video Disk Recorder Revision History
interface. 'osdbase.c/.h' now implements the abstract OSD, while 'dvbosd.c/.h'
is the actual implementation for the DVB hardware. This is in preparation for
allowing additional kinds of OSD hardware implementations.
- Fixed leftover references to the file FORMATS in MANUAL and svdrp.c.
- Fixed leftover references to the file FORMATS in MANUAL and svdrp.c (thanks to
Onno Kreuzinger for reporting this one).
- Avoiding ambiguities in the cList template class in case one defines a "list of
lists" (thanks to Stefan Huelswitt).
- Simplified the basic cMenuSetupPage class for easier use in plugins.
......@@ -1284,3 +1285,65 @@ Video Disk Recorder Revision History
See PLUGINS.html, section "Configuration files" for details.
- Improved the [eid]syslog() macros, so that the LOG_... macros don't need to be
given any more.
2002-05-26: Version 1.0.3
- Updated 'Premiere Sport 2' in channels.conf (thanks to Rudi Hofer).
- Fixed some function headers to make them compile with gcc 3.x (thanks to
Gregoire Favre).
- Fixed the cutting mechanism to make it re-sync in case a frame is larger than the
buffer (thanks to Sven Grothklags).
- Added Swedish language texts (thanks to Tomas Prybil).
2002-06-10: Version 1.0.4
- Added Romanian language texts (thanks to Paul Lacatus).
- Removed compiler option '-m486' to make it work on non-Intel platforms (thanks
to Alastair McKinstry for pointing this out).
2002-06-16: Version 1.1.3
- Improved the VDR Makefile to avoid a warning if the '.dependencies' file does
not exist, and also using $(MAKE) to call recursive makes.
- Changed the name of the 'package' target in the plugin Makefiles to 'dist'
(following the suggestions in the "GNU Make" manual). If you already have started
a plugin project, you may want to change this in your Makefile accordingly.
- Improved the plugin Makefile to avoid a warning if the '.dependencies' file does
not exist, and also using $(shell...) to get the version numbers. If you already have
started a plugin project, you may want to change this in your Makefile accordingly.
- Fixed some function headers to make them compile with gcc 3.x (thanks to
Gregoire Favre).
- Fixed the cutting mechanism to make it re-sync in case a frame is larger than the
buffer (thanks to Sven Grothklags).
- Added an error message if the directory specified in the '-L' option can't be
accessed (suggested by Stefan Huelswitt).
- Rearranged OSD class names to make 'cOsd' available for the main OSD interface.
- Completely moved OSD handling out of the cDvbApi class, into the new cOsd.
- Implemented cStatus to allow plugins to set up a status monitor.
See PLUGINS.html for details.
- Moved the cEITScanner out of dvbapi.h/.c, into the new eitscan.h/.c.
- Added Swedish language texts (thanks to Tomas Prybil).
- Fixed parsing 'E' records in epg2html.pl (thanks to Matthias Fechner for pointing
out this one).
- Removed compiler option '-m486' to make it work on non-Intel platforms. If you
have already started a plugin project, you may want to make sure you remove this
option from your existing Makefile.
- Completely rearranged the recording and replay functions to make them available
to plugins.
- Replay is now done in a single thread (no more syncing between input and output
thread necessary).
- It is now possible to record several channels on the same transponder with "budget
cards". VDR automatically attaches a recording timer to a card that already
records on the appropriate transponder. How many parallel recordings can actually
be done depends on the computer's performance. Currently any number of recordings
gets attached to a card, so you should carefully plan your timers to not exceed
the limit. On a K6-II/450 it was possible to record three channels from transponder
12480 with a single WinTV NOVA-S.
- Timers that record two successive shows on the same channel may now overlap and
will use the same DVB card. During the time where both timers record the data
is simply saved to both files.
- The following limitations apply to this version:
+ Transfer mode doesn't work yet.
+ The '-a' option (for Dolby Digital audio) doesn't work yet.
+ Switching between different language tracks doesn't work yet.
+ Cutting doesn't work yet.
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.35 2002/05/10 10:24:46 kls Exp $
# $Id: Makefile 1.40 2002/06/10 16:31:34 kls Exp $
.DELETE_ON_ERROR:
......@@ -21,9 +21,10 @@ INCLUDES = -I$(DVBDIR)/ost/include
DTVLIB = $(DTVDIR)/libdtv.a
OBJS = config.o dvbapi.o dvbosd.o eit.o font.o i18n.o interface.o menu.o\
menuitems.o osdbase.o osd.o plugin.o recording.o remote.o remux.o ringbuffer.o\
svdrp.o thread.o tools.o vdr.o videodir.o
OBJS = audio.o config.o device.o dvbplayer.o dvbosd.o eit.o eitscan.o font.o i18n.o\
interface.o menu.o menuitems.o osdbase.o osd.o player.o plugin.o receiver.o\
recorder.o recording.o remote.o remux.o ringbuffer.o status.o svdrp.o thread.o\
tools.o vdr.o videodir.o
OSDFONT = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-1
FIXFONT = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-1
......@@ -57,7 +58,7 @@ font: genfontfile fontfix.c fontosd.c
# Implicit rules:
%.o: %.c
g++ -g -O2 -Wall -Woverloaded-virtual -m486 -c $(DEFINES) $(INCLUDES) $<
g++ -g -O2 -Wall -Woverloaded-virtual -c $(DEFINES) $(INCLUDES) $<
# Dependencies:
......@@ -66,7 +67,7 @@ DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
include $(DEPFILE)
-include $(DEPFILE)
# The main program:
......@@ -88,7 +89,7 @@ genfontfile: genfontfile.c
# The libdtv library:
$(DTVLIB) $(DTVDIR)/libdtv.h:
make -C $(DTVDIR) all
$(MAKE) -C $(DTVDIR) all
# The 'include' directory (for plugins):
......@@ -99,10 +100,10 @@ include-dir:
# Plugins:
plugins: include-dir
@for i in `ls $(PLUGINDIR)/SRC | grep -v '[^a-z0-9]'`; do make -C "$(PLUGINDIR)/SRC/$$i" all; done
@for i in `ls $(PLUGINDIR)/SRC | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/SRC/$$i" all; done
plugins-clean:
@for i in `ls $(PLUGINDIR)/SRC | grep -v '[^a-z0-9]'`; do make -C "$(PLUGINDIR)/SRC/$$i" clean; done
@for i in `ls $(PLUGINDIR)/SRC | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/SRC/$$i" clean; done
@-rm -f $(PLUGINDIR)/lib/*
# Install the files:
......@@ -119,7 +120,7 @@ install:
# Housekeeping:
clean:
make -C $(DTVDIR) clean
$(MAKE) -C $(DTVDIR) clean
-rm -f $(OBJS) $(DEPFILE) vdr genfontfile genfontfile.o core* *~
-rm -rf include
fontclean:
......
This diff is collapsed.
......@@ -14,3 +14,7 @@ VDR Plugin 'hello' Revision History
- Changed return type of cPluginHello::Start().
- Added cPluginHello::Housekeeping().
- Modified package generation.
2002-05-17: Version 0.0.4
- Makefile improvements.
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.2 2002/05/12 15:09:07 kls Exp $
# $Id: Makefile 1.4 2002/06/10 16:24:06 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
......@@ -11,7 +11,7 @@ PLUGIN = hello
### The version number of this plugin (taken from the main source file):
VERSION = `grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g'`
VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
### The directory environment:
......@@ -23,7 +23,7 @@ TMPDIR = /tmp
### The version number of VDR (taken from VDR's "config.h"):
VDRVERSION = `grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g'`
VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
......@@ -43,7 +43,7 @@ OBJS = $(PLUGIN).o i18n.o
### The C++ compiler and options:
CXX = g++
CXXFLAGS = -O2 -Wall -Woverloaded-virtual -m486
CXXFLAGS = -O2 -Wall -Woverloaded-virtual
### Implicit rules:
......@@ -57,7 +57,7 @@ DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
include $(DEPFILE)
-include $(DEPFILE)
### Targets:
......@@ -67,7 +67,7 @@ libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
@cp $@ $(LIBDIR)/$@.$(VDRVERSION)
package: clean
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
......
......@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: hello.c 1.4 2002/05/12 10:18:59 kls Exp $
* $Id: hello.c 1.5 2002/05/14 21:23:25 kls Exp $
*/
#include <getopt.h>
......@@ -11,7 +11,7 @@
#include <vdr/plugin.h>
#include "i18n.h"
static const char *VERSION = "0.0.3";
static const char *VERSION = "0.0.4";
static const char *DESCRIPTION = "A friendly greeting";
static const char *MAINMENUENTRY = "Hello";
......
This diff is collapsed.
VDR Plugin 'status' Revision History
------------------------------------
2002-05-18: Version 0.0.1
- Initial revision.
#
# Makefile for a Video Disk Recorder plugin
#
# $Id$
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
# By default the main source file also carries this name.
#
PLUGIN = status
### The version number of this plugin (taken from the main source file):
VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
### The directory environment:
DVBDIR = ../../../../DVB/ost/include
VDRDIR = ../../..
VDRINC = $(VDRDIR)/include
LIBDIR = ../../lib
TMPDIR = /tmp
### The version number of VDR (taken from VDR's "config.h"):
VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
ARCHIVE = $(PLUGIN)-$(VERSION)
PACKAGE = vdr-$(ARCHIVE)
### Includes and Defines (add further entries here):
INCLUDES = -I$(VDRINC) -I$(DVBDIR)
DEFINES = -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
### The object files (add further files here):
OBJS = $(PLUGIN).o
### The C++ compiler and options:
CXX = g++
CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual
### Implicit rules:
%.o: %.c
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
# Dependencies:
MAKEDEP = g++ -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE)
### Targets:
all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
@cp $@ $(LIBDIR)/$@.$(VDRVERSION)
package: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
clean:
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
This is a "plugin" for the Video Disk Recorder (VDR).
Written by: Klaus Schmidinger <kls@cadsoft.de>
Project's homepage: www.cadsoft.de/people/kls/vdr
Latest version available at: www.cadsoft.de/people/kls/vdr/software.htm
See the file COPYING for license information.
Description: This is an example that shows the use of cStatus.
/*
* status.c: A plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
* $Id$
*/
#include <vdr/plugin.h>
#include <vdr/status.h>
static const char *VERSION = "0.0.1";
static const char *DESCRIPTION = "Status monitor test";
static const char *MAINMENUENTRY = NULL;
// ---
class cStatusTest : public cStatus {
protected:
virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
virtual void Recording(const cDevice *Device, const char *Name);
virtual void Replaying(const cDvbPlayerControl *DvbPlayerControl, const char *Name);
virtual void SetVolume(int Volume, bool Absolute);
virtual void OsdClear(void);
virtual void OsdTitle(const char *Title);
virtual void OsdStatusMessage(const char *Message);
virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue);
virtual void OsdCurrentItem(const char *Text);
virtual void OsdTextItem(const char *Text, bool Scroll);
virtual void OsdChannel(const char *Text);
virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle);
};
void cStatusTest::ChannelSwitch(const cDevice *Device, int ChannelNumber)
{
dsyslog("status: cStatusTest::ChannelSwitch %d %d", Device->CardIndex(), ChannelNumber);
}
void cStatusTest::Recording(const cDevice *Device, const char *Name)
{
dsyslog("status: cStatusTest::Recording %d %s", Device->CardIndex(), Name);
}
void cStatusTest::Replaying(const cDvbPlayerControl *DvbPlayerControl, const char *Name)
{
dsyslog("status: cStatusTest::Replaying %s", Name);
}
void cStatusTest::SetVolume(int Volume, bool Absolute)
{
dsyslog("status: cStatusTest::SetVolume %d %d", Volume, Absolute);
}
void cStatusTest::OsdClear(void)
{
dsyslog("status: cStatusTest::OsdClear");
}
void cStatusTest::OsdTitle(const char *Title)
{
dsyslog("status: cStatusTest::OsdTitle '%s'", Title);
}
void cStatusTest::OsdStatusMessage(const char *Message)
{
dsyslog("status: cStatusTest::OsdStatusMessage '%s'", Message);
}
void cStatusTest::OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
{
dsyslog("status: cStatusTest::OsdHelpKeys %s - %s - %s - %s", Red, Green, Yellow, Blue);
}
void cStatusTest::OsdCurrentItem(const char *Text)
{
dsyslog("status: cStatusTest::OsdCurrentItem %s", Text);
}
void cStatusTest::OsdTextItem(const char *Text, bool Scroll)
{
dsyslog("status: cStatusTest::OsdTextItem %s %d", Text, Scroll);
}
void cStatusTest::OsdChannel(const char *Text)
{
dsyslog("status: cStatusTest::OsdChannel %s", Text);
}
void cStatusTest::OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
{
char buffer[25];
struct tm tm_r;
dsyslog("status: cStatusTest::OsdProgramme");
strftime(buffer, sizeof(buffer), "%R", localtime_r(&PresentTime, &tm_r));
dsyslog("%5s %s", buffer, PresentTitle);
dsyslog("%5s %s", "", PresentSubtitle);
strftime(buffer, sizeof(buffer), "%R", localtime_r(&FollowingTime, &tm_r));
dsyslog("%5s %s", buffer, FollowingTitle);
dsyslog("%5s %s", "", FollowingSubtitle);
}
// ---
class cPluginStatus : public cPlugin {
private:
// Add any member variables or functions you may need here.
cStatusTest *statusTest;
public:
cPluginStatus(void);
virtual ~cPluginStatus();
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 void Housekeeping(void);
virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
virtual cOsdMenu *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
};
cPluginStatus::cPluginStatus(void)
{
// Initialize any member varaiables here.
// DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
// VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
statusTest = NULL;
}
cPluginStatus::~cPluginStatus()
{
// Clean up after yourself!
delete statusTest;
}
const char *cPluginStatus::CommandLineHelp(void)
{
// Return a string that describes all known command line options.
return NULL;
}
bool cPluginStatus::ProcessArgs(int argc, char *argv[])
{
// Implement command line argument processing here if applicable.
return true;
}
bool cPluginStatus::Start(void)
{
// Start any background activities the plugin shall perform.
statusTest = new cStatusTest;
return true;
}
void cPluginStatus::Housekeeping(void)
{
// Perform any cleanup or other regular tasks.
}
cOsdMenu *cPluginStatus::MainMenuAction(void)
{
// Perform the action when selected from the main VDR menu.
return NULL;
}
cMenuSetupPage *cPluginStatus::SetupMenu(void)
{
// Return a setup menu in case the plugin supports one.
return NULL;
}
bool cPluginStatus::SetupParse(const char *Name, const char *Value)
{
// Parse your own setup parameters and store their values.
return false;
}
VDRPLUGINCREATOR(cPluginStatus); // Don't touch this!
/*
* audio.c: The basic audio interface
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: audio.c 1.1 2002/05/30 11:08:54 kls Exp $
*/
#include "audio.h"
/*
* audio.h: The basic audio interface
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: audio.h 1.1 2002/05/30 11:07:28 kls Exp $
*/
#ifndef __AUDIO_H
#define __AUDIO_H
#endif //__AUDIO_H
......@@ -4,16 +4,16 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.101 2002/05/13 16:28:12 kls Exp $
* $Id: config.c 1.102 2002/06/16 12:57:31 kls Exp $
*/
#include "config.h"
#include <ctype.h>
#include <stdlib.h>
#include "dvbapi.h"
#include "i18n.h"
#include "interface.h"
#include "plugin.h"
#include "recording.h"
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
// format characters in order to allow any number of blanks after a numeric
......@@ -293,15 +293,15 @@ bool cChannel::Save(FILE *f)
return fprintf(f, ToText()) > 0;
}
bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
bool cChannel::Switch(cDevice *Device, bool Log)
{
if (!DvbApi)
DvbApi = cDvbApi::PrimaryDvbApi;
if (!DvbApi->Recording() && !groupSep) {
if (!Device)
Device = cDevice::PrimaryDevice();
if (!(Device->IsPrimaryDevice() && Device->Receiving()) && !groupSep) {
if (Log)
isyslog("switching to channel %d", number);
for (int i = 3; i--;) {
switch (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr)) {
switch (Device->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, tpid, ca, pnr)) {
case scrOk: return true;
case scrNoTransfer: if (Interface)
Interface->Error(tr("Can't start Transfer Mode!"));
......@@ -312,7 +312,7 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
}
return false;
}
if (DvbApi->Recording())
if (Device->IsPrimaryDevice() && Device->Receiving())
Interface->Error(tr("Channel locked (recording)!"));
return false;
}
......@@ -326,7 +326,7 @@ cTimer::cTimer(bool Instant)
startTime = stopTime = 0;
recording = pending = false;
active = Instant ? taActInst : taInactive;
cChannel *ch = Channels.GetByNumber(cDvbApi::CurrentChannel());
cChannel *ch = Channels.GetByNumber(cDevice::CurrentChannel());
channel = ch ? ch->number : 0;
time_t t = time(NULL);
struct tm tm_r;
......@@ -836,10 +836,10 @@ cChannel *cChannels::GetByServiceID(unsigned short ServiceId)
return NULL;
}
bool cChannels::SwitchTo(int Number, cDvbApi *DvbApi)
bool cChannels::SwitchTo(int Number, cDevice *Device)
{
cChannel *channel = GetByNumber(Number);
return channel && channel->Switch(DvbApi);
return channel && channel->Switch(Device);
}
const char *cChannels::GetChannelNameByNumber(int Number)
......@@ -957,6 +957,7 @@ bool cSetupLine::operator< (const cListObject &ListObject)
bool cSetupLine::Parse(char *s)
{
//dsyslog("cSetupLine::Parse '%s'", s);//XXX-
char *p = strchr(s, '=');
if (p) {
*p = 0;
......@@ -974,6 +975,7 @@ bool cSetupLine::Parse(char *s)
}
name = strdup(Name);
value = strdup(Value);
//dsyslog("cSetupLine::Parse '%s' = '%s'", name, value);//XXX-
return true;
}
}
......@@ -982,6 +984,7 @@ bool cSetupLine::Parse(char *s)
bool cSetupLine::Save(FILE *f)
{
//dsyslog("cSetupLine::Save '%s' = '%s'", name, value);//XXX-
return fprintf(f, "%s%s%s = %s\n", plugin ? plugin : "", plugin ? "." : "", name, value) > 0;
}
......@@ -1095,7 +1098,7 @@ bool cSetup::Load(const char *FileName)
void cSetup::StoreCaCaps(const char *Name)
{
for (int d = 0; d < MAXDVBAPI; d++) {
for (int d = 0; d < MAXDEVICES; d++) {
char buffer[MAXPARSEBUFFER];
char *q = buffer;
*buffer = 0;
......@@ -1115,7 +1118,7 @@ bool cSetup::ParseCaCaps(const char *Value)
{
char *p;
int d = strtol(Value, &p, 10);
if (d > 0 && d <= MAXDVBAPI) {
if (d > 0 && d <= MAXDEVICES) {
d--;
int i = 0;
while (p != Value && p && *p) {
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.116 2002/05/13 16:28:16 kls Exp $
* $Id: config.h 1.118 2002/05/31 10:20:56 kls Exp $
*/
#ifndef __CONFIG_H
......@@ -15,11 +15,11 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "dvbapi.h"
#include "device.h"
#include "eit.h"
#include "tools.h"
#define VDRVERSION "1.1.2"
#define VDRVERSION "1.1.3"
#define MAXPRIORITY 99
#define MAXLIFETIME 99
......@@ -118,7 +118,7 @@ public:
const char *ToText(void);
bool Parse(const char *s);
bool Save(FILE *f);
bool Switch(cDvbApi *DvbApi = NULL, bool Log = true);
bool Switch(cDevice *Device = NULL, bool Log = true);
};
enum eTimerActive { taInactive = 0,
......@@ -294,7 +294,7 @@ public:
cChannel *GetByNumber(int Number);
cChannel *GetByServiceID(unsigned short ServiceId);
const char *GetChannelNameByNumber(int Number);