Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
audiodecoder.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_AUDIODECODER_H
10#define C_API_ADDONINSTANCE_AUDIODECODER_H
11
12#include "../addon_base.h"
13#include "../audio_engine.h"
14
15//============================================================================
26#define KODI_ADDON_AUDIODECODER_TRACK_EXT "_adecstrm"
28//----------------------------------------------------------------------------
29
30//============================================================================
39#define KODI_ADDON_AUDIODECODER_GET_TRACK_EXT(name) "." name KODI_ADDON_AUDIODECODER_TRACK_EXT
41//----------------------------------------------------------------------------
42
43#ifdef __cplusplus
44extern "C"
45{
46#endif /* __cplusplus */
47
48 typedef KODI_ADDON_INSTANCE_HDL KODI_ADDON_AUDIODECODER_HDL;
49
50 //============================================================================
75 //----------------------------------------------------------------------------
76
78 {
79 char* title;
80 char* artist;
81 char* album;
82 char* album_artist;
83 char* media_type;
84 char* genre;
85 int duration;
86 int track;
87 int disc;
88 char* disc_subtitle;
89 int disc_total;
90 char* release_date;
91 char* lyrics;
92 int samplerate;
93 int channels;
94 int bitrate;
95 char* comment;
96 char* cover_art_path;
97 char* cover_art_mem_mimetype;
98 uint8_t* cover_art_mem;
99 size_t cover_art_mem_size;
100 };
101
102 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_AUDIODECODER_SUPPORTS_FILE_V1)(
103 const KODI_ADDON_AUDIODECODER_HDL hdl, const char* file);
104 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_AUDIODECODER_INIT_V1)(
105 const KODI_ADDON_AUDIODECODER_HDL hdl,
106 const char* file,
107 unsigned int filecache,
108 int* channels,
109 int* samplerate,
110 int* bitspersample,
111 int64_t* totaltime,
112 int* bitrate,
113 enum AudioEngineDataFormat* format,
115 typedef int(ATTR_APIENTRYP PFN_KODI_ADDON_AUDIODECODER_READ_PCM_V1)(
116 const KODI_ADDON_AUDIODECODER_HDL hdl, uint8_t* buffer, size_t size, size_t* actualsize);
117 typedef int64_t(ATTR_APIENTRYP PFN_KODI_ADDON_AUDIODECODER_SEEK_V1)(
118 const KODI_ADDON_AUDIODECODER_HDL hdl, int64_t time);
119 typedef bool(ATTR_APIENTRYP PFN_KODI_ADDON_AUDIODECODER_READ_TAG_V1)(
120 const KODI_ADDON_AUDIODECODER_HDL hdl,
121 const char* file,
123 typedef int(ATTR_APIENTRYP PFN_KODI_ADDON_AUDIODECODER_TRACK_COUNT_V1)(
124 const KODI_ADDON_AUDIODECODER_HDL hdl, const char* file);
125
127 {
128 KODI_HANDLE kodiInstance;
130
132 {
133 PFN_KODI_ADDON_AUDIODECODER_SUPPORTS_FILE_V1 supports_file;
134 PFN_KODI_ADDON_AUDIODECODER_INIT_V1 init;
135 PFN_KODI_ADDON_AUDIODECODER_READ_PCM_V1 read_pcm;
136 PFN_KODI_ADDON_AUDIODECODER_SEEK_V1 seek;
137 PFN_KODI_ADDON_AUDIODECODER_READ_TAG_V1 read_tag;
138 PFN_KODI_ADDON_AUDIODECODER_TRACK_COUNT_V1 track_count;
140
146
147#ifdef __cplusplus
148} /* extern "C" */
149#endif /* __cplusplus */
150
151#endif /* !C_API_ADDONINSTANCE_AUDIODECODER_H */
AUDIODECODER_READ_RETURN
Definition audiodecoder.h:64
@ AUDIODECODER_READ_SUCCESS
On success.
Definition audiodecoder.h:69
@ AUDIODECODER_READ_EOF
On end of stream.
Definition audiodecoder.h:66
@ AUDIODECODER_READ_ERROR
On failure.
Definition audiodecoder.h:72
AudioEngineChannel
Definition audio_engine.h:70
@ AUDIOENGINE_CH_MAX
Maximum possible value, to use e.g. as size inside list.
Definition audio_engine.h:116
AudioEngineDataFormat
Definition audio_engine.h:148
Definition audiodecoder.h:142
Definition audiodecoder.h:127
Definition audiodecoder.h:78
Definition visualization.h:22
Definition audiodecoder.h:132