annotate unrar_exec.h @ 27427:a54c51af6595

demux_lavf: fix mp_seek behavior in case of seeking error When trying to seek past the end of file, the ByteIOContext expect that the stream is left in the same state as it was before the tentative seek. stream_seek() does not meet this expectation. It changes current position when seeking past the end of file. Thus, it is necessary to reset the stream to its previous state after a seek failure.
author aurel
date Wed, 13 Aug 2008 00:01:31 +0000
parents 0f42fb42843c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25361
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
1 /*
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
2 * List files and extract file from rars by using external executable unrar.
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
3 *
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
4 * Copyright (C) 2005 Jindrich Makovicka <makovick gmail com>
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
5 * Copyright (C) 2007 Ulion <ulion2002 gmail com>
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
6 *
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
7 * This file is part of MPlayer.
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
8 *
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
9 * MPlayer is free software; you can redistribute it and/or modify
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
12 * (at your option) any later version.
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
13 *
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
14 * MPlayer is distributed in the hope that it will be useful,
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
17 * GNU General Public License for more details.
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
18 *
26743
0f42fb42843c Use standard license headers with standard formatting.
diego
parents: 26029
diff changeset
19 * You should have received a copy of the GNU General Public License along
0f42fb42843c Use standard license headers with standard formatting.
diego
parents: 26029
diff changeset
20 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
0f42fb42843c Use standard license headers with standard formatting.
diego
parents: 26029
diff changeset
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25361
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
22 */
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
23
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25440
diff changeset
24 #ifndef MPLAYER_UNRAR_EXEC_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25440
diff changeset
25 #define MPLAYER_UNRAR_EXEC_H
25361
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
26
25440
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
27 struct RAR_archive_entry
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
28 {
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
29 char *Name;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
30 unsigned long PackSize;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
31 unsigned long UnpSize;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
32 unsigned long FileCRC;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
33 unsigned long FileTime;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
34 unsigned char UnpVer;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
35 unsigned char Method;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
36 unsigned long FileAttr;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
37 };
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
38
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
39 typedef struct archivelist
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
40 {
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
41 struct RAR_archive_entry item;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
42 struct archivelist *next;
ae7399c268fe Remove internal unrarlib copy, the new unrarexec code is a strict superset.
diego
parents: 25361
diff changeset
43 } ArchiveList_struct;
25361
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
44
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
45 extern char* unrar_executable;
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
46
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
47 int unrar_exec_get(unsigned char **output, unsigned long *size,
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
48 const char *filename, const char *rarfile);
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
49
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
50 int unrar_exec_list(const char *rarfile, ArchiveList_struct **list);
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
51
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
52 void unrar_exec_freelist(ArchiveList_struct *list);
f95cd1391ea0 Support using unrar executable to access rar-compressed vobsub files.
ulion
parents:
diff changeset
53
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25440
diff changeset
54 #endif /* MPLAYER_UNRAR_EXEC_H */