From 5dc94e8cb8eefa6f708de5054e44477cd4598d78 Mon Sep 17 00:00:00 2001 From: Tuomas Virtanen Date: Sun, 17 Jan 2016 03:17:22 +0200 Subject: This and that --- include/kitchensink/internal/kitlist.h | 26 ++++++++++++++++++++++++++ include/kitchensink/kitplayer.h | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 include/kitchensink/internal/kitlist.h (limited to 'include/kitchensink') diff --git a/include/kitchensink/internal/kitlist.h b/include/kitchensink/internal/kitlist.h new file mode 100644 index 0000000..85e3e3f --- /dev/null +++ b/include/kitchensink/internal/kitlist.h @@ -0,0 +1,26 @@ +#ifndef KITLIST_H +#define KITLIST_H + +#include "kitchensink/kitconfig.h" + +typedef struct Kit_List Kit_List; + +typedef void (*Kit_ListFreeCallback)(void*); + +struct Kit_List { + unsigned int size; + unsigned int length; + Kit_ListFreeCallback free_cb; + void **data; +}; + +KIT_LOCAL Kit_List* Kit_CreateList(unsigned int size, Kit_ListFreeCallback free_cb); +KIT_LOCAL void Kit_DestroyList(Kit_List *list); + +KIT_LOCAL void Kit_ClearList(Kit_List *list); +KIT_LOCAL void Kit_RemoveFromList(Kit_List *list, unsigned int iterator); +KIT_LOCAL void* Kit_IterateList(const Kit_List *list, unsigned int *iterator); +KIT_LOCAL int Kit_WriteList(Kit_List *list, void *ptr); +KIT_LOCAL int Kit_GetListLength(const Kit_List *list); + +#endif // KITLIST_H diff --git a/include/kitchensink/kitplayer.h b/include/kitchensink/kitplayer.h index 7e3ba53..1d1f5f9 100644 --- a/include/kitchensink/kitplayer.h +++ b/include/kitchensink/kitplayer.h @@ -6,6 +6,7 @@ #include #include +#include #include @@ -70,7 +71,6 @@ typedef struct Kit_Player { void *vbuffer; ///< Video stream buffer void *sbuffer; ///< Subtitle stream buffer void *cbuffer; ///< Control stream buffer - void *active_subs; ///< Active subtitles buffer // FFmpeg internal state void *vcodec_ctx; ///< FFmpeg: Video codec context @@ -104,7 +104,7 @@ KIT_API void Kit_ClosePlayer(Kit_Player *player); KIT_API int Kit_UpdatePlayer(Kit_Player *player); KIT_API int Kit_GetVideoData(Kit_Player *player, SDL_Texture *texture); -KIT_API int Kit_GetSubtitleData(Kit_Player *player, SDL_Texture *texture); +KIT_API int Kit_GetSubtitleData(Kit_Player *player, SDL_Renderer *renderer); KIT_API int Kit_GetAudioData(Kit_Player *player, unsigned char *buffer, int length, int cur_buf_len); KIT_API void Kit_GetPlayerInfo(const Kit_Player *player, Kit_PlayerInfo *info); -- cgit v1.2.3