[libdvdcss-devel] Replace DVD access method #defines by an enum.

Diego Biurrun git at videolan.org
Sat Nov 1 18:11:50 CET 2014


libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Oct 31 19:37:27 2014 +0100| [b0e25fc0e2abe8a3ae980aa50881ac0c692b8433] | committer: Diego Biurrun

Replace DVD access method #defines by an enum.

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=b0e25fc0e2abe8a3ae980aa50881ac0c692b8433
---

 src/libdvdcss.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/libdvdcss.h b/src/libdvdcss.h
index 4f1f4af..399a1a3 100644
--- a/src/libdvdcss.h
+++ b/src/libdvdcss.h
@@ -35,6 +35,14 @@
 #include "device.h"
 
 /*****************************************************************************
+ * libdvdcss method: used like init flags
+ *****************************************************************************/
+enum dvdcss_method {
+    DVDCSS_METHOD_KEY,
+    DVDCSS_METHOD_DISC,
+    DVDCSS_METHOD_TITLE,
+};
+/*****************************************************************************
  * The libdvdcss structure
  *****************************************************************************/
 struct dvdcss_s
@@ -51,7 +59,7 @@ struct dvdcss_s
     int ( * pf_readv ) ( dvdcss_t, struct iovec *, int );
 
     /* Decryption stuff */
-    int          i_method;
+    enum dvdcss_method i_method;
     css_t        css;
     int          b_ioctls;
     int          b_scrambled;
@@ -78,13 +86,6 @@ struct dvdcss_s
 };
 
 /*****************************************************************************
- * libdvdcss method: used like init flags
- *****************************************************************************/
-#define DVDCSS_METHOD_KEY        0
-#define DVDCSS_METHOD_DISC       1
-#define DVDCSS_METHOD_TITLE      2
-
-/*****************************************************************************
  * Functions used across the library
  *****************************************************************************/
 #define print_debug( dvdcss, ... ) \



More information about the libdvdcss-devel mailing list