Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cosmetic flip of ifdefs

  • Loading branch information...
commit f66909fd46fdba604385d1e9059e71b4fa1936b8 1 parent 213f926
@davilla davilla authored
Showing with 53 additions and 54 deletions.
  1. +53 −54 xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h
View
107 xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h
@@ -25,10 +25,10 @@
#include "config.h"
#endif
extern "C" {
-#if !defined(WIN32)
- #include <ass/ass.h>
-#else
+#if defined(WIN32)
#include "lib/libass/libass/ass.h"
+#else
+ #include <ass/ass.h>
#endif
}
#include "DynamicDll.h"
@@ -70,7 +70,56 @@ class DllLibassInterface
, void *data)=0;
};
-#if !(defined(WIN32) || defined(__APPLE__))
+#if defined(WIN32) || defined(__APPLE__)
+
+class DllLibass : public DllDynamic, DllLibassInterface
+{
+ DECLARE_DLL_WRAPPER(DllLibass, DLL_PATH_LIBASS)
+ DEFINE_METHOD2(void, ass_set_extract_fonts, (ASS_Library * p1, int p2))
+ DEFINE_METHOD2(void, ass_set_fonts_dir, (ASS_Library * p1, const char * p2))
+ DEFINE_METHOD0(ASS_Library *, ass_library_init)
+ DEFINE_METHOD1(ASS_Renderer *, ass_renderer_init, (ASS_Library * p1))
+ DEFINE_METHOD3(void, ass_set_frame_size, (ASS_Renderer * p1, int p2, int p3))
+ DEFINE_METHOD5(void, ass_set_margins, (ASS_Renderer * p1, int p2, int p3, int p4, int p5))
+ DEFINE_METHOD2(void, ass_set_use_margins, (ASS_Renderer * p1, int p2))
+ DEFINE_METHOD2(void, ass_set_font_scale, (ASS_Renderer * p1, double p2))
+ DEFINE_METHOD4(ASS_Image *, ass_render_frame, (ASS_Renderer * p1, ASS_Track * p2, long long p3, int * p4))
+ DEFINE_METHOD1(ASS_Track *, ass_new_track, (ASS_Library * p1))
+ DEFINE_METHOD3(ASS_Track *, ass_read_file, (ASS_Library * p1, char * p2, char * p3))
+ DEFINE_METHOD4(ASS_Track *, ass_read_memory, (ASS_Library * p1, char * p2, int p3, char * p4))
+ DEFINE_METHOD1(void, ass_free_track, (ASS_Track * p1))
+ DEFINE_METHOD6(void, ass_set_fonts, (ASS_Renderer* p1, const char* p2, const char* p3, int p4, const char* p5, int p6))
+ DEFINE_METHOD2(void, ass_set_style_overrides, (ASS_Library* p1, char** p2))
+ DEFINE_METHOD1(void, ass_library_done, (ASS_Library* p1))
+ DEFINE_METHOD1(void, ass_renderer_done, (ASS_Renderer* p1))
+ DEFINE_METHOD5(void, ass_process_chunk, (ASS_Track* p1, char* p2, int p3, long long p4, long long p5))
+ DEFINE_METHOD3(void, ass_process_codec_private, (ASS_Track* p1, char* p2, int p3))
+ DEFINE_METHOD3(void, ass_set_message_cb, (ASS_Library* p1, void (*p2)(int level, const char *fmt, va_list args, void *data), void* p3))
+ BEGIN_METHOD_RESOLVE()
+ RESOLVE_METHOD(ass_set_extract_fonts)
+ RESOLVE_METHOD(ass_set_fonts_dir)
+ RESOLVE_METHOD(ass_library_init)
+ RESOLVE_METHOD(ass_renderer_init)
+ RESOLVE_METHOD(ass_set_frame_size)
+ RESOLVE_METHOD(ass_set_margins)
+ RESOLVE_METHOD(ass_set_use_margins)
+ RESOLVE_METHOD(ass_set_font_scale)
+ RESOLVE_METHOD(ass_render_frame)
+ RESOLVE_METHOD(ass_new_track)
+ RESOLVE_METHOD(ass_read_file)
+ RESOLVE_METHOD(ass_read_memory)
+ RESOLVE_METHOD(ass_free_track)
+ RESOLVE_METHOD(ass_set_fonts)
+ RESOLVE_METHOD(ass_set_style_overrides)
+ RESOLVE_METHOD(ass_library_done)
+ RESOLVE_METHOD(ass_renderer_done)
+ RESOLVE_METHOD(ass_process_chunk)
+ RESOLVE_METHOD(ass_process_codec_private)
+ RESOLVE_METHOD(ass_set_message_cb)
+ END_METHOD_RESOLVE()
+};
+
+#else
class DllLibass : public DllDynamic, DllLibassInterface
{
@@ -128,54 +177,4 @@ class DllLibass : public DllDynamic, DllLibassInterface
virtual void Unload() {}
virtual bool IsLoaded() { return true; }
};
-
-#else
-
-class DllLibass : public DllDynamic, DllLibassInterface
-{
- DECLARE_DLL_WRAPPER(DllLibass, DLL_PATH_LIBASS)
- DEFINE_METHOD2(void, ass_set_extract_fonts, (ASS_Library * p1, int p2))
- DEFINE_METHOD2(void, ass_set_fonts_dir, (ASS_Library * p1, const char * p2))
- DEFINE_METHOD0(ASS_Library *, ass_library_init)
- DEFINE_METHOD1(ASS_Renderer *, ass_renderer_init, (ASS_Library * p1))
- DEFINE_METHOD3(void, ass_set_frame_size, (ASS_Renderer * p1, int p2, int p3))
- DEFINE_METHOD5(void, ass_set_margins, (ASS_Renderer * p1, int p2, int p3, int p4, int p5))
- DEFINE_METHOD2(void, ass_set_use_margins, (ASS_Renderer * p1, int p2))
- DEFINE_METHOD2(void, ass_set_font_scale, (ASS_Renderer * p1, double p2))
- DEFINE_METHOD4(ASS_Image *, ass_render_frame, (ASS_Renderer * p1, ASS_Track * p2, long long p3, int * p4))
- DEFINE_METHOD1(ASS_Track *, ass_new_track, (ASS_Library * p1))
- DEFINE_METHOD3(ASS_Track *, ass_read_file, (ASS_Library * p1, char * p2, char * p3))
- DEFINE_METHOD4(ASS_Track *, ass_read_memory, (ASS_Library * p1, char * p2, int p3, char * p4))
- DEFINE_METHOD1(void, ass_free_track, (ASS_Track * p1))
- DEFINE_METHOD6(void, ass_set_fonts, (ASS_Renderer* p1, const char* p2, const char* p3, int p4, const char* p5, int p6))
- DEFINE_METHOD2(void, ass_set_style_overrides, (ASS_Library* p1, char** p2))
- DEFINE_METHOD1(void, ass_library_done, (ASS_Library* p1))
- DEFINE_METHOD1(void, ass_renderer_done, (ASS_Renderer* p1))
- DEFINE_METHOD5(void, ass_process_chunk, (ASS_Track* p1, char* p2, int p3, long long p4, long long p5))
- DEFINE_METHOD3(void, ass_process_codec_private, (ASS_Track* p1, char* p2, int p3))
- DEFINE_METHOD3(void, ass_set_message_cb, (ASS_Library* p1, void (*p2)(int level, const char *fmt, va_list args, void *data), void* p3))
- BEGIN_METHOD_RESOLVE()
- RESOLVE_METHOD(ass_set_extract_fonts)
- RESOLVE_METHOD(ass_set_fonts_dir)
- RESOLVE_METHOD(ass_library_init)
- RESOLVE_METHOD(ass_renderer_init)
- RESOLVE_METHOD(ass_set_frame_size)
- RESOLVE_METHOD(ass_set_margins)
- RESOLVE_METHOD(ass_set_use_margins)
- RESOLVE_METHOD(ass_set_font_scale)
- RESOLVE_METHOD(ass_render_frame)
- RESOLVE_METHOD(ass_new_track)
- RESOLVE_METHOD(ass_read_file)
- RESOLVE_METHOD(ass_read_memory)
- RESOLVE_METHOD(ass_free_track)
- RESOLVE_METHOD(ass_set_fonts)
- RESOLVE_METHOD(ass_set_style_overrides)
- RESOLVE_METHOD(ass_library_done)
- RESOLVE_METHOD(ass_renderer_done)
- RESOLVE_METHOD(ass_process_chunk)
- RESOLVE_METHOD(ass_process_codec_private)
- RESOLVE_METHOD(ass_set_message_cb)
- END_METHOD_RESOLVE()
-};
-
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.