OSDN Git Service

gitattirubes test 2
[handbrake-jp/handbrake-jp.git] / libhb / dvd.h
1 /* $Id: dvd.h,v 1.1 2004/08/02 07:19:05 stebbins Exp $
2
3    This file is part of the HandBrake source code.
4    Homepage: <http://handbrake.fr/>.
5    It may be used under the terms of the GNU General Public License. */
6
7 #ifndef HB_DVD_H
8 #define HB_DVD_H
9
10 #include "dvdnav/dvdnav.h"
11 #include "dvdread/ifo_read.h"
12 #include "dvdread/nav_read.h"
13
14 struct hb_dvdread_s
15 {
16     char         * path;
17
18     dvd_reader_t * reader;
19     ifo_handle_t * vmg;
20
21     int            vts;
22     int            ttn;
23     ifo_handle_t * ifo;
24     dvd_file_t   * file;
25
26     pgc_t        * pgc;
27     int            cell_start;
28     int            cell_end;
29     int            title_start;
30     int            title_end;
31     int            title_block_count;
32     int            cell_cur;
33     int            cell_next;
34     int            cell_overlap;
35     int            block;
36     int            pack_len;
37     int            next_vobu;
38     int            in_cell;
39     int            in_sync;
40     uint16_t       cur_vob_id;
41     uint8_t        cur_cell_id;
42 };
43
44 struct hb_dvdnav_s
45 {
46     char         * path;
47
48     dvdnav_t     * dvdnav;
49     dvd_reader_t * reader;
50     ifo_handle_t * vmg;
51     int            title;
52     int            title_block_count;
53     int            chapter;
54     hb_list_t    * list_chapter;
55     int            stopped;
56 };
57
58 typedef struct hb_dvdnav_s hb_dvdnav_t;
59 typedef struct hb_dvdread_s hb_dvdread_t;
60
61 union hb_dvd_s
62 {
63     hb_dvdread_t dvdread;
64     hb_dvdnav_t  dvdnav;
65 };
66
67
68 struct hb_dvd_func_s
69 {
70     hb_dvd_t *    (* init)        ( char * );
71     void          (* close)       ( hb_dvd_t ** );
72     char        * (* name)        ( char * );
73     int           (* title_count) ( hb_dvd_t * );
74     hb_title_t  * (* title_scan)  ( hb_dvd_t *, int );
75     int           (* start)       ( hb_dvd_t *, hb_title_t *, int );
76     void          (* stop)        ( hb_dvd_t * );
77     int           (* seek)        ( hb_dvd_t *, float );
78     int           (* read)        ( hb_dvd_t *, hb_buffer_t * );
79     int           (* chapter)     ( hb_dvd_t * );
80     int           (* angle_count) ( hb_dvd_t * );
81     void          (* set_angle)   ( hb_dvd_t *, int );
82 };
83 typedef struct hb_dvd_func_s hb_dvd_func_t;
84
85 hb_dvd_func_t * hb_dvdnav_methods( void );
86 hb_dvd_func_t * hb_dvdread_methods( void );
87
88 #endif // HB_DVD_H
89
90