diff dvdread/dvd_reader.h @ 44:92b4694792da src

Add DVD file stat from version 0.9.7 to libdvdread A new function to do an informational read of the DVD file handle was introduced to libdvdread 0.9.7 (or was it .6). Since libdvdread at mplayerhq imported an older version of dvdread/dvdnav this part of the API was not available. This commit places that function into the library making this library complete in reference to 0.9.7.
author erik
date Wed, 02 Sep 2009 01:43:21 +0000
parents c743d79f187b
children 4f40782ab5fc
line wrap: on
line diff
--- a/dvdread/dvd_reader.h	Wed Sep 02 01:43:18 2009 +0000
+++ b/dvdread/dvd_reader.h	Wed Sep 02 01:43:21 2009 +0000
@@ -70,6 +70,11 @@
 typedef struct dvd_file_s dvd_file_t;
 
 /**
+ * Opaque type that is used to provide statistics on a handle.
+ */
+typedef struct dvd_stat_s dvd_stat_t;
+
+/**
  * Opens a block device of a DVD-ROM file, or an image file, or a directory
  * name for a mounted DVD or HD copy of a DVD.
  *
@@ -117,6 +122,33 @@
 } dvd_read_domain_t;
 
 /**
+ * Stats a file on the DVD given the title number and domain.
+ * The information about the file is stored in a dvd_stat_t
+ * which contains information about the size of the file and
+ * the number of parts in case of a multipart file and the respective
+ * sizes of the parts.
+ * A multipart file is for instance VTS_02_1.VOB, VTS_02_2.VOB, VTS_02_3.VOB
+ * The size of VTS_02_1.VOB will be stored in stat->parts_size[0],
+ * VTS_02_2.VOB in stat->parts_size[1], ...
+ * The total size (sum of all parts) is stored in stat->size and
+ * stat->nr_parts will hold the number of parts.
+ * Only DVD_READ_TITLE_VOBS (VTS_??_[1-9].VOB) can be multipart files.
+ *
+ * This function is only of use if you want to get the size of each file
+ * in the filesystem. These sizes are not needed to use any other
+ * functions in libdvdread.
+ *
+ * @param dvd  A dvd read handle.
+ * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
+ * @param domain Which domain.
+ * @param stat Pointer to where the result is stored.
+ * @return If successful 0, otherwise -1.
+ *
+ * int DVDFileStat(dvd, titlenum, domain, stat);
+ */
+int DVDFileStat(dvd_reader_t *, int, dvd_read_domain_t, dvd_stat_t *);
+
+/**
  * Opens a file on the DVD given the title number and domain.
  *
  * If the title number is 0, the video manager information is opened