[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / addons / ImageDecoder.h
blob038c601e62838546ae9f7636b88767fef6642c38
1 /*
2 * Copyright (C) 2013 Arne Morten Kvarving
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSES/README.md for more information.
6 */
8 #pragma once
10 #include "addons/IAddonSupportCheck.h"
11 #include "addons/binary-addons/AddonInstanceHandler.h"
12 #include "addons/kodi-dev-kit/include/kodi/addon-instance/ImageDecoder.h"
13 #include "guilib/iimage.h"
15 class CPictureInfoTag;
17 namespace KODI
19 namespace ADDONS
22 class CImageDecoder : public ADDON::IAddonInstanceHandler,
23 public KODI::ADDONS::IAddonSupportCheck,
24 public IImage
26 public:
27 explicit CImageDecoder(const ADDON::AddonInfoPtr& addonInfo, const std::string& mimetype);
28 ~CImageDecoder() override;
30 bool IsCreated() const { return m_created; }
32 /*! @ref IImage related functions */
33 ///@{
34 bool CreateThumbnailFromSurface(unsigned char*,
35 unsigned int,
36 unsigned int,
37 unsigned int,
38 unsigned int,
39 const std::string&,
40 unsigned char*&,
41 unsigned int&) override
43 return false;
45 bool LoadImageFromMemory(unsigned char* buffer,
46 unsigned int bufSize,
47 unsigned int width,
48 unsigned int height) override;
49 bool Decode(unsigned char* const pixels,
50 unsigned int width,
51 unsigned int height,
52 unsigned int pitch,
53 unsigned int format) override;
54 ///@}
56 /*! From @ref CPictureInfoTag used function to get information from addon */
57 ///@{
58 bool LoadInfoTag(const std::string& fileName, CPictureInfoTag* tag);
59 ///@}
61 /*! @ref KODI::ADDONS::IAddonSupportCheck related function */
62 ///@{
63 bool SupportsFile(const std::string& filename) override;
64 ///@}
66 private:
67 /*! @note m_mimetype not set in all cases, only available if @ref LoadImageFromMemory is used. */
68 const std::string m_mimetype;
69 bool m_created{false};
72 } /* namespace ADDONS */
73 } /* namespace KODI */