Commit 1a8a0816 authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 1.1.15

- Completely switched to the new CVS HEAD version of the linux-dvb driver.
  The NEWSTRUCT compile time switch is now obsolete. The required driver is now
  the CVS HEAD version dated 2002-11-01 or later.
- Adjusted the INSTALL file to the 1.1.x version.
- Only accepting key presses from the current remote control when learning (thanks to
  Oliver Endriss).
- Fixed the EPG scanner, which broke 'Transfer Mode' as soon as it kicked in
  (thanks to Oliver Endriss for reporting this one).
- Fixed handling audio tracks in cDvbDevice.
- Updated channels.conf.terr (thanks to Uwe Scheffler).
- Fixed displaying the group separators in the channel display (thanks to Martin
  Hammerschmid for pointing out this one).
- The Makefile now includes the file Make.config (if present in the VDR source
  directory), which allows the user to overwrite several settings with individual
  values (suggested by Andreas Schultz). The VDR distribution archive does not
  contain this file in order to not overwrite a user defined file. There is a
  Make.config.template which contains the default values of the macros the user
  can overwrite.
- Since there have been changes to the 'newplugin' script authors of plugins
  may want to newly create their plugins' Makefiles with the new version of this
  script, and adapt them to their individual needs (make sure you don't overwrite
  your existing plugin directory - make a backup copy first!).
- Fixed reading EPG data via the SVDRP command PUTE (it changed the current
  service ID).
- Fixed closing all dup'ed file descriptors in cPipe.
- Implemented a plugin interface for additional audio processing (see PLUGINS.html
  under "Dolby Digital").
  The functionality of the '-a' command line option has been reactivated.
  Since the author doesn't have any Dolby Digital equipment this may or may not
  work as expected. There may still be some places where a call to cAudios::Clear()
  or cAudios::Mute() is necessary. Those with Dolby Digital equipment should please
  take a look at this and maybe send patches.
  Replaying Dolby Digital in ways other than through VDR's '-a' option will have to
  be implemented as plugins. Those who have written patches for VDR version 1.0.x
  should convert their work into the proper plugins for version 1.1.x.
  Note to authors of cPlayer derived plugins: please read the modified comments
  in device.h regarding the member functions cDevice::Clear(), cDevice::Mute() and
  cDevice::PlayAudio(). Derived classes must call these base class member functions
  to make sure all registered cAudio objects are properly handled. Also note that
  the return type of cDevice::PlayAudio() has been changed to 'void', since this
  function always has to accept the entire data block immediately and there is
  nothing that could be reasonably done in case an error occurs in one of the
  cAudio objects.
- Now checking the driver's DVB_API_VERSION in dvbdevice.h. Since VDR now requires
  a driver dated 2002-11-01 or later the MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT and
  DVB_DRIVER_VERSION stuff has been replaced with DO_REC_AND_PLAY_ON_PRIMARY_DEVICE,
  which can be used to disable simultaneous recording and replaying on the primary
  DVB device in case there are problems with this.
