[libdvdcss-devel] [PATCH 1/4] Replace DVD access method #defines by an enum.
Diego Biurrun
diego at biurrun.de
Sat Nov 1 17:56:29 CET 2014
---
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, ... ) \
--
1.9.1
More information about the libdvdcss-devel
mailing list