annotate dvdnav_internal.h.in @ 192:a3d7b149cc0f src

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