vdr  1.7.27
audio.h
Go to the documentation of this file.
00001 /*
00002  * audio.h: The basic audio interface
00003  *
00004  * See the main source file 'vdr.c' for copyright information and
00005  * how to reach the author.
00006  *
00007  * $Id: audio.h 2.1 2008/07/06 11:39:21 kls Exp $
00008  */
00009 
00010 #ifndef __AUDIO_H
00011 #define __AUDIO_H
00012 
00013 #include "thread.h"
00014 #include "tools.h"
00015 
00016 class cAudio : public cListObject {
00017 protected:
00018   cAudio(void);
00019 public:
00020   virtual ~cAudio();
00021   virtual void Play(const uchar *Data, int Length, uchar Id) = 0;
00027   virtual void PlayTs(const uchar *Data, int Length) = 0;
00032   virtual void Mute(bool On) = 0;
00035   virtual void Clear(void) = 0;
00037   };
00038 
00039 class cAudios : public cList<cAudio> {
00040 public:
00041   void PlayAudio(const uchar *Data, int Length, uchar Id);
00042   void PlayTsAudio(const uchar *Data, int Length);
00043   void MuteAudio(bool On);
00044   void ClearAudio(void);
00045   };
00046 
00047 extern cAudios Audios;
00048 
00049 class cExternalAudio : public cAudio {
00050 private:
00051   char *command;
00052   cPipe pipe;
00053   bool mute;
00054 public:
00055   cExternalAudio(const char *Command);
00056   virtual ~cExternalAudio();
00057   virtual void Play(const uchar *Data, int Length, uchar Id);
00058   virtual void PlayTs(const uchar *Data, int Length);
00059   virtual void Mute(bool On);
00060   virtual void Clear(void);
00061   };
00062 
00063 #endif //__AUDIO_H