Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
visualization.h
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#ifndef C_API_ADDONINSTANCE_VISUALIZATION_H
10#define C_API_ADDONINSTANCE_VISUALIZATION_H
11
12#include "../addon_base.h"
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif /* __cplusplus */
18
19 typedef KODI_ADDON_INSTANCE_HDL KODI_ADDON_VISUALIZATION_HDL;
20
22 {
23 const char* title;
24 const char* artist;
25 const char* album;
26 const char* albumArtist;
27 const char* genre;
28 const char* comment;
29 const char* lyrics;
30
31 const char* reserved1;
32 const char* reserved2;
33
34 int trackNumber;
35 int discNumber;
36 int duration;
37 int year;
38 int rating;
39
40 int reserved3;
41 int reserved4;
42 };
43
45 {
46 ADDON_HARDWARE_CONTEXT device;
47 int x;
48 int y;
49 int width;
50 int height;
51 float pixelRatio;
52 };
53
54 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_START_V1)(
55 const KODI_ADDON_VISUALIZATION_HDL hdl,
56 int channels,
57 int samples_per_sec,
58 int bits_per_sample,
59 const char* song_name);
60 typedef void(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_STOP_V1)(
61 const KODI_ADDON_VISUALIZATION_HDL hdl);
62
63 typedef int(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_GET_SYNC_DELAY_V1)(
64 const KODI_ADDON_VISUALIZATION_HDL hdl);
65
66 typedef void(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_AUDIO_DATA_V1)(
67 const KODI_ADDON_VISUALIZATION_HDL hdl, const float* audio_data, size_t audio_data_length);
68 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_IS_DIRTY_V1)(
69 const KODI_ADDON_VISUALIZATION_HDL hdl);
70 typedef void(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_RENDER_V1)(
71 const KODI_ADDON_VISUALIZATION_HDL hdl);
72
73 typedef unsigned int(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_GET_PRESETS_V1)(
74 const KODI_ADDON_VISUALIZATION_HDL hdl);
75 typedef int(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_GET_ACTIVE_PRESET_V1)(
76 const KODI_ADDON_VISUALIZATION_HDL hdl);
77 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_PREV_PRESET_V1)(
78 const KODI_ADDON_VISUALIZATION_HDL hdl);
79 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_NEXT_PRESET_V1)(
80 const KODI_ADDON_VISUALIZATION_HDL hdl);
81 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_LOAD_PRESET_V1)(
82 const KODI_ADDON_VISUALIZATION_HDL hdl, int select);
83 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_RANDOM_PRESET_V1)(
84 const KODI_ADDON_VISUALIZATION_HDL hdl);
85 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_LOCK_PRESET_V1)(
86 const KODI_ADDON_VISUALIZATION_HDL hdl);
87 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_RATE_PRESET_V1)(
88 const KODI_ADDON_VISUALIZATION_HDL hdl, bool plus_minus);
89 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_IS_LOCKED_V1)(
90 const KODI_ADDON_VISUALIZATION_HDL hdl);
91
92 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_UPDATE_ALBUMART_V1)(
93 const KODI_ADDON_VISUALIZATION_HDL hdl, const char* albumart);
94 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_VISUALIZATION_UPDATE_TRACK_V1)(
95 const KODI_ADDON_VISUALIZATION_HDL hdl, const struct KODI_ADDON_VISUALIZATION_TRACK* track);
96
98 {
99 PFN_KODI_ADDON_VISUALIZATION_START_V1 start;
100 PFN_KODI_ADDON_VISUALIZATION_STOP_V1 stop;
101
102 PFN_KODI_ADDON_VISUALIZATION_GET_SYNC_DELAY_V1 get_sync_delay;
103
104 PFN_KODI_ADDON_VISUALIZATION_AUDIO_DATA_V1 audio_data;
105 PFN_KODI_ADDON_VISUALIZATION_IS_DIRTY_V1 is_dirty;
106 PFN_KODI_ADDON_VISUALIZATION_RENDER_V1 render;
107
108 PFN_KODI_ADDON_VISUALIZATION_GET_PRESETS_V1 get_presets;
109 PFN_KODI_ADDON_VISUALIZATION_GET_ACTIVE_PRESET_V1 get_active_preset;
110 PFN_KODI_ADDON_VISUALIZATION_PREV_PRESET_V1 prev_preset;
111 PFN_KODI_ADDON_VISUALIZATION_NEXT_PRESET_V1 next_preset;
112 PFN_KODI_ADDON_VISUALIZATION_LOAD_PRESET_V1 load_preset;
113 PFN_KODI_ADDON_VISUALIZATION_RANDOM_PRESET_V1 random_preset;
114 PFN_KODI_ADDON_VISUALIZATION_LOCK_PRESET_V1 lock_preset;
115 PFN_KODI_ADDON_VISUALIZATION_RATE_PRESET_V1 rate_preset;
116 PFN_KODI_ADDON_VISUALIZATION_IS_LOCKED_V1 is_locked;
117
118 PFN_KODI_ADDON_VISUALIZATION_UPDATE_ALBUMART_V1 update_albumart;
119 PFN_KODI_ADDON_VISUALIZATION_UPDATE_TRACK_V1 update_track;
121
123 {
124 void (*get_properties)(const KODI_HANDLE hdl, struct KODI_ADDON_VISUALIZATION_PROPS* props);
125 void (*transfer_preset)(const KODI_HANDLE hdl, const char* preset);
126 void (*clear_presets)(const KODI_HANDLE hdl);
128
134
135#ifdef __cplusplus
136} /* extern "C" */
137#endif /* __cplusplus */
138
139#endif /* !C_API_ADDONINSTANCE_VISUALIZATION_H */
Definition visualization.h:130
Definition visualization.h:123
Definition visualization.h:45
Definition visualization.h:22
Definition visualization.h:98