| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef LIBDVDREAD_DVDREAD_INTERNAL_H |
| 20 |
#define LIBDVDREAD_DVDREAD_INTERNAL_H |
| 21 |
|
| 22 |
#include <stdint.h> |
| 23 |
#include <stddef.h> |
| 24 |
#include <sys/types.h> |
| 25 |
|
| 26 |
#ifdef _WIN32 |
| 27 |
# include <unistd.h> |
| 28 |
#endif |
| 29 |
|
| 30 |
#include "dvdread/dvd_reader.h" |
| 31 |
#include "dvdread/ifo_types.h" |
| 32 |
#include "logger.h" |
| 33 |
|
| 34 |
#define container_of(ptr, type, member) \ |
| 35 |
((type *)(((char *)(ptr)) - offsetof(type, member))) |
| 36 |
|
| 37 |
|
| 38 |
#define DVD_TYPE_STRING(type) ((type==DVD_V)? "VIDEO":"AUDIO") |
| 39 |
#define STREAM_TYPE_STRING(type) ((type==DVD_V)? 'V':'A') |
| 40 |
|
| 41 |
typedef enum{ |
| 42 |
DVD_V = 0, |
| 43 |
DVD_A = 1, |
| 44 |
DVD_VR = 2, |
| 45 |
} dvd_type_t; |
| 46 |
|
| 47 |
struct dvd_reader_s |
| 48 |
{ |
| 49 |
dvd_reader_device_t *rd; |
| 50 |
dvd_type_t dvd_type; |
| 51 |
void *priv; |
| 52 |
dvd_logger_cb logcb; |
| 53 |
dvd_reader_filesystem_h* fs; |
| 54 |
|
| 55 |
|
| 56 |
uint64_t ifoBUPflags[2]; |
| 57 |
}; |
| 58 |
|
| 59 |
struct ifo_handle_private_s |
| 60 |
{ |
| 61 |
ifo_handle_t handle; |
| 62 |
dvd_reader_t *ctx; |
| 63 |
dvd_file_t *file; |
| 64 |
}; |
| 65 |
|
| 66 |
enum TagIdentifier { |
| 67 |
|
| 68 |
PrimaryVolumeDescriptor = 1, |
| 69 |
AnchorVolumeDescriptorPointer = 2, |
| 70 |
VolumeDescriptorPointer = 3, |
| 71 |
ImplementationUseVolumeDescriptor = 4, |
| 72 |
PartitionDescriptor = 5, |
| 73 |
LogicalVolumeDescriptor = 6, |
| 74 |
UnallocatedSpaceDescriptor = 7, |
| 75 |
TerminatingDescriptor = 8, |
| 76 |
LogicalVolumeIntegrityDescriptor = 9, |
| 77 |
|
| 78 |
FileSetDescriptor = 256, |
| 79 |
FileIdentifierDescriptor = 257, |
| 80 |
AllocationExtentDescriptor = 258, |
| 81 |
IndirectEntry = 259, |
| 82 |
TerminalEntry = 260, |
| 83 |
FileEntry = 261, |
| 84 |
ExtendedAttributeHeaderDescriptor = 262, |
| 85 |
UnallocatedSpaceEntry = 263, |
| 86 |
SpaceBitmapDescriptor = 264, |
| 87 |
PartitionIntegrityEntry = 265, |
| 88 |
ExtendedFileEntry = 266, |
| 89 |
}; |
| 90 |
|
| 91 |
int InternalUDFReadBlocksRaw(const dvd_reader_t *, uint32_t lb_number, |
| 92 |
size_t block_count, unsigned char *data, int encrypted); |
| 93 |
|
| 94 |
void *GetUDFCacheHandle(dvd_reader_t *); |
| 95 |
void SetUDFCacheHandle(dvd_reader_t *, void *cache); |
| 96 |
void FreeUDFCache(void *cache); |
| 97 |
|
| 98 |
#endif |