comparison dvd_input.c @ 79:dbfcd120bf24 src

Replace uses of the deprecated dvdcss_handle type by dvdcss_t.
author diego
date Thu, 21 Mar 2013 17:53:40 +0000
parents ce7056d60f01
children d59aaee50e47
comparison
equal deleted inserted replaced
78:1b8797855771 79:dbfcd120bf24
54 #else 54 #else
55 /* Only needed on MINGW at the moment */ 55 /* Only needed on MINGW at the moment */
56 #include "../../msvc/contrib/dlfcn.c" 56 #include "../../msvc/contrib/dlfcn.c"
57 #endif 57 #endif
58 58
59 typedef struct dvdcss_s *dvdcss_handle; 59 typedef struct dvdcss_s *dvdcss_t;
60 static dvdcss_handle (*DVDcss_open) (const char *); 60 static dvdcss_t (*DVDcss_open) (const char *);
61 static int (*DVDcss_close) (dvdcss_handle); 61 static int (*DVDcss_close) (dvdcss_t);
62 static int (*DVDcss_seek) (dvdcss_handle, int, int); 62 static int (*DVDcss_seek) (dvdcss_t, int, int);
63 static int (*DVDcss_title) (dvdcss_handle, int); 63 static int (*DVDcss_title) (dvdcss_t, int);
64 static int (*DVDcss_read) (dvdcss_handle, void *, int, int); 64 static int (*DVDcss_read) (dvdcss_t, void *, int, int);
65 static char * (*DVDcss_error) (dvdcss_handle); 65 static char * (*DVDcss_error) (dvdcss_t);
66 #endif 66 #endif
67 67
68 /* The DVDinput handle, add stuff here for new input methods. */ 68 /* The DVDinput handle, add stuff here for new input methods. */
69 struct dvd_input_s { 69 struct dvd_input_s {
70 /* libdvdcss handle */ 70 /* libdvdcss handle */
71 dvdcss_handle dvdcss; 71 dvdcss_t dvdcss;
72 72
73 /* dummy file input */ 73 /* dummy file input */
74 int fd; 74 int fd;
75 }; 75 };
76 76
298 #if defined(__OpenBSD__) && !defined(__ELF__) || defined(__OS2__) 298 #if defined(__OpenBSD__) && !defined(__ELF__) || defined(__OS2__)
299 #define U_S "_" 299 #define U_S "_"
300 #else 300 #else
301 #define U_S 301 #define U_S
302 #endif 302 #endif
303 DVDcss_open = (dvdcss_handle (*)(const char*)) 303 DVDcss_open = (dvdcss_t (*)(const char*))
304 dlsym(dvdcss_library, U_S "dvdcss_open"); 304 dlsym(dvdcss_library, U_S "dvdcss_open");
305 DVDcss_close = (int (*)(dvdcss_handle)) 305 DVDcss_close = (int (*)(dvdcss_t))
306 dlsym(dvdcss_library, U_S "dvdcss_close"); 306 dlsym(dvdcss_library, U_S "dvdcss_close");
307 DVDcss_title = (int (*)(dvdcss_handle, int)) 307 DVDcss_title = (int (*)(dvdcss_t, int))
308 dlsym(dvdcss_library, U_S "dvdcss_title"); 308 dlsym(dvdcss_library, U_S "dvdcss_title");
309 DVDcss_seek = (int (*)(dvdcss_handle, int, int)) 309 DVDcss_seek = (int (*)(dvdcss_t, int, int))
310 dlsym(dvdcss_library, U_S "dvdcss_seek"); 310 dlsym(dvdcss_library, U_S "dvdcss_seek");
311 DVDcss_read = (int (*)(dvdcss_handle, void*, int, int)) 311 DVDcss_read = (int (*)(dvdcss_t, void*, int, int))
312 dlsym(dvdcss_library, U_S "dvdcss_read"); 312 dlsym(dvdcss_library, U_S "dvdcss_read");
313 DVDcss_error = (char* (*)(dvdcss_handle)) 313 DVDcss_error = (char* (*)(dvdcss_t))
314 dlsym(dvdcss_library, U_S "dvdcss_error"); 314 dlsym(dvdcss_library, U_S "dvdcss_error");
315 315
316 dvdcss_version = (char **)dlsym(dvdcss_library, U_S "dvdcss_interface_2"); 316 dvdcss_version = (char **)dlsym(dvdcss_library, U_S "dvdcss_interface_2");
317 317
318 if(dlsym(dvdcss_library, U_S "dvdcss_crack")) { 318 if(dlsym(dvdcss_library, U_S "dvdcss_crack")) {