Kodi Development 19.0
for Binary and Script based Add-Ons
image_decoder.h
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_IMAGE_DECODER_H
10#define C_API_ADDONINSTANCE_IMAGE_DECODER_H
11
12#include "../addon_base.h"
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif /* __cplusplus */
18
19 //============================================================================
25 typedef enum ImageFormat
26 {
30
33
36
40 //----------------------------------------------------------------------------
41
43 {
44 const char* mimetype;
46
48 {
49 KODI_HANDLE kodi_instance;
51
54 {
55 KODI_HANDLE addonInstance;
56 bool(__cdecl* load_image_from_memory)(const struct AddonInstance_ImageDecoder* instance,
57 unsigned char* buffer,
58 unsigned int buf_size,
59 unsigned int* width,
60 unsigned int* height);
61
62 bool(__cdecl* decode)(const struct AddonInstance_ImageDecoder* instance,
63 unsigned char* pixels,
64 unsigned int width,
65 unsigned int height,
66 unsigned int pitch,
67 enum ImageFormat format);
69
71 {
72 struct AddonProps_ImageDecoder* props;
76
77#ifdef __cplusplus
78} /* extern "C" */
79#endif /* __cplusplus */
80
81#endif /* !C_API_ADDONINSTANCE_IMAGE_DECODER_H */
ImageFormat
Image format types Used to define wanted target format where image decoder should give to Kodi.
Definition: image_decoder.h:26
@ ADDON_IMG_FMT_A8
A 8, alpha only, 8bpp, AAA...
Definition: image_decoder.h:32
@ ADDON_IMG_FMT_A8R8G8B8
A 32-bit ARGB pixel format, with alpha, that uses 8 bits per channel, ARGBARGB...
Definition: image_decoder.h:29
@ ADDON_IMG_FMT_RGB8
RGB 8:8:8, with alpha, 24bpp, RGBRGB...
Definition: image_decoder.h:38
@ ADDON_IMG_FMT_RGBA8
RGBA 8:8:8:8, with alpha, 32bpp, RGBARGBA...
Definition: image_decoder.h:35
Definition: image_decoder.h:71
Definition: image_decoder.h:43
Definition: image_decoder.h:48
Definition: image_decoder.h:54