summaryrefslogtreecommitdiffstats
path: root/libhb/dvd.h
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-04-27 15:18:05 +0000
committerjstebbins <[email protected]>2009-04-27 15:18:05 +0000
commit6b9c017e63f06e9a7b66062d0a8cb460a02ca6b6 (patch)
tree13479caa23219b5476a4d1e534a970cd6fce29fd /libhb/dvd.h
parent3bb12e29d03f62a303c7728cd6f40c6498f2858e (diff)
add libdvdnav support
emulates the vm of a dvd player in order to navigate the disc more reliably it is optional and disabled by default CLI option '--dvdnav' enables. GUI's have a new option in preferences. When dvdnav is enabled, you can also select angles (cli '--angle') git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2355 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/dvd.h')
-rw-r--r--libhb/dvd.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/libhb/dvd.h b/libhb/dvd.h
new file mode 100644
index 000000000..8f89a82cc
--- /dev/null
+++ b/libhb/dvd.h
@@ -0,0 +1,88 @@
+/* $Id: dvd.h,v 1.1 2004/08/02 07:19:05 stebbins Exp $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+#ifndef HB_DVD_H
+#define HB_DVD_H
+
+#include "dvdnav/dvdnav.h"
+#include "dvdread/ifo_read.h"
+#include "dvdread/nav_read.h"
+
+struct hb_dvdread_s
+{
+ char * path;
+
+ dvd_reader_t * reader;
+ ifo_handle_t * vmg;
+
+ int vts;
+ int ttn;
+ ifo_handle_t * ifo;
+ dvd_file_t * file;
+
+ pgc_t * pgc;
+ int cell_start;
+ int cell_end;
+ int title_start;
+ int title_end;
+ int title_block_count;
+ int cell_cur;
+ int cell_next;
+ int cell_overlap;
+ int block;
+ int pack_len;
+ int next_vobu;
+ int in_cell;
+ int in_sync;
+ uint16_t cur_vob_id;
+ uint8_t cur_cell_id;
+};
+
+struct hb_dvdnav_s
+{
+ char * path;
+
+ dvdnav_t * dvdnav;
+ dvd_reader_t * reader;
+ ifo_handle_t * vmg;
+ int title;
+ int title_block_count;
+ int chapter;
+};
+
+typedef struct hb_dvdnav_s hb_dvdnav_t;
+typedef struct hb_dvdread_s hb_dvdread_t;
+
+union hb_dvd_s
+{
+ hb_dvdread_t dvdread;
+ hb_dvdnav_t dvdnav;
+};
+
+
+struct hb_dvd_func_s
+{
+ hb_dvd_t * (* init) ( char * );
+ void (* close) ( hb_dvd_t ** );
+ char * (* name) ( char * );
+ int (* title_count) ( hb_dvd_t * );
+ hb_title_t * (* title_scan) ( hb_dvd_t *, int );
+ int (* start) ( hb_dvd_t *, int, int );
+ void (* stop) ( hb_dvd_t * );
+ int (* seek) ( hb_dvd_t *, float );
+ int (* read) ( hb_dvd_t *, hb_buffer_t * );
+ int (* chapter) ( hb_dvd_t * );
+ int (* angle_count) ( hb_dvd_t * );
+ void (* set_angle) ( hb_dvd_t *, int );
+};
+typedef struct hb_dvd_func_s hb_dvd_func_t;
+
+hb_dvd_func_t * hb_dvdnav_methods( void );
+hb_dvd_func_t * hb_dvdread_methods( void );
+
+#endif // HB_DVD_H
+
+