Skip to content

Commit

Permalink
#63: Work on GCC 10 problems
Browse files Browse the repository at this point in the history
  • Loading branch information
katajakasa committed Jul 24, 2020
1 parent 4b1a7cc commit 4717856
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
32 changes: 16 additions & 16 deletions include/kitchensink/internal/libass.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ typedef enum {
ASS_HINTING_NATIVE
} ASS_Hinting;

KIT_LOCAL ASS_Library* (*ass_library_init)(void);
KIT_LOCAL void (*ass_library_done)(ASS_Library *priv);
KIT_LOCAL void (*ass_process_codec_private)(ASS_Track *track, char *data, int size);
KIT_LOCAL void (*ass_set_message_cb)(ASS_Library *priv, void (*msg_cb)(int level, const char *fmt, va_list args, void *data), void *data);
KIT_LOCAL ASS_Renderer* (*ass_renderer_init)(ASS_Library *);
KIT_LOCAL void (*ass_renderer_done)(ASS_Renderer *priv);
KIT_LOCAL void (*ass_set_frame_size)(ASS_Renderer *priv, int w, int h);
KIT_LOCAL void (*ass_set_hinting)(ASS_Renderer *priv, ASS_Hinting ht);
KIT_LOCAL void (*ass_set_fonts)(ASS_Renderer *priv, const char *default_font, const char *default_family, int dfp, const char *config, int update);
KIT_LOCAL ASS_Image* (*ass_render_frame)(ASS_Renderer *priv, ASS_Track *track, long long now, int *detect_change);
KIT_LOCAL ASS_Track* (*ass_new_track)(ASS_Library *);
KIT_LOCAL void (*ass_free_track)(ASS_Track *track);
KIT_LOCAL void (*ass_process_data)(ASS_Track *track, char *data, int size);
KIT_LOCAL void (*ass_process_chunk)(ASS_Track *track, char *data, int size, long long timecode, long long duration);
KIT_LOCAL void (*ass_add_font)(ASS_Library *library, char *name, char *data, int data_size);
KIT_LOCAL void (*ass_set_storage_size)(ASS_Renderer *priv, int w, int h);
extern KIT_LOCAL ASS_Library* (*ass_library_init)(void);
extern KIT_LOCAL void (*ass_library_done)(ASS_Library *priv);
extern KIT_LOCAL void (*ass_process_codec_private)(ASS_Track *track, char *data, int size);
extern KIT_LOCAL void (*ass_set_message_cb)(ASS_Library *priv, void (*msg_cb)(int level, const char *fmt, va_list args, void *data), void *data);
extern KIT_LOCAL ASS_Renderer* (*ass_renderer_init)(ASS_Library *);
extern KIT_LOCAL void (*ass_renderer_done)(ASS_Renderer *priv);
extern KIT_LOCAL void (*ass_set_frame_size)(ASS_Renderer *priv, int w, int h);
extern KIT_LOCAL void (*ass_set_hinting)(ASS_Renderer *priv, ASS_Hinting ht);
extern KIT_LOCAL void (*ass_set_fonts)(ASS_Renderer *priv, const char *default_font, const char *default_family, int dfp, const char *config, int update);
extern KIT_LOCAL ASS_Image* (*ass_render_frame)(ASS_Renderer *priv, ASS_Track *track, long long now, int *detect_change);
extern KIT_LOCAL ASS_Track* (*ass_new_track)(ASS_Library *);
extern KIT_LOCAL void (*ass_free_track)(ASS_Track *track);
extern KIT_LOCAL void (*ass_process_data)(ASS_Track *track, char *data, int size);
extern KIT_LOCAL void (*ass_process_chunk)(ASS_Track *track, char *data, int size, long long timecode, long long duration);
extern KIT_LOCAL void (*ass_add_font)(ASS_Library *library, char *name, char *data, int data_size);
extern KIT_LOCAL void (*ass_set_storage_size)(ASS_Renderer *priv, int w, int h);

KIT_LOCAL int load_libass(void *handle);

Expand Down
19 changes: 19 additions & 0 deletions src/internal/libass.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
#include <SDL_loadso.h>
#include "kitchensink/internal/libass.h"


ASS_Library* (*ass_library_init)(void);
void (*ass_library_done)(ASS_Library *priv);
void (*ass_process_codec_private)(ASS_Track *track, char *data, int size);
void (*ass_set_message_cb)(ASS_Library *priv, void (*msg_cb)(int level, const char *fmt, va_list args, void *data), void *data);
ASS_Renderer* (*ass_renderer_init)(ASS_Library *);
void (*ass_renderer_done)(ASS_Renderer *priv);
void (*ass_set_frame_size)(ASS_Renderer *priv, int w, int h);
void (*ass_set_hinting)(ASS_Renderer *priv, ASS_Hinting ht);
void (*ass_set_fonts)(ASS_Renderer *priv, const char *default_font, const char *default_family, int dfp, const char *config, int update);
ASS_Image* (*ass_render_frame)(ASS_Renderer *priv, ASS_Track *track, long long now, int *detect_change);
ASS_Track* (*ass_new_track)(ASS_Library *);
void (*ass_free_track)(ASS_Track *track);
void (*ass_process_data)(ASS_Track *track, char *data, int size);
void (*ass_process_chunk)(ASS_Track *track, char *data, int size, long long timecode, long long duration);
void (*ass_add_font)(ASS_Library *library, char *name, char *data, int data_size);
void (*ass_set_storage_size)(ASS_Renderer *priv, int w, int h);


int load_libass(void *handle) {
ass_library_init = SDL_LoadFunction(handle, "ass_library_init");
ass_library_done = SDL_LoadFunction(handle, "ass_library_done");
Expand Down

0 comments on commit 4717856

Please sign in to comment.