summaryrefslogtreecommitdiff
path: root/include/kitchensink/internal/kitsubtitle.h
blob: 4582744585376c88b52c0d95accd387b367de095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef KITSUBTITLE_H
#define KITSUBTITLE_H

#include <libavformat/avformat.h>

#include "kitchensink/kitconfig.h"
#include "kitchensink/kitplayer.h"

#define KIT_SBUFFERSIZE 512

typedef struct Kit_SubtitlePacket {
    double pts_start;
    double pts_end;
    SDL_Rect *rect;
    SDL_Surface *surface;
    SDL_Texture *texture;
} Kit_SubtitlePacket;

KIT_LOCAL Kit_SubtitlePacket* _CreateSubtitlePacket(double pts_start, double pts_end, SDL_Rect *rect, SDL_Surface *surface);
KIT_LOCAL void _FreeSubtitlePacket(void *ptr);
KIT_LOCAL void _HandleBitmapSubtitle(Kit_SubtitlePacket** spackets, int *n, Kit_Player *player, double pts, AVSubtitle *sub, AVSubtitleRect *rect);
KIT_LOCAL void _HandleSubtitlePacket(Kit_Player *player, AVPacket *packet);

#endif // KITSUBTITLE_H