summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2020-10-19 00:52:24 +0200
committermanuel <manuel@mausz.at>2020-10-19 00:52:24 +0200
commitbe933ef2241d79558f91796cc5b3a161f72ebf9c (patch)
treefe3ab2f130e20c99001f2d7a81d610c78c96a3f4 /xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
parent5f8335c1e49ce108ef3481863833c98efa00411b (diff)
downloadkodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.tar.gz
kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.tar.bz2
kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.zip
sync with upstream
Diffstat (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h')
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
new file mode 100644
index 0000000..6455b38
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
@@ -0,0 +1,83 @@
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#pragma once
10
11#ifndef C_API_ADDONINSTANCE_IMAGE_DECODER_H
12#define C_API_ADDONINSTANCE_IMAGE_DECODER_H
13
14#include "../addon_base.h"
15
16#ifdef __cplusplus
17extern "C"
18{
19#endif /* __cplusplus */
20
21 //============================================================================
22 /// @ingroup cpp_kodi_addon_imagedecoder_Defs
23 /// @brief **Image format types**\n
24 /// Used to define wanted target format where image decoder should give to
25 /// Kodi.
26 ///
27 typedef enum ImageFormat
28 {
29 /// @brief A 32-bit ARGB pixel format, with alpha, that uses 8 bits per
30 /// channel, ARGBARGB...
31 ADDON_IMG_FMT_A8R8G8B8 = 1,
32
33 /// @brief A 8, alpha only, 8bpp, AAA...
34 ADDON_IMG_FMT_A8 = 2,
35
36 /// @brief RGBA 8:8:8:8, with alpha, 32bpp, RGBARGBA...
37 ADDON_IMG_FMT_RGBA8 = 3,
38
39 /// @brief RGB 8:8:8, with alpha, 24bpp, RGBRGB...
40 ADDON_IMG_FMT_RGB8 = 4
41 } ImageFormat;
42 //----------------------------------------------------------------------------
43
44 typedef struct AddonProps_ImageDecoder
45 {
46 const char* mimetype;
47 } AddonProps_ImageDecoder;
48
49 typedef struct AddonToKodiFuncTable_ImageDecoder
50 {
51 KODI_HANDLE kodi_instance;
52 } AddonToKodiFuncTable_ImageDecoder;
53
54 struct AddonInstance_ImageDecoder;
55 typedef struct KodiToAddonFuncTable_ImageDecoder
56 {
57 KODI_HANDLE addonInstance;
58 bool(__cdecl* load_image_from_memory)(const struct AddonInstance_ImageDecoder* instance,
59 unsigned char* buffer,
60 unsigned int buf_size,
61 unsigned int* width,
62 unsigned int* height);
63
64 bool(__cdecl* decode)(const struct AddonInstance_ImageDecoder* instance,
65 unsigned char* pixels,
66 unsigned int width,
67 unsigned int height,
68 unsigned int pitch,
69 enum ImageFormat format);
70 } KodiToAddonFuncTable_ImageDecoder;
71
72 typedef struct AddonInstance_ImageDecoder
73 {
74 struct AddonProps_ImageDecoder* props;
75 struct AddonToKodiFuncTable_ImageDecoder* toKodi;
76 struct KodiToAddonFuncTable_ImageDecoder* toAddon;
77 } AddonInstance_ImageDecoder;
78
79#ifdef __cplusplus
80} /* extern "C" */
81#endif /* __cplusplus */
82
83#endif /* !C_API_ADDONINSTANCE_IMAGE_DECODER_H */