17#include <SDL_render.h>
106 int video_stream_index,
107 int audio_stream_index,
108 int subtitle_stream_index,
236 SDL_Texture *texture,
Public API configurations.
#define KIT_API
Definition kitconfig.h:30
Kit_PlayerState
Playback states.
Definition kitplayer.h:26
@ KIT_PAUSED
Playback paused; player is actively decoding but no new data is given out.
Definition kitplayer.h:29
@ KIT_STOPPED
Playback stopped or has not started yet.
Definition kitplayer.h:27
@ KIT_PLAYING
Playback started & player is actively decoding.
Definition kitplayer.h:28
@ KIT_CLOSED
Playback is stopped and player is closing.
Definition kitplayer.h:30
KIT_API void Kit_ClosePlayer(Kit_Player *player)
Close previously initialized player.
KIT_API int Kit_PlayerSeek(Kit_Player *player, double time)
Seek to timestamp.
KIT_API int Kit_GetPlayerVideoStream(const Kit_Player *player)
Gets the current video stream index.
KIT_API void Kit_GetPlayerInfo(const Kit_Player *player, Kit_PlayerInfo *info)
Fetches information about the currently selected streams.
KIT_API int Kit_GetPlayerSubtitleStream(const Kit_Player *player)
Gets the current subtitle stream index.
KIT_API void Kit_PlayerPause(Kit_Player *player)
Pauses playback.
KIT_API double Kit_GetPlayerPosition(const Kit_Player *player)
Get the current position of the playback.
KIT_API void Kit_SetPlayerScreenSize(Kit_Player *player, int w, int h)
Sets the current screen size in pixels.
KIT_API int Kit_GetPlayerAudioData(Kit_Player *player, unsigned char *buffer, int length)
Fetches audio data from the player.
KIT_API int Kit_GetPlayerAudioStream(const Kit_Player *player)
Gets the current audio stream index.
KIT_API double Kit_GetPlayerDuration(const Kit_Player *player)
Get the duration of the source.
KIT_API Kit_PlayerState Kit_GetPlayerState(const Kit_Player *player)
Returns the current state of the player.
KIT_API int Kit_GetPlayerSubtitleData(Kit_Player *player, SDL_Texture *texture, SDL_Rect *sources, SDL_Rect *targets, int limit)
Fetches subtitle data from the player.
KIT_API int Kit_GetPlayerVideoDataArea(Kit_Player *player, SDL_Texture *texture, SDL_Rect *area)
Fetches a new video frame from the player.
KIT_API int Kit_GetPlayerVideoData(Kit_Player *player, SDL_Texture *texture)
Fetches a new video frame from the player.
KIT_API int Kit_GetPlayerAspectRatio(const Kit_Player *player, int *num, int *den)
Get the player aspect ratio, if playing video.
KIT_API void Kit_PlayerStop(Kit_Player *player)
Stops playback.
KIT_API Kit_Player * Kit_CreatePlayer(const Kit_Source *src, int video_stream_index, int audio_stream_index, int subtitle_stream_index, int screen_w, int screen_h)
Creates a new player from a source.
KIT_API void Kit_PlayerPlay(Kit_Player *player)
Starts playback.
Video/Audio source file handling.
Contains information about the used codec for playback.
Definition kitcodec.h:22
Player state container.
Definition kitplayer.h:36
void * dec_lock
Decoder lock.
Definition kitplayer.h:40
double pause_started
Temporary flag for handling pauses.
Definition kitplayer.h:42
void * decoders[3]
Decoder contexts.
Definition kitplayer.h:38
void * dec_thread
Decoder thread.
Definition kitplayer.h:39
const Kit_Source * src
Reference to Audio/Video source.
Definition kitplayer.h:41
Kit_PlayerState state
Playback state.
Definition kitplayer.h:37
Contains information about the streams selected for playback.
Definition kitplayer.h:57
Kit_PlayerStreamInfo subtitle
Subtitle stream data.
Definition kitplayer.h:60
Kit_PlayerStreamInfo audio
Audio stream data.
Definition kitplayer.h:59
Kit_PlayerStreamInfo video
Video stream data.
Definition kitplayer.h:58
Contains data about a stream selected for playback.
Definition kitplayer.h:48
Kit_Codec codec
Decoder codec information.
Definition kitplayer.h:49
Kit_OutputFormat output
Information about the output format.
Definition kitplayer.h:50
Audio/video source.
Definition kitsource.h:43