summaryrefslogtreecommitdiff
path: root/audio.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-11-03 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-11-03 18:00:00 +0100
commit1a8a081629b736572a8f6489428975cf54448e67 (patch)
tree89e4a13947bfd3cfd8ee4c0fd9fad9ffbe29497f /audio.h
parent57bd7eeed1c1aa84316f8299e1528b3bc63d7623 (diff)
downloadvdr-patch-lnbsharing-1a8a081629b736572a8f6489428975cf54448e67.tar.gz
vdr-patch-lnbsharing-1a8a081629b736572a8f6489428975cf54448e67.tar.bz2
Version 1.1.15vdr-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.
Diffstat (limited to 'audio.h')
-rw-r--r--audio.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/audio.h b/audio.h
index 545a0af..565bd97 100644
--- a/audio.h
+++ b/audio.h
@@ -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