|
SDL_kitchensink
|
Library initialization and deinitialization functionality. More...
#include "kitchensink/kitconfig.h"Go to the source code of this file.
Data Structures | |
| struct | Kit_Version |
| SDL_kitchensink library version container. More... | |
Typedefs | |
| typedef struct Kit_Version | Kit_Version |
| SDL_kitchensink library version container. | |
| typedef enum Kit_HintType | Kit_HintType |
| Library hint types. Used as keys for Kit_SetHint(). | |
Enumerations | |
| enum | { KIT_FONT_HINTING_NONE = 0 , KIT_FONT_HINTING_LIGHT , KIT_FONT_HINTING_NORMAL , KIT_FONT_HINTING_NATIVE , KIT_FONT_HINTING_COUNT } |
| Font hinting options. Used as values for Kit_SetHint(KIT_HINT_FONT_HINTING, ...). More... | |
| enum | Kit_HintType { KIT_HINT_FONT_HINTING , KIT_HINT_THREAD_COUNT , KIT_HINT_VIDEO_BUFFER_FRAMES , KIT_HINT_AUDIO_BUFFER_FRAMES , KIT_HINT_SUBTITLE_BUFFER_FRAMES } |
| Library hint types. Used as keys for Kit_SetHint(). More... | |
| enum | { KIT_INIT_NETWORK = 0x1 , KIT_INIT_ASS = 0x2 } |
| Library initialization options, please see Kit_Init() More... | |
Functions | |
| KIT_API int | Kit_Init (unsigned int flags) |
| Initialize SDL_kitchensink library. | |
| KIT_API void | Kit_Quit () |
| Deinitializes SDL_kitchensink. | |
| KIT_API void | Kit_SetHint (Kit_HintType type, int value) |
| Sets a library-wide hint. | |
| KIT_API int | Kit_GetHint (Kit_HintType type) |
| Gets a previously set or default hint value. | |
| KIT_API void | Kit_GetVersion (Kit_Version *version) |
| Can be used to fetch the version of the linked SDL_kitchensink library. | |
Library initialization and deinitialization functionality.
| typedef enum Kit_HintType Kit_HintType |
Library hint types. Used as keys for Kit_SetHint().
Note that all of these must be set before player initialization for them to take effect!
| typedef struct Kit_Version Kit_Version |
SDL_kitchensink library version container.
| anonymous enum |
Font hinting options. Used as values for Kit_SetHint(KIT_HINT_FONT_HINTING, ...).
| anonymous enum |
Library initialization options, please see Kit_Init()
| Enumerator | |
|---|---|
| KIT_INIT_NETWORK | Initialise ffmpeg network support. |
| KIT_INIT_ASS | Initialize libass support (library must be linked statically or loadable dynamically) |
| enum Kit_HintType |
Library hint types. Used as keys for Kit_SetHint().
Note that all of these must be set before player initialization for them to take effect!
| KIT_API int Kit_GetHint | ( | Kit_HintType | type | ) |
Gets a previously set or default hint value.
| type | Hint type (refer to Kit_HintType for options) |
| KIT_API void Kit_GetVersion | ( | Kit_Version * | version | ) |
Can be used to fetch the version of the linked SDL_kitchensink library.
| version | Allocated Kit_Version |
| KIT_API int Kit_Init | ( | unsigned int | flags | ) |
Initialize SDL_kitchensink library.
This MUST be run before doing anything. After you are done using the library, you should use Kit_Quit() to deinitialize everything. Otherwise there might be resource leaks.
Following flags can be used to initialize subsystems:
KIT_INIT_NETWORK for ffmpeg network support (playback from the internet, for example)KIT_INIT_ASS for libass subtitles (text and ass/ssa subtitle support)Note that if this function fails, the failure reason should be available via Kit_GetError().
For example:
| flags | Library initialization flags |
| KIT_API void Kit_Quit | ( | ) |
Deinitializes SDL_kitchensink.
Note that any calls to library functions after this will cause undefined behaviour!
| KIT_API void Kit_SetHint | ( | Kit_HintType | type, |
| int | value | ||
| ) |
Sets a library-wide hint.
This can be used to set hints on how the library should behave. See Kit_HintType for all the options.
| type | Hint type (refer to Kit_HintType for options) |
| value | Value for the hint |