Commit 2f64c0ef authored by cRTrn13's avatar cRTrn13

Now using void ptrs instead for child lib struct pointers. This removes the...

Now using void ptrs instead for child lib struct pointers. This removes the need for chid library header includes from libbluray.
parent e848aa49
......@@ -21,9 +21,9 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
if ((bd->h_libaacs = dlopen("libaacs.so", RTLD_LAZY))) {
DEBUG(DBG_BLURAY, "Downloaded libaacs (0x%08x)\n", bd->h_libaacs);
typedef AACS_KEYS* (*fptr)();
// typedef AACS_KEYS* (*fptr)();
fptr fptr_s = dlsym(bd->h_libaacs, "aacs_open");
fptr_p_void fptr_s = dlsym(bd->h_libaacs, "aacs_open");
bd->aacs = fptr_s(device_path, keyfile_path);
} else {
DEBUG(DBG_BLURAY, "libaacs not present\n");
......@@ -49,9 +49,9 @@ void bd_close(BLURAY *bd)
fptr fptr_s = dlsym(bd->h_libaacs, "aacs_close");
fptr_s(bd->aacs);
}
dlclose(bd->h_libaacs);
dlclose(bd->h_libaacs);
}
if (bd->fp) {
file_close(bd->fp);
......
......@@ -6,10 +6,9 @@
#include <unistd.h>
#include "file/file.h"
#include "libaacs/aacs.h"
#include "libbdplus/bdplus.h"
typedef int (*fptr_int)();
typedef void* (*fptr_p_void)();
typedef struct bluray BLURAY;
struct bluray {
......@@ -17,8 +16,8 @@ struct bluray {
FILE_H *fp;
uint64_t s_size;
off_t s_pos;
AACS_KEYS *aacs;
void *h_libaacs;
void *aacs;
void *h_libaacs, *h_libbdplus, *h_libbdnav;
fptr_int libaacs_decrypt_unit;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment