1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/*
* Copyright (C) 2005-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#ifndef C_API_ADDONINSTANCE_AUDIO_ENCODER_H
#define C_API_ADDONINSTANCE_AUDIO_ENCODER_H
#include "../addon_base.h"
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
typedef struct AddonProps_AudioEncoder
{
int dummy;
} AddonProps_AudioEncoder;
typedef struct AddonToKodiFuncTable_AudioEncoder
{
KODI_HANDLE kodiInstance;
int (*write)(KODI_HANDLE kodiInstance, const uint8_t* data, int len);
int64_t (*seek)(KODI_HANDLE kodiInstance, int64_t pos, int whence);
} AddonToKodiFuncTable_AudioEncoder;
struct AddonInstance_AudioEncoder;
typedef struct KodiToAddonFuncTable_AudioEncoder
{
KODI_HANDLE addonInstance;
bool(__cdecl* start)(const struct AddonInstance_AudioEncoder* instance,
int in_channels,
int in_rate,
int in_bits,
const char* title,
const char* artist,
const char* albumartist,
const char* album,
const char* year,
const char* track,
const char* genre,
const char* comment,
int track_length);
int(__cdecl* encode)(const struct AddonInstance_AudioEncoder* instance,
int num_bytes_read,
const uint8_t* pbt_stream);
bool(__cdecl* finish)(const struct AddonInstance_AudioEncoder* instance);
} KodiToAddonFuncTable_AudioEncoder;
typedef struct AddonInstance_AudioEncoder
{
struct AddonProps_AudioEncoder* props;
struct AddonToKodiFuncTable_AudioEncoder* toKodi;
struct KodiToAddonFuncTable_AudioEncoder* toAddon;
} AddonInstance_AudioEncoder;
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* !C_API_ADDONINSTANCE_AUDIO_ENCODER_H */
|