summaryrefslogtreecommitdiff
path: root/dvd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-11-10 13:41:22 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-11-10 13:41:22 +0100
commitf131c8c79dfe9a36a5e332f5c27f5685028ccbc3 (patch)
tree18d0b5e88706f884831bd8af93005cb44af08d58 /dvd.c
parent8d7c343a927f7be87f85cdaae4a2c13db085d67e (diff)
downloadvdr-f131c8c79dfe9a36a5e332f5c27f5685028ccbc3.tar.gz
vdr-f131c8c79dfe9a36a5e332f5c27f5685028ccbc3.tar.bz2
Added MPEG audio support for DVD
Diffstat (limited to 'dvd.c')
-rw-r--r--dvd.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/dvd.c b/dvd.c
index 841e998b..e061b141 100644
--- a/dvd.c
+++ b/dvd.c
@@ -6,7 +6,7 @@
*
* Initially written by Andreas Schultz <aschultz@warp10.net>
*
- * $Id: dvd.c 1.3 2001/08/06 16:07:44 kls Exp $
+ * $Id: dvd.c 1.4 2001/11/10 13:38:50 kls Exp $
*/
#ifdef DVDSUPPORT
@@ -21,6 +21,7 @@
#include <unistd.h>
#include "dvd.h"
+#include "tools.h"
// --- cDVD ----------------------------------------------------------------------------
@@ -145,4 +146,24 @@ dvd_file_t *cDVD::openTitle(int Title, dvd_read_domain_t domain)
return title;
}
+int cDVD::getAudioTrack(int stream)
+{
+ if (getVTS()) {
+ switch (getVTS()->vtsi_mat->vts_audio_attr[stream].audio_format) {
+ case 0: // ac3
+ return aAC3;
+ case 2: // mpeg1
+ case 3: // mpeg2ext
+ return aMPEG;
+ case 4: // lpcm
+ return aLPCM;
+ case 6: // dts
+ return aDTS;
+ default:
+ esyslog(LOG_ERR, "ERROR: unknown Audio stream info");
+ }
+ }
+ return 0;
+}
+
#endif //DVDSUPPORT