summaryrefslogtreecommitdiff
path: root/dvd.h
blob: 68fc1d38ffa4941b9146e0d1aaa700c5cfeb0225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * 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>
 *
 * $Id: dvd.h 1.3 2001/08/05 16:00:57 kls Exp $
 */

#ifndef __DVD_H
#define __DVD_H

#ifdef DVDSUPPORT

#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>

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;
  static int Command(int Cmd);
public:
  cDVD(void);
  ~cDVD();
  static void SetDeviceName(const char *DeviceName);
  static const char *DeviceName(void);
  static bool DriveExists(void);
  static bool DiscOk(void);
  static void Eject(void);
  void Open(void);
  void Close(void);
  bool isValid(void) { return (dvd != NULL); }
  ifo_handle_t *openVMG(void);
  ifo_handle_t *openVTS(int TitleSet);
  dvd_file_t *openTitle(int Title, dvd_read_domain_t domain);
  static cDVD *getDVD(void);
  };

#endif //DVDSUPPORT

#endif //__DVD_H