Mercurial > libdvdnav.hg
annotate dvdnav_internal.h @ 212:6b67914ae021 src
port Daniel's changes to xine-lib cvs to minimize difference
author | mroi |
---|---|
date | Wed, 27 Aug 2003 13:54:19 +0000 |
parents | 534f17c79e4a |
children | eb503714e1c2 |
rev | line source |
---|---|
201
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
1 /* |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
2 * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
3 * |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
4 * This file is part of libdvdnav, a DVD navigation library. |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
5 * |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
6 * libdvdnav is free software; you can redistribute it and/or modify |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
8 * the Free Software Foundation; either version 2 of the License, or |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
9 * (at your option) any later version. |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
10 * |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
11 * libdvdnav is distributed in the hope that it will be useful, |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
14 * GNU General Public License for more details. |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
15 * |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
17 * along with this program; if not, write to the Free Software |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
19 * |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
20 * $Id$ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
21 * |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
22 */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
23 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
24 #ifndef DVDNAV_INTERNAL_H_INCLUDED |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
25 #define DVDNAV_INTERNAL_H_INCLUDED |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
26 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
27 #ifdef HAVE_CONFIG_H |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
28 #include "config.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
29 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
30 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
31 #include <stdlib.h> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
32 #include <stdio.h> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
33 #include <unistd.h> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
34 #include <limits.h> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
35 #include <string.h> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
36 #include <pthread.h> |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
37 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
38 #include "dvd_reader.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
39 #include "ifo_read.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
40 #include "ifo_types.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
41 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
42 /* Uncomment for VM command tracing */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
43 /* #define TRACE */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
44 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
45 #include "decoder.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
46 #include "dvdnav.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
47 #include "vm.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
48 #include "vmcmd.h" |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
49 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
50 /* where should libdvdnav write its messages (stdout/stderr) */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
51 #define MSG_OUT stdout |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
52 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
53 /* Maximum length of an error string */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
54 #define MAX_ERR_LEN 255 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
55 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
56 /* Use the POSIX PATH_MAX if available */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
57 #ifdef PATH_MAX |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
58 #define MAX_PATH_LEN PATH_MAX |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
59 #else |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
60 #define MAX_PATH_LEN 255 /* Arbitrary */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
61 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
62 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
63 #ifndef DVD_VIDEO_LB_LEN |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
64 #define DVD_VIDEO_LB_LEN 2048 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
65 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
66 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
67 typedef struct read_cache_s read_cache_t; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
68 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
69 /* |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
70 * These are defined here because they are |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
71 * not in ifo_types.h, they maybe one day |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
72 */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
73 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
74 #ifndef audio_status_t |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
75 typedef struct { |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
76 #ifdef WORDS_BIGENDIAN |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
77 unsigned int available : 1; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
78 unsigned int zero1 : 4; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
79 unsigned int stream_number : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
80 uint8_t zero2; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
81 #else |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
82 uint8_t zero2; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
83 unsigned int stream_number : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
84 unsigned int zero1 : 4; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
85 unsigned int available : 1; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
86 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
87 } ATTRIBUTE_PACKED audio_status_t; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
88 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
89 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
90 #ifndef spu_status_t |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
91 typedef struct { |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
92 #ifdef WORDS_BIGENDIAN |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
93 unsigned int available : 1; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
94 unsigned int zero1 : 2; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
95 unsigned int stream_number_4_3 : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
96 unsigned int zero2 : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
97 unsigned int stream_number_wide : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
98 unsigned int zero3 : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
99 unsigned int stream_number_letterbox : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
100 unsigned int zero4 : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
101 unsigned int stream_number_pan_scan : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
102 #else |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
103 unsigned int stream_number_pan_scan : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
104 unsigned int zero4 : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
105 unsigned int stream_number_letterbox : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
106 unsigned int zero3 : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
107 unsigned int stream_number_wide : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
108 unsigned int zero2 : 3; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
109 unsigned int stream_number_4_3 : 5; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
110 unsigned int zero1 : 2; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
111 unsigned int available : 1; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
112 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
113 } ATTRIBUTE_PACKED spu_status_t; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
114 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
115 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
116 typedef struct dvdnav_vobu_s { |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
117 int32_t vobu_start; /* Logical Absolute. MAX needed is 0x300000 */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
118 int32_t vobu_length; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
119 int32_t blockN; /* Relative offset */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
120 int32_t vobu_next; /* Relative offset */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
121 } dvdnav_vobu_t; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
122 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
123 /** The main DVDNAV type **/ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
124 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
125 struct dvdnav_s { |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
126 /* General data */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
127 char path[MAX_PATH_LEN]; /* Path to DVD device/dir */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
128 dvd_file_t *file; /* Currently opened file */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
129 int open_vtsN; /* The domain and number of the... */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
130 int open_domain; /* ..currently opened VOB */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
131 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
132 /* Position data */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
133 vm_position_t position_next; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
134 vm_position_t position_current; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
135 dvdnav_vobu_t vobu; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
136 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
137 /* NAV data */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
138 pci_t pci; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
139 dsi_t dsi; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
140 uint32_t last_cmd_nav_lbn; /* detects when a command is issued on an already left NAV */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
141 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
142 /* Flags */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
143 int skip_still; /* Set when skipping a still */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
144 int sync_wait; /* applications should wait till they are in sync with us */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
145 int sync_wait_skip; /* Set when skipping wait state */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
146 int spu_clut_changed; /* The SPU CLUT changed */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
147 int started; /* vm_start has been called? */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
148 int use_read_ahead; /* 1 - use read-ahead cache, 0 - don't */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
149 int pgc_based; /* positioning works PGC based instead of PG based */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
150 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
151 /* VM */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
152 vm_t *vm; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
153 pthread_mutex_t vm_lock; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
154 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
155 /* Read-ahead cache */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
156 read_cache_t *cache; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
157 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
158 /* Errors */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
159 char err_str[MAX_ERR_LEN]; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
160 }; |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
161 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
162 /** USEFUL MACROS **/ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
163 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
164 #ifdef __GNUC__ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
165 #define printerrf(format, args...) snprintf(this->err_str, MAX_ERR_LEN, format, ## args); |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
166 #else |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
167 #ifdef _MSC_VER |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
168 #define printerrf(str) snprintf(this->err_str, MAX_ERR_LEN, str); |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
169 #else |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
170 #define printerrf(...) snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__); |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
171 #endif /* WIN32 */ |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
172 #endif |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
173 #define printerr(str) strncpy(this->err_str, str, MAX_ERR_LEN); |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
174 |
534f17c79e4a
dvdnav_internal.h is an internal header, only used at compile time;
mroi
parents:
diff
changeset
|
175 #endif /* DVDNAV_INTERNAL_H_INCLUDED */ |