summaryrefslogtreecommitdiffstats
path: root/dvdread/dvd_reader.h
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-15 11:47:22 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-15 11:47:22 +0000
commit80dee3f8ac591919a1f78724d31049f5b4472f42 (patch)
tree03c83643049579a36c79840a2a2b0ab01f20da91 /dvdread/dvd_reader.h
parent5d9b793edd1a692816c3c7a8d4dd8549f18fd1af (diff)
downloadmpv-80dee3f8ac591919a1f78724d31049f5b4472f42.tar.bz2
mpv-80dee3f8ac591919a1f78724d31049f5b4472f42.tar.xz
Sync libdvdread with version 0.9.5 (functional changes).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24067 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dvdread/dvd_reader.h')
-rw-r--r--dvdread/dvd_reader.h44
1 files changed, 42 insertions, 2 deletions
diff --git a/dvdread/dvd_reader.h b/dvdread/dvd_reader.h
index cc4ba54895..25b0370279 100644
--- a/dvdread/dvd_reader.h
+++ b/dvdread/dvd_reader.h
@@ -31,9 +31,14 @@
*/
/**
- * The current version.
+ * The current version. (0.9.4 => 904, 1.2.3 => 10203)
*/
-#define DVDREAD_VERSION 904
+#define DVDREAD_VERSION 905
+
+/**
+ * Returns the compiled version. (DVDREAD_VERSION as an int)
+ */
+int DVDVersion(void);
/**
* The length of one Logical Block of a DVD.
@@ -80,6 +85,10 @@ typedef struct dvd_file_s dvd_file_t;
* @return If successful a a read handle is returned. Otherwise 0 is returned.
*
* dvd = DVDOpen(path);
+ *
+ * Threads: this function uses chdir() and getcwd().
+ * The current working directory is global to all threads,
+ * so using chdir/getcwd in another thread could give unexpected results.
*/
dvd_reader_t *DVDOpen( const char * );
@@ -95,6 +104,35 @@ dvd_reader_t *DVDOpen( const char * );
void DVDClose( dvd_reader_t * );
/**
+ * Initializes libdvdread to be used with multithreading apps.
+ *
+ * You must call this function before using any other functions of libdvdread
+ * if you are going to use libdvdread in multiple threads in your program.
+ * If you are not using threads, or using libdvdread from just one thread,
+ * you do not need to call this, but you are allowed to do so anyway.
+ *
+ * There are several restrictions on how you can use libdvdread in
+ * multithreading apps, see further documentation.
+ *
+ * If you have called DVDFinish() you need to call DVDInit again to use
+ * libdvdread in multiple threads.
+ *
+ * DVDInit(void);
+ */
+void DVDInit(void);
+
+/**
+ * frees any dlopened objects.
+ *
+ * You must DVDClose all handles opened with DVDOpen before calling this.
+ * Use this function if you need to close the dlopened libs and any other
+ * objects that have been dynamically allocated by libdvdread.
+ *
+ * DVDFinish(void);
+ */
+void DVDFinish(void);
+
+/**
*
*/
typedef enum {
@@ -141,6 +179,8 @@ void DVDCloseFile( dvd_file_t * );
* @param offset Block offset from the start of the file to start reading at.
* @param block_count Number of block to read.
* @param data Pointer to a buffer to write the data into.
+ * It must be aligned to the logical block size of the device when
+ * reading from a raw/O_DIRECT device (2048 bytes for DVD)
* @return Returns number of blocks read on success, -1 on error.
*
* blocks_read = DVDReadBlocks(dvd_file, offset, block_count, data);