Mercurial > libdvdread4.hg
comparison dvdread/ifo_types.h @ 75:8e12b8e01713 src
Accommodate duplicate language units and pgcs.
Many dvd's are showing up that have titles that have numerous repeated
language unit tables and pgc's. The new release "Up" is an example. I
believe "Dark Knight" also exhibits this. When scanning such discs
with lsdvd (and other programs that scan all titles), libdvdread will
consume many GB of data for these repeated elements and gets very slow
(e.g hours to read all titles) on OS X due to reading the duplicate
data from uncached raw devices.
This patch detects duplicates and reference counts pgc's and pgcit's.
When a duplicate is detected, a reference count is incremented instead
of allocating new memory and re-reading the data.
Patch by John Stebbins.
author | rathann |
---|---|
date | Sun, 09 Dec 2012 21:07:59 +0000 |
parents | 70c34d162e6e |
children |
comparison
equal
deleted
inserted
replaced
74:133be2fe0eef | 75:8e12b8e01713 |
---|---|
299 uint16_t cell_position_offset; | 299 uint16_t cell_position_offset; |
300 pgc_command_tbl_t *command_tbl; | 300 pgc_command_tbl_t *command_tbl; |
301 pgc_program_map_t *program_map; | 301 pgc_program_map_t *program_map; |
302 cell_playback_t *cell_playback; | 302 cell_playback_t *cell_playback; |
303 cell_position_t *cell_position; | 303 cell_position_t *cell_position; |
304 int ref_count; | |
304 } ATTRIBUTE_PACKED pgc_t; | 305 } ATTRIBUTE_PACKED pgc_t; |
305 #define PGC_SIZE 236U | 306 #define PGC_SIZE 236U |
306 | 307 |
307 /** | 308 /** |
308 * Program Chain Information Search Pointer. | 309 * Program Chain Information Search Pointer. |
324 typedef struct { | 325 typedef struct { |
325 uint16_t nr_of_pgci_srp; | 326 uint16_t nr_of_pgci_srp; |
326 uint16_t zero_1; | 327 uint16_t zero_1; |
327 uint32_t last_byte; | 328 uint32_t last_byte; |
328 pgci_srp_t *pgci_srp; | 329 pgci_srp_t *pgci_srp; |
330 int ref_count; | |
329 } ATTRIBUTE_PACKED pgcit_t; | 331 } ATTRIBUTE_PACKED pgcit_t; |
330 #define PGCIT_SIZE 8U | 332 #define PGCIT_SIZE 8U |
331 | 333 |
332 /** | 334 /** |
333 * Menu PGCI Language Unit. | 335 * Menu PGCI Language Unit. |