[DVDnav-discuss] r1188 - in trunk/libdvdread/src: dvd_reader.c dvdread/dvd_reader.h

erik subversion at mplayerhq.hu
Mon Dec 7 04:50:21 CET 2009


Author: erik
Date: Mon Dec  7 04:50:20 2009
New Revision: 1188

Log:
Expose the dvd_stat_t struct.

The commits that brought in the DVDFileStat() function from libdvdread
0.9.7 incorrectly made the stat struct opaque. This can't be done because
the API does not use any allocation or deallocation code. So callers of
DVDFileStat cannot declare stat structs. Since we are attempting to
maintain the API compatibility w/ those releases of libdvdread, the
struct has been brought into the header. Thanks again to Rathann for
bringing this issue to the dvdnav list. And thanks to the original
bug reportera(O. Rolland) to fedora.

Modified:
   trunk/libdvdread/src/dvd_reader.c
   trunk/libdvdread/src/dvdread/dvd_reader.h

Modified: trunk/libdvdread/src/dvd_reader.c
==============================================================================
--- trunk/libdvdread/src/dvd_reader.c	Sat Nov 14 22:03:35 2009	(r1187)
+++ trunk/libdvdread/src/dvd_reader.c	Mon Dec  7 04:50:20 2009	(r1188)
@@ -111,12 +111,6 @@ struct dvd_file_s {
   ssize_t filesize;
 };
 
-struct dvd_stat_s {
-  off_t size;          /**< Total size of file in bytes */
-  int nr_parts;        /**< Number of file parts */
-  off_t parts_size[9]; /**< Size of each part in bytes */
-};
-
 int UDFReadBlocksRaw( dvd_reader_t *device, uint32_t lb_number,
                       size_t block_count, unsigned char *data,
                       int encrypted );

Modified: trunk/libdvdread/src/dvdread/dvd_reader.h
==============================================================================
--- trunk/libdvdread/src/dvdread/dvd_reader.h	Sat Nov 14 22:03:35 2009	(r1187)
+++ trunk/libdvdread/src/dvdread/dvd_reader.h	Mon Dec  7 04:50:20 2009	(r1188)
@@ -70,9 +70,13 @@ typedef struct dvd_reader_s dvd_reader_t
 typedef struct dvd_file_s dvd_file_t;
 
 /**
- * Opaque type that is used to provide statistics on a handle.
+ * Public type that is used to provide statistics on a handle.
  */
-typedef struct dvd_stat_s dvd_stat_t;
+typedef struct {
+  off_t size;          /**< Total size of file in bytes */
+  int nr_parts;        /**< Number of file parts */
+  off_t parts_size[9]; /**< Size of each part in bytes */
+} dvd_stat_t;
 
 /**
  * Opens a block device of a DVD-ROM file, or an image file, or a directory


More information about the DVDnav-discuss mailing list