[libbdplus-devel] win32 dll: automatically export API functions
anonymous
git at videolan.org
Fri Mar 24 11:34:36 CET 2017
libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Fri Mar 24 12:23:11 2017 +0200| [47d1b5481a02dd851aa20a386f957d879e083e97] | committer: anonymous
win32 dll: automatically export API functions
> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=47d1b5481a02dd851aa20a386f957d879e083e97
---
src/file/filesystem.h | 6 ++++++
src/libbdplus/bdplus.c | 1 +
src/libbdplus/bdplus.h | 17 +++++++++++++++++
3 files changed, 24 insertions(+)
diff --git a/src/file/filesystem.h b/src/file/filesystem.h
index f0418a3..3a5c99c 100644
--- a/src/file/filesystem.h
+++ b/src/file/filesystem.h
@@ -22,6 +22,10 @@
#include <stdint.h>
+#ifndef BD_PUBLIC
+# define BD_PUBLIC
+#endif
+
/* Keep this compatible with libaacs ! */
typedef struct bdplus_file BDPLUS_FILE_H;
struct bdplus_file
@@ -57,6 +61,8 @@ typedef BDPLUS_FILE_H* (*BDPLUS_FILE_OPEN)(void *handle, const char *filename);
* @param p function pointer
*/
struct bdplus_s;
+
+BD_PUBLIC
void bdplus_set_fopen(struct bdplus_s *bdplus, void *handle, BDPLUS_FILE_OPEN p);
diff --git a/src/libbdplus/bdplus.c b/src/libbdplus/bdplus.c
index bd9cd04..2501257 100644
--- a/src/libbdplus/bdplus.c
+++ b/src/libbdplus/bdplus.c
@@ -22,6 +22,7 @@
#include "config.h"
#endif
+#include "util/attributes.h" /* included before bdplus.h (define BD_PUBLIC for win32 dll exports) */
#include "bdplus.h"
#include "bdplus_data.h"
diff --git a/src/libbdplus/bdplus.h b/src/libbdplus/bdplus.h
index 5971850..629e95f 100644
--- a/src/libbdplus/bdplus.h
+++ b/src/libbdplus/bdplus.h
@@ -23,6 +23,9 @@
#include <stdint.h>
+#ifndef BD_PUBLIC
+# define BD_PUBLIC
+#endif
/* opaque types */
@@ -46,6 +49,7 @@ typedef struct bdplus_st_s bdplus_st_t;
* Get the bdplus library version number.
*
*/
+BD_PUBLIC
void bdplus_get_version(int *major, int *minor, int *micro);
@@ -57,12 +61,15 @@ void bdplus_get_version(int *major, int *minor, int *micro);
* @param vid BD disc Volume ID
* @return bdplus handle, NULL on error
*/
+BD_PUBLIC
bdplus_t *bdplus_init(const char *path, const char *config_path, const uint8_t *vid);
/* get BD+ content code generation */
+BD_PUBLIC
int32_t bdplus_get_code_gen(bdplus_t *plus);
/* get BD+ content code release date */
+BD_PUBLIC
int32_t bdplus_get_code_date(bdplus_t *plus);
@@ -71,6 +78,7 @@ int32_t bdplus_get_code_date(bdplus_t *plus);
*
* @param bdplus handle
*/
+BD_PUBLIC
void bdplus_free(bdplus_t *);
@@ -80,6 +88,7 @@ void bdplus_free(bdplus_t *);
* @param id Memory region type
* @param mem Memory region address
*/
+BD_PUBLIC
void bdplus_mmap(bdplus_t *, uint32_t id, void *mem);
/*
@@ -87,6 +96,7 @@ void bdplus_mmap(bdplus_t *, uint32_t id, void *mem);
*
* @param mk BD disc Media Key
*/
+BD_PUBLIC
void bdplus_set_mk(bdplus_t *, const uint8_t *mk);
@@ -97,6 +107,7 @@ void bdplus_set_mk(bdplus_t *, const uint8_t *mk);
* @param psr_read Function used to read from PSR
* @param psr_write Function used to write to PSR
*/
+BD_PUBLIC
void bdplus_psr(bdplus_t *,
void *regs,
uint32_t (*psr_read) (void *regs, int reg),
@@ -106,6 +117,7 @@ void bdplus_psr(bdplus_t *,
/*
* Start the bdplus VM
*/
+BD_PUBLIC
int32_t bdplus_start(bdplus_t *);
@@ -114,6 +126,7 @@ int32_t bdplus_start(bdplus_t *);
*
* @param event event type (BDPLUS_EVENT_*)
*/
+BD_PUBLIC
int32_t bdplus_event(bdplus_t *, uint32_t event, uint32_t param1, uint32_t param2);
@@ -128,12 +141,14 @@ int32_t bdplus_event(bdplus_t *, uint32_t event, uint32_t param1, uint32_t param
* @param m2ts m2ts file number
* @return stream handle, NULL on error
*/
+BD_PUBLIC
bdplus_st_t *bdplus_m2ts(bdplus_t *, uint32_t m2ts);
/*
* Close stream handle.
*/
+BD_PUBLIC
void bdplus_m2ts_close(bdplus_st_t *);
@@ -142,6 +157,7 @@ void bdplus_m2ts_close(bdplus_st_t *);
*
* @param offset new byte offset of the stream.
*/
+BD_PUBLIC
int32_t bdplus_seek(bdplus_st_t *, uint64_t offset);
/*
@@ -151,6 +167,7 @@ int32_t bdplus_seek(bdplus_st_t *, uint64_t offset);
* @param buffer stream data
* @return Number of patches performed for the buffer (statistics).
*/
+BD_PUBLIC
int32_t bdplus_fixup(bdplus_st_t *, int len, uint8_t *buffer);
More information about the libbdplus-devel
mailing list