1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00
vdr/dvd.h

63 lines
1.6 KiB
C
Raw Permalink Normal View History

2001-08-03 14:18:08 +02:00
/*
* dvd.h: Functions for handling DVDs
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* Initially written by Andreas Schultz <aschultz@warp10.net>
*
2001-11-10 13:41:22 +01:00
* $Id: dvd.h 1.4 2001/11/10 13:38:25 kls Exp $
2001-08-03 14:18:08 +02:00
*/
#ifndef __DVD_H
#define __DVD_H
2001-08-06 16:19:20 +02:00
#ifdef DVDSUPPORT
2001-08-03 14:18:08 +02:00
#include <dvdread/dvd_reader.h>
#include <dvdread/ifo_types.h>
#include <dvdread/ifo_read.h>
#include <dvdread/dvd_udf.h>
#include <dvdread/nav_read.h>
#include <dvdread/nav_print.h>
2001-11-10 13:41:22 +01:00
#define aAC3 0x80
#define aDTS 0x88
#define aLPCM 0xA0
#define aMPEG 0xC0
2001-08-03 14:18:08 +02:00
class cDVD {
private:
static cDVD *dvdInstance;
static const char *deviceName;
dvd_reader_t *dvd;
dvd_file_t *title;
ifo_handle_t *vmg_file;
ifo_handle_t *vts_file;
int titleset;
2001-08-05 15:11:35 +02:00
static int Command(int Cmd);
2001-08-03 14:18:08 +02:00
public:
cDVD(void);
~cDVD();
2001-08-05 15:11:35 +02:00
static void SetDeviceName(const char *DeviceName);
static const char *DeviceName(void);
static bool DriveExists(void);
static bool DiscOk(void);
static void Eject(void);
2001-08-03 14:18:08 +02:00
void Open(void);
void Close(void);
bool isValid(void) { return (dvd != NULL); }
ifo_handle_t *openVMG(void);
ifo_handle_t *openVTS(int TitleSet);
2001-11-10 13:41:22 +01:00
ifo_handle_t *getVTS() { return vts_file; }
2001-08-03 14:18:08 +02:00
dvd_file_t *openTitle(int Title, dvd_read_domain_t domain);
static cDVD *getDVD(void);
2001-11-10 13:41:22 +01:00
int getAudioNrOfTracks() { return getVTS() ? getVTS()->vtsi_mat->nr_of_vts_audio_streams : 0; }
int getAudioLanguage(int stream) { return getVTS() ? getVTS()->vtsi_mat->vts_audio_attr[stream].lang_code : 0; }
int getAudioTrack(int stream);
2001-08-03 14:18:08 +02:00
};
2001-08-06 16:19:20 +02:00
#endif //DVDSUPPORT
2001-08-03 14:18:08 +02:00
#endif //__DVD_H