2 * Copyright (C) 2013 Arne Morten Kvarving
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSES/README.md for more information.
11 #include "addons/binary-addons/AddonInstanceHandler.h"
12 #include "addons/kodi-dev-kit/include/kodi/addon-instance/AudioEncoder.h"
19 class CEncoderAddon
: public CEncoder
, public ADDON::IAddonInstanceHandler
22 explicit CEncoderAddon(const ADDON::AddonInfoPtr
& addonInfo
);
23 ~CEncoderAddon() override
;
25 // Child functions related to IEncoder within CEncoder
27 ssize_t
Encode(uint8_t* pbtStream
, size_t nNumBytesRead
) override
;
28 bool Close() override
;
30 // Addon callback functions
31 ssize_t
Write(const uint8_t* data
, size_t len
) override
;
32 ssize_t
Seek(ssize_t pos
, int whence
) override
;
35 // Currently needed addon interface parts
37 static ssize_t
cb_write(KODI_HANDLE kodiInstance
, const uint8_t* data
, size_t len
);
38 static ssize_t
cb_seek(KODI_HANDLE kodiInstance
, ssize_t pos
, int whence
);
42 } /* namespace CDRIP */
43 } /* namespace KODI */