parent 57bd7eee
......@@ -47,6 +47,7 @@ Martin Hammerschmid <martin@hammerschmid.com>
for detecting a deadlock when switching channels via Schedule/Now|Next/Switch
for adding a missing #include to ringbuffer.c
for adding a missing 'public' keyword in device.h
for pointing out a bug in displaying the group separators in the channel display
Bastian Guse <bastian@nocopy.de>
for writing the FORMATS entry for timers.conf
......@@ -184,6 +185,7 @@ Andreas Schultz <aschultz@warp10.net>
for reporting a problem with plugin Makefiles and the NEWSTRUCT driver
for pointing out some unnecessary #includes in eit.c and a problem with
cMenuRecordings::Del(), which caused warnings with gcc-3.2
for suggesting a Make.config file
Aaron Holtzman
for writing 'ac3dec'
......@@ -426,6 +428,10 @@ Oliver Endriss <o.endriss@gmx.de>
one remote control
for reporting a crash when learning the keys of several remote controls and
pressing buttons of those that have already been learned
for making the remote control learn procedure accept key presses only from the
current remote control
for reporting a bug in the EPG scanner, which broke 'Transfer Mode' as soon as
it kicked in
Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf'
......
......@@ -1670,3 +1670,54 @@ Video Disk Recorder Revision History
- Fixed a crash when learning the keys of several remote controls and pressing
buttons of those that have already been learned (thanks to Oliver Endriss for
reporting this one).
2002-11-03: Version 1.1.15
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
The NEWSTRUCT compile time switch is now obsolete. The required driver is now
the CVS HEAD version dated 2002-11-01 or later.
- Adjusted the INSTALL file to the 1.1.x version.
- Only accepting key presses from the current remote control when learning (thanks to
Oliver Endriss).
- Fixed the EPG scanner, which broke 'Transfer Mode' as soon as it kicked in
(thanks to Oliver Endriss for reporting this one).
- Fixed handling audio tracks in cDvbDevice.
- Updated channels.conf.terr (thanks to Uwe Scheffler).
- Fixed displaying the group separators in the channel display (thanks to Martin
Hammerschmid for pointing out this one).
- The Makefile now includes the file Make.config (if present in the VDR source
directory), which allows the user to overwrite several settings with individual
values (suggested by Andreas Schultz). The VDR distribution archive does not
contain this file in order to not overwrite a user defined file. There is a
Make.config.template which contains the default values of the macros the user
can overwrite.
- Since there have been changes to the 'newplugin' script authors of plugins
may want to newly create their plugins' Makefiles with the new version of this
script, and adapt them to their individual needs (make sure you don't overwrite
your existing plugin directory - make a backup copy first!).
- Fixed reading EPG data via the SVDRP command PUTE (it changed the current
service ID).
- Fixed closing all dup'ed file descriptors in cPipe.
- Implemented a plugin interface for additional audio processing (see PLUGINS.html
under "Dolby Digital").
The functionality of the '-a' command line option has been reactivated.
Since the author doesn't have any Dolby Digital equipment this may or may not
work as expected. There may still be some places where a call to cAudios::Clear()
or cAudios::Mute() is necessary. Those with Dolby Digital equipment should please
take a look at this and maybe send patches.
Replaying Dolby Digital in ways other than through VDR's '-a' option will have to
be implemented as plugins. Those who have written patches for VDR version 1.0.x
should convert their work into the proper plugins for version 1.1.x.
Note to authors of cPlayer derived plugins: please read the modified comments
in device.h regarding the member functions cDevice::Clear(), cDevice::Mute() and
cDevice::PlayAudio(). Derived classes must call these base class member functions
to make sure all registered cAudio objects are properly handled. Also note that
the return type of cDevice::PlayAudio() has been changed to 'void', since this
function always has to accept the entire data block immediately and there is
nothing that could be reasonably done in case an error occurs in one of the
cAudio objects.
- Now checking the driver's DVB_API_VERSION in dvbdevice.h. Since VDR now requires
a driver dated 2002-11-01 or later the MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT and
DVB_DRIVER_VERSION stuff has been replaced with DO_REC_AND_PLAY_ON_PRIMARY_DEVICE,
which can be used to disable simultaneous recording and replaying on the primary
DVB device in case there are problems with this.
......@@ -13,9 +13,9 @@ extracted into the directory /home/kls/vdr/DVB, then this
package should be extracted into /home/kls/vdr/VDR.
If you have the DVB driver source in a different location
you will have to change the definition of DVBDIR in the
Makefile.
Makefile (see the file Make.config.template).
VDR requires the Linux-DVB card driver version dated 2001-09-14 or higher
VDR requires the Linux-DVB card driver version dated 2002-11-01 or higher
to work properly.
After extracting the package, change into the VDR directory
......@@ -306,8 +306,8 @@ Setting up DiSEqC:
If you are using a DVB-S card with a satellite equipment that needs to be
accessed using DiSEqC, you have to go to the "Setup" menu and set the "DiSEqC"
parameter to "on". Also check the "DiSEqC" parameters for the various channels
and set them to the necessary values.
parameter to "on". You also need to set up the file 'diseqc.conf' to properly
access your DiSEqC equipment (see man vdr(5) for details).
Running VDR with DVB-C (cable) or DVB-T (terrestrial):
------------------------------------------------------
......@@ -318,14 +318,13 @@ cable or terrestrial reception is the 'channels.conf' file. The distribution
archive contains a default 'channels.conf.cable' and 'channels.conf.terr',
respectively, which users of such cards can rename or copy to 'channels.conf'
in order to receive digital cable or terrestrial channels. The format of these
files is exactly the same as for satellite channels (the fields containing
"Polarization" and "Diseqc" data are ignored in case of DVB-C and DVB-T, and
the "Frequency" is in kHz in case of DVB-T).
files is mostly the same as for satellite channels, however, some fields have
different or extended meanings (see man vdr(5) for details).
You can even use a mixture of DVB-S, DVB-C and DVB-T cards in the same system.
All you need to do is to put all the channel definitions into one big
'channels.conf' file and set the 'Ca' parameter of each channel to the number
of the card that can receive it.
'channels.conf' file. VDR will automatically know which channels can be
received with which card(s) by evaluating the 'source' parameter.
Learning the remote control keys:
---------------------------------
......
#
# User defined Makefile options for the Video Disk Recorder
#
# Copy this file to 'Make.config' and change the parameters as necessary.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Make.config.template 1.1 2002/11/01 14:05:36 kls Exp $
### The C compiler and options:
CC = gcc
CFLAGS = -O2
CXX = g++
CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual
### The directory environment:
DVBDIR = ../DVB
MANDIR = /usr/local/man
BINDIR = /usr/local/bin
VIDEODIR = /video
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.49 2002/10/19 15:46:08 kls Exp $
# $Id: Makefile 1.51 2002/11/01 13:11:53 kls Exp $
.DELETE_ON_ERROR:
......@@ -23,12 +23,9 @@ PLUGINDIR= ./PLUGINS
VIDEODIR = /video
ifdef NEWSTRUCT
-include Make.config
INCLUDES = -I$(DVBDIR)/include
DEFINES += -DNEWSTRUCT
else
INCLUDES = -I$(DVBDIR)/ost/include
endif
DTVLIB = $(DTVDIR)/libdtv.a
......
......@@ -21,18 +21,18 @@ VDR program and present itself to the user.
The <i>inside</i> interface provides the plugin code access to VDR's internal data
structures and allows it to hook itself into specific areas to perform special actions.
<p>
<!--X1.1.11--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.11 are marked like this.
<!--X1.1.11--></td></tr></table>
<!--X1.1.12--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<!--X1.1.12--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.12 are marked like this.
<!--X1.1.12--></td></tr></table>
<!--X1.1.13--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.1.13--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.13 are marked like this.
<!--X1.1.13--></td></tr></table>
<!--X1.1.14--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<!--X1.1.14--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.14 are marked like this.
<!--X1.1.14--></td></tr></table>
<!--X1.1.15--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.15 are marked like this.
<!--X1.1.15--></td></tr></table>
<a name="Part I - The Outside Interface"><hr><center><h1>Part I - The Outside Interface</h1></center>
......@@ -964,7 +964,7 @@ bool DevicePoll(cPoller &amp;Poller, int TimeoutMs = 0);
</pre></td></tr></table><p>
to determine whether the device is ready for further data.
<!--X1.1.13--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.1.13--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<p>
If the player can provide more than a single audio track, it can implement the
following functions to make them available:
......@@ -977,7 +977,16 @@ virtual void SetAudioTrack(int Index);
<!--X1.1.13--></td></tr></table>
<p>
TODO: PlayAudio()???
<!--X1.1.15--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
If there is an additional audio track that has to be replayed with external hardware,
the player shall call its member function
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
void PlayAudio(const uchar *Data, int Length);
</pre></td></tr></table><p>
where <tt>Data</tt> points to a complete audio PES packet of <tt>Length</tt> bytes.
<!--X1.1.15--></td></tr></table>
<p>
The second part needed here is a control object that receives user input from the main
program loop and reacts on this by telling the player what to do:
......@@ -1196,7 +1205,7 @@ If the new device can receive, it most likely needs to provide a way of
selecting which channel it shall tune to:
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
<!--X1.1.12--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<!--X1.1.12--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
virtual bool ProvidesSource(int Source) const;
<!--X1.1.12--></td></tr></table>
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL);
......@@ -1206,7 +1215,7 @@ virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
These functions will be called with the desired source or channel and shall return whether
this device can provide the requested source or channel and whether tuning to it was successful,
repectively.
<!--X1.1.13--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.1.13--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<p>
<b>Audio selection</b>
<p>
......@@ -1253,7 +1262,7 @@ The functions to implement replaying capabilites are
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
virtual bool HasDecoder(void) const;
<!--X1.1.14--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<!--X1.1.14--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
virtual bool CanReplay(void) const;
<!--X1.1.14--></td></tr></table>
virtual bool SetPlayMode(ePlayMode PlayMode);
......@@ -1315,7 +1324,51 @@ shut down (delete) all devices when the program terminates. It is therefore
important that the devices are created on the heap, using the <tt>new</tt>
operator!
<!--X1.1.11--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
<!--X1.1.15--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<hr><h2>Dolby Digital</h2>
<center><i><b>"The stereo effect may only be experienced if stereo equipment is used!"</b></i></center><p>
There are many different ways to replay additional audio tracks, like Dolby Digital.
So VDR offers a plugin interface that allows for the implementation of any kind of
audio replay facility.
<p>
To implement a new audio output facility, simply derive a class from <tt>cAudio</tt>,
as in
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
#include &lt;vdr/audio.h&gt;
#include &lt;vdr/thread.h&gt;
class cMyAudio : public cAudio, private cThread {
private:
virtual void Action(void);
public:
cMyAudio(void);
virtual void Play(const uchar *Data, int Length);
virtual void Mute(bool On);
virtual void Clear(void);
};
</pre></td></tr></table><p>
You should create your derived audio object in the
<a href="#Getting started"><tt>Start()</tt></a> function of your plugin.
Note that the object has to be created on the heap (using <tt>new</tt>),
and you shall not delete it at any point (it will be deleted automatically
when the program ends).
<p>
The <tt>Play()</tt> function will be offered complete audio PES packets
and has to accept each packet immediately. It must return as soon as possible,
in order to not delay the overall replay process. Therefore you may want to
also derive your class from <tt>cThread</tt> and run the actual audio processing
as a separate thread. Note that the offered data is only valid within the call
to <tt>Play()</tt>, so if you can't process the entire block immediately, you
will need to copy it for later processing in your thread.
<p>
The <tt>Mute()</tt> and <tt>Clear()</tt> functions will be called whenever the audio shall
be muted, or any buffered data shall be cleared, respectively.
<!--X1.1.15--></td></tr></table>
<hr><h2>Remote Control</h2>
<center><i><b>The joy of zapping!</b></i></center><p>
......@@ -1427,7 +1480,6 @@ Put(uint64 Code, bool Repeat = false, bool Release = false);
</pre></td></tr></table><p>
The other parameters have the same meaning as in the first version of this function.
<!--X1.1.11--></td></tr></table>
</body>
</html>
......@@ -30,3 +30,10 @@ VDR Plugin 'hello' Revision History
2002-10-26: Version 0.0.7
- Fixed a typo.
2002-11-01: Version 0.0.8
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
The NEWSTRUCT compile time switch is now obsolete. The required driver is now
the CVS HEAD version dated 2002-11-01 or later.
- Introduced Make.config.
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.5 2002/09/17 15:36:36 kls Exp $
# $Id: Makefile 1.7 2002/11/01 13:44:11 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
......@@ -13,19 +13,22 @@ PLUGIN = hello
VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
### The C++ compiler and options:
CXX = g++
CXXFLAGS = -O2 -Wall -Woverloaded-virtual
### The directory environment:
ifdef NEWSTRUCT
DVBDIR = ../../../../DVB/include
DEFINES += -DNEWSTRUCT
else
DVBDIR = ../../../../DVB/ost/include
endif
DVBDIR = ../../../../DVB
VDRDIR = ../../..
VDRINC = $(VDRDIR)/include
LIBDIR = ../../lib
TMPDIR = /tmp
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config
### 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')
......@@ -37,7 +40,7 @@ PACKAGE = vdr-$(ARCHIVE)
### Includes and Defines (add further entries here):
INCLUDES = -I$(VDRINC) -I$(DVBDIR)
INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
......@@ -45,11 +48,6 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
OBJS = $(PLUGIN).o i18n.o
### The C++ compiler and options:
CXX = g++
CXXFLAGS = -O2 -Wall -Woverloaded-virtual
### Implicit rules:
%.o: %.c
......
......@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: hello.c 1.8 2002/10/26 14:34:48 kls Exp $
* $Id: hello.c 1.9 2002/11/01 10:16:53 kls Exp $
*/
#include <getopt.h>
......@@ -12,7 +12,7 @@
#include <vdr/plugin.h>
#include "i18n.h"
static const char *VERSION = "0.0.7";
static const char *VERSION = "0.0.8";
static const char *DESCRIPTION = "A friendly greeting";
static const char *MAINMENUENTRY = "Hello";
......
......@@ -16,3 +16,10 @@ VDR Plugin 'status' Revision History
2002-10-26: Version 0.0.4
- Fixed a typo.
2002-11-01: Version 0.0.5
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
The NEWSTRUCT compile time switch is now obsolete. The required driver is now
the CVS HEAD version dated 2002-11-01 or later.
- Introduced Make.config.
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.3 2002/09/21 08:38:39 kls Exp $
# $Id: Makefile 1.5 2002/11/01 13:44:25 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
......@@ -13,19 +13,22 @@ PLUGIN = status
VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
### The C++ compiler and options:
CXX = g++
CXXFLAGS = -O2 -Wall -Woverloaded-virtual
### The directory environment:
ifdef NEWSTRUCT
DVBDIR = ../../../../DVB/include
DEFINES += -DNEWSTRUCT
else
DVBDIR = ../../../../DVB/ost/include
endif
DVBDIR = ../../../../DVB
VDRDIR = ../../..
VDRINC = $(VDRDIR)/include
LIBDIR = ../../lib
TMPDIR = /tmp
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config
### 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')
......@@ -37,7 +40,7 @@ PACKAGE = vdr-$(ARCHIVE)
### Includes and Defines (add further entries here):
INCLUDES = -I$(VDRINC) -I$(DVBDIR)
INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
......@@ -45,11 +48,6 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
OBJS = $(PLUGIN).o
### The C++ compiler and options:
CXX = g++
CXXFLAGS = -O2 -Wall -Woverloaded-virtual
### Implicit rules:
%.o: %.c
......
......@@ -3,13 +3,13 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: status.c 1.4 2002/10/26 14:34:53 kls Exp $
* $Id: status.c 1.5 2002/11/01 10:16:59 kls Exp $
*/
#include <vdr/plugin.h>
#include <vdr/status.h>
static const char *VERSION = "0.0.4";
static const char *VERSION = "0.0.5";
static const char *DESCRIPTION = "Status monitor test";
static const char *MAINMENUENTRY = NULL;
......
......@@ -4,8 +4,95 @@
* 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 $
* $Id: audio.c 1.2 2002/11/03 11:53:34 kls Exp $
*/
#include "audio.h"
#include "stdlib.h"
// --- cAudio ----------------------------------------------------------------
cAudio::cAudio(void)
{
Audios.Add(this);
}
cAudio::~cAudio()
{
}
// --- cAudios ---------------------------------------------------------------
cAudios Audios;
void cAudios::PlayAudio(const uchar *Data, int Length)
{
for (cAudio *audio = First(); audio; audio = Next(audio))
audio->Play(Data, Length);
}
void cAudios::MuteAudio(bool On)
{
for (cAudio *audio = First(); audio; audio = Next(audio))
audio->Mute(On);
}
void cAudios::ClearAudio(void)
{
for (cAudio *audio = First(); audio; audio = Next(audio))
audio->Clear();
}
// --- cExternalAudio --------------------------------------------------------
cExternalAudio::cExternalAudio(const char *Command)
{
command = strdup(Command);
mute = false;
}
cExternalAudio::~cExternalAudio()
{
free(command);
}
void cExternalAudio::Play(const uchar *Data, int Length)
{
if (command && !mute) {
if (pipe || pipe.Open(command, "w")) {
if (Data[0] == 0x00 && Data[1] == 0x00 && Data[2] == 0x01) {
if (Data[3] == 0xBD) { // dolby
//XXX??? int written = Data[8] + (skipAC3bytes ? 13 : 9); // skips the PES header
int written = Data[8] + 9; // skips the PES header
Length -= written;
while (Length > 0) {
int w = fwrite(Data + written, 1, Length, pipe);
if (w < 0) {
LOG_ERROR;
break;
}
Length -= w;
written += w;
}
}
}
}
else {
esyslog("ERROR: can't open pipe to audio command '%s'", command);
free(command);
command = NULL;
}
}
}
void cExternalAudio::Mute(bool On)
{
mute = On;
if (mute)
Clear();
}
void cExternalAudio::Clear(void)
{
pipe.Close();
}
......@@ -4,10 +4,52 @@
* 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 $
* $Id: audio.h 1.2 2002/11/03 11:50:02 kls Exp $
*/
#ifndef __AUDIO_H
#define __AUDIO_H
#include "thread.h"
#include "tools.h"
class cAudio : public cListObject {
protected:
cAudio(void);
public:
virtual ~cAudio();
virtual void Play(const uchar *Data, int Length) = 0;
// Plays the given block of audio Data. Must return as soon as possible.
// If the entire block of data can't be processed immediately, it must
// be copied and processed in a separate thread. The Data is always a
// complete PES audio packet.
virtual void Mute(bool On) = 0;
// Immediately sets the audio device to be silent (On==true) or to
// normal replay (On==false).
virtual void Clear(void) = 0;
// Clears all data that might still be awaiting processing.
};
class cAudios : public cList<cAudio> {
public:
void PlayAudio(const uchar *Data, int Length);
void MuteAudio(bool On);
void ClearAudio(void);
};
extern cAudios Audios;
class cExternalAudio : public cAudio {
private:
char *command;
cPipe pipe;
bool mute;
public:
cExternalAudio(const char *Command);
virtual ~cExternalAudio();
virtual void Play(const uchar *Data, int Length);
virtual void Mute(bool On);
virtual void Clear(void);
};
#endif //__AUDIO_H
......@@ -4,15 +4,11 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: channels.c 1.5 2002/10/20 11:50:47 kls Exp $
* $Id: channels.c 1.6 2002/11/01 10:26:45 kls Exp $
*/
#include "channels.h"
#ifdef NEWSTRUCT
#include <linux/dvb/frontend.h>
#else
#include <ost/frontend.h>
#endif
#include <ctype.h>
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
......@@ -32,9 +28,7 @@ const tChannelParameterMap BandwidthValues[] = {
{ 6, BANDWIDTH_6_MHZ },
{ 7, BANDWIDTH_7_MHZ },
{ 8, BANDWIDTH_8_MHZ },
#ifdef NEWSTRUCT
{ 999, BANDWIDTH_AUTO },
#endif
{ -1 }
};
......@@ -43,17 +37,11 @@ const tChannelParameterMap CoderateValues[] = {
{ 12, FEC_1_2 },
{ 23, FEC_2_3 },
{ 34, FEC_3_4 },
#ifdef NEWSTRUCT
{ 45, FEC_4_5 },
#endif
{ 56, FEC_5_6 },
#ifdef NEWSTRUCT
{ 67, FEC_6_7 },
#endif
{ 78, FEC_7_8 },
#ifdef NEWSTRUCT
{ 89, FEC_8_9 },
#endif
{ 999, FEC_AUTO },
{ -1 }
};
......@@ -65,18 +53,14 @@ const tChannelParameterMap ModulationValues[] = {
{ 64, QAM_64 },
{ 128, QAM_128 },
{ 256, QAM_256 },
#ifdef NEWSTRUCT
{ 999, QAM_AUTO },
#endif
{ -1 }
};
const tChannelParameterMap TransmissionValues[] = {
{ 2, TRANSMISSION_MODE_2K },
{ 8, TRANSMISSION_MODE_8K },
#ifdef NEWSTRUCT
{ 999, TRANSMISSION_MODE_AUTO },
#endif
{ -1 }
};
......@@ -85,9 +69,7 @@ const tChannelParameterMap GuardValues[] = {
{ 8, GUARD_INTERVAL_1_8 },
{ 16, GUARD_INTERVAL_1_16 },
{ 32, GUARD_INTERVAL_1_32 },
#ifdef NEWSTRUCT
{ 999, GUARD_INTERVAL_AUTO },
#endif
{ -1 }
};
......@@ -96,9 +78,7 @@ const tChannelParameterMap HierarchyValues[] = {
{ 1, HIERARCHY_1 },
{ 2, HIERARCHY_2 },
{ 4, HIERARCHY_4 },
#ifdef NEWSTRUCT
{ 999, HIERARCHY_AUTO },
#endif
{ -1 }
};
......@@ -160,16 +140,15 @@ cChannel::cChannel(void)
sid = 0;
number = 0;
groupSep = false;
//XXX
polarization = 'v';
inversion = INVERSION_AUTO;
bandwidth = BANDWIDTH_8_MHZ;
coderateH = FEC_AUTO;//XXX FEC_2_3
coderateL = FEC_1_2;//XXX
modulation = QAM_64;
transmission = TRANSMISSION_MODE_2K;
guard = GUARD_INTERVAL_1_32;
hierarchy = HIERARCHY_NONE;
bandwidth = BANDWIDTH_AUTO;
coderateH = FEC_AUTO;
coderateL = FEC_AUTO;
modulation = QAM_AUTO;
transmission = TRANSMISSION_MODE_AUTO;
guard = GUARD_INTERVAL_AUTO;
hierarchy = HIERARCHY_AUTO;
}
cChannel::cChannel(const cChannel *Channel)
......@@ -187,24 +166,20 @@ cChannel::cChannel(const cChannel *Channel)
ca = Channel ? Channel->ca : 0;
sid = Channel ? Channel->sid : 0;
groupSep = Channel ? Channel->groupSep : false;
//XXX
polarization = Channel ? Channel->polarization : 'v';
inversion = Channel ? Channel->inversion : INVERSION_AUTO;
bandwidth = Channel ? Channel->bandwidth : BANDWIDTH_8_MHZ;
coderateH = Channel ? Channel->coderateH : FEC_AUTO;//XXX FEC_2_3
coderateL = Channel ? Channel->coderateL : FEC_1_2;//XXX
modulation = Channel ? Channel->modulation : QAM_64;
transmission = Channel ? Channel->transmission : TRANSMISSION_MODE_2K;
guard = Channel ? Channel->guard : GUARD_INTERVAL_1_32;
hierarchy = Channel ? Channel->hierarchy : HIERARCHY_NONE;
bandwidth = Channel ? Channel->bandwidth : BANDWIDTH_AUTO;