summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_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/audio_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/audio_decoder.h')
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h
new file mode 100644
index 0000000..8b75ddb
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h
@@ -0,0 +1,92 @@
1/*
2 * Copyright (C) 2005-2020 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_AUDIO_DECODER_H
12#define C_API_ADDONINSTANCE_AUDIO_DECODER_H
13
14#include "../addon_base.h"
15#include "../audio_engine.h"
16
17#define AUDIO_DECODER_LYRICS_SIZE 65535
18
19#ifdef __cplusplus
20extern "C"
21{
22#endif /* __cplusplus */
23
24 // WARNING About size use malloc/new!
25 struct AUDIO_DECODER_INFO_TAG
26 {
27 char title[ADDON_STANDARD_STRING_LENGTH_SMALL];
28 char artist[ADDON_STANDARD_STRING_LENGTH_SMALL];
29 char album[ADDON_STANDARD_STRING_LENGTH_SMALL];
30 char album_artist[ADDON_STANDARD_STRING_LENGTH_SMALL];
31 char media_type[ADDON_STANDARD_STRING_LENGTH_SMALL];
32 char genre[ADDON_STANDARD_STRING_LENGTH_SMALL];
33 int duration;
34 int track;
35 int disc;
36 char disc_subtitle[ADDON_STANDARD_STRING_LENGTH_SMALL];
37 int disc_total;
38 char release_date[ADDON_STANDARD_STRING_LENGTH_SMALL];
39 char lyrics[AUDIO_DECODER_LYRICS_SIZE];
40 int samplerate;
41 int channels;
42 int bitrate;
43 char comment[ADDON_STANDARD_STRING_LENGTH];
44 };
45
46 typedef struct AddonProps_AudioDecoder
47 {
48 int dummy;
49 } AddonProps_AudioDecoder;
50
51 typedef struct AddonToKodiFuncTable_AudioDecoder
52 {
53 KODI_HANDLE kodiInstance;
54 } AddonToKodiFuncTable_AudioDecoder;
55
56 struct AddonInstance_AudioDecoder;
57 typedef struct KodiToAddonFuncTable_AudioDecoder
58 {
59 KODI_HANDLE addonInstance;
60 bool(__cdecl* init)(const struct AddonInstance_AudioDecoder* instance,
61 const char* file,
62 unsigned int filecache,
63 int* channels,
64 int* samplerate,
65 int* bitspersample,
66 int64_t* totaltime,
67 int* bitrate,
68 enum AudioEngineDataFormat* format,
69 const enum AudioEngineChannel** info);
70 int(__cdecl* read_pcm)(const struct AddonInstance_AudioDecoder* instance,
71 uint8_t* buffer,
72 int size,
73 int* actualsize);
74 int64_t(__cdecl* seek)(const struct AddonInstance_AudioDecoder* instance, int64_t time);
75 bool(__cdecl* read_tag)(const struct AddonInstance_AudioDecoder* instance,
76 const char* file,
77 struct AUDIO_DECODER_INFO_TAG* tag);
78 int(__cdecl* track_count)(const struct AddonInstance_AudioDecoder* instance, const char* file);
79 } KodiToAddonFuncTable_AudioDecoder;
80
81 typedef struct AddonInstance_AudioDecoder
82 {
83 struct AddonProps_AudioDecoder* props;
84 struct AddonToKodiFuncTable_AudioDecoder* toKodi;
85 struct KodiToAddonFuncTable_AudioDecoder* toAddon;
86 } AddonInstance_AudioDecoder;
87
88#ifdef __cplusplus
89} /* extern "C" */
90#endif /* __cplusplus */
91
92#endif /* !C_API_ADDONINSTANCE_AUDIO_DECODER_H */