From 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 30 Aug 2018 00:42:04 +0200 Subject: sync with upstream --- .../include/kodi/addon-instance/AudioDecoder.h | 23 ++--- .../include/kodi/addon-instance/AudioEncoder.h | 29 ++---- .../include/kodi/addon-instance/ImageDecoder.h | 23 ++--- .../include/kodi/addon-instance/Inputstream.h | 25 ++--- .../include/kodi/addon-instance/Peripheral.h | 25 ++--- .../include/kodi/addon-instance/PeripheralUtils.h | 112 ++++++--------------- .../include/kodi/addon-instance/Screensaver.h | 23 ++--- .../include/kodi/addon-instance/VFS.h | 23 ++--- .../include/kodi/addon-instance/VideoCodec.h | 24 ++--- .../include/kodi/addon-instance/Visualization.h | 35 ++----- 10 files changed, 92 insertions(+), 250 deletions(-) (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h index ca253ff..7407830 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * 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. */ +#pragma once + #include "../AddonBase.h" #ifdef BUILD_KODI_ADDON #include "../AEChannelData.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h index 7d2464d..b98884e 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * 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. */ +#pragma once + #include "../AddonBase.h" namespace kodi { namespace addon { class CInstanceAudioEncoder; }} @@ -136,10 +125,10 @@ namespace addon //========================================================================== /// \brief Write block of data /// - /// \param[in] data Pointer to the array of elements to be + /// \param[in] data Pointer to the array of elements to be /// written /// \param[in] length Size in bytes to be written. - /// \return The total number of bytes + /// \return The total number of bytes /// successfully written is returned. int Write(const uint8_t* data, int length) { @@ -154,7 +143,7 @@ namespace addon /// /// \param[in] position the position that you want to seek to /// \param[in] whence [optional] offset relative to - /// You can set the value of whence to one + /// You can set the value of whence to one /// of three things: /// | Value | int | Description | /// |:--------:|:---:|:---------------------------------------------------| diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h index 5ccb859..09ac6c9 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * 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. */ +#pragma once + #include "../AddonBase.h" namespace kodi { namespace addon { class CInstanceImageDecoder; }} diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h index 08d01ad..23a91e7 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * 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. */ +#pragma once + /* * Parts with a comment named "internal" are only used inside header and not * used or accessed direct during add-on development! @@ -142,7 +131,7 @@ extern "C" { const uint8_t *m_ExtraData; unsigned int m_ExtraSize; - char m_language[4]; /*!< @brief ISO 639 3-letter language code (empty string if undefined) */ + char m_language[64]; /*!< @brief RFC 5646 language code (empty string if undefined) */ unsigned int m_FpsScale; /*!< @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps */ unsigned int m_FpsRate; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h index 75be27e..78e572b 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-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. */ +#pragma once + #include "../AddonBase.h" namespace kodi { namespace addon { class CInstancePeripheral; }} @@ -780,7 +769,7 @@ namespace addon return addonInstance->toAddon.addonInstance->SendEvent(event); } - + inline static PERIPHERAL_ERROR ADDON_GetJoystickInfo(const AddonInstance_Peripheral* addonInstance, unsigned int index, JOYSTICK_INFO* info) { return addonInstance->toAddon.addonInstance->GetJoystickInfo(index, info); diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h index c2efc05..9b2a43f 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h @@ -1,22 +1,11 @@ /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-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. */ + #pragma once #include "Peripheral.h" @@ -97,10 +86,7 @@ namespace addon public: Peripheral(PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN, const std::string& strName = "") : m_type(type), - m_strName(strName), - m_vendorId(0), - m_productId(0), - m_index(0) + m_strName(strName) { } @@ -149,9 +135,9 @@ namespace addon private: PERIPHERAL_TYPE m_type; std::string m_strName; - uint16_t m_vendorId; - uint16_t m_productId; - unsigned int m_index; + uint16_t m_vendorId = 0; + uint16_t m_productId = 0; + unsigned int m_index = 0; }; typedef PeripheralVector Peripherals; @@ -259,12 +245,7 @@ namespace addon Joystick(const std::string& provider = "", const std::string& strName = "") : Peripheral(PERIPHERAL_TYPE_JOYSTICK, strName), m_provider(provider), - m_requestedPort(NO_PORT_REQUESTED), - m_buttonCount(0), - m_hatCount(0), - m_axisCount(0), - m_motorCount(0), - m_supportsPowerOff(false) + m_requestedPort(NO_PORT_REQUESTED) { } @@ -345,11 +326,11 @@ namespace addon private: std::string m_provider; int m_requestedPort; - unsigned int m_buttonCount; - unsigned int m_hatCount; - unsigned int m_axisCount; - unsigned int m_motorCount; - bool m_supportsPowerOff; + unsigned int m_buttonCount = 0; + unsigned int m_hatCount = 0; + unsigned int m_axisCount = 0; + unsigned int m_motorCount = 0; + bool m_supportsPowerOff = false; }; typedef PeripheralVector Joysticks; @@ -402,12 +383,7 @@ namespace addon */ DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex) : m_type(type), - m_driverIndex(driverIndex), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_driverIndex(driverIndex) { } @@ -415,16 +391,7 @@ namespace addon /*! * \brief Construct an invalid driver primitive */ - DriverPrimitive(void) : - m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) - { - } + DriverPrimitive(void) = default; /*! * \brief Construct a driver primitive representing a joystick button @@ -441,11 +408,7 @@ namespace addon DriverPrimitive(unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION), m_driverIndex(hatIndex), - m_hatDirection(direction), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_hatDirection(direction) { } @@ -456,11 +419,9 @@ namespace addon DriverPrimitive(unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS), m_driverIndex(axisIndex), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), m_center(center), m_semiAxisDirection(direction), - m_range(range), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_range(range) { } @@ -477,13 +438,7 @@ namespace addon */ DriverPrimitive(std::string keycode) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_keycode(std::move(keycode)), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_keycode(std::move(keycode)) { } @@ -501,23 +456,12 @@ namespace addon */ DriverPrimitive(JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), m_relPointerDirection(direction) { } explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) : - m_type(primitive.type), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_type(primitive.type) { switch (m_type) { @@ -677,14 +621,14 @@ namespace addon } private: - JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type; - unsigned int m_driverIndex; - JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection; - int m_center; - JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection; - unsigned int m_range; + JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type = JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN; + unsigned int m_driverIndex = 0; + JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection = JOYSTICK_DRIVER_HAT_UNKNOWN; + int m_center = 0; + JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection = JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN; + unsigned int m_range = 1; std::string m_keycode; - JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection; + JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection = JOYSTICK_DRIVER_RELPOINTER_UNKNOWN; }; typedef PeripheralVector DriverPrimitives; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h index 04821b2..c4f8005 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * 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. */ +#pragma once + #include "../AddonBase.h" namespace kodi { namespace addon { class CInstanceScreensaver; }} diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h index 637a991..3bdc059 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h @@ -1,23 +1,12 @@ -#pragma once /* - * Copyright (C) 2015 Team Kodi - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2015-2018 Team Kodi * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" #include "../Filesystem.h" @@ -578,7 +567,7 @@ namespace addon int* num_entries, char* rootpath) { - std::string cppRootPath; + std::string cppRootPath; std::vector addonEntries; bool ret = instance->toAddon.addonInstance->ContainsFiles(*url, addonEntries, cppRootPath); if (ret) diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h index 8a8779a..9c33fbf 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h @@ -1,21 +1,9 @@ /* - * Copyright (C) 2017 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2017-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. */ #pragma once @@ -53,12 +41,12 @@ extern "C" } codec; STREAMCODEC_PROFILE codecProfile; - + //UnknownVideoFormat is terminator VIDEOCODEC_FORMAT *videoFormats; uint32_t width, height; - + const uint8_t *extraData; unsigned int extraDataSize; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h index a2bef15..6c29693 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * 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. */ +#pragma once + /* * Parts with a comment named "internal" are only used inside header and not * used or accessed direct during add-on development! @@ -34,7 +23,7 @@ extern "C" struct AddonInstance_Visualization; typedef enum VIS_ACTION : unsigned int /* internal */ -{ +{ VIS_ACTION_NONE = 0, VIS_ACTION_NEXT_PRESET, VIS_ACTION_PREV_PRESET, @@ -318,8 +307,7 @@ namespace addon /// Used by an add-on that only supports visualizations. /// CInstanceVisualization() - : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), - m_presetLockedByUser(false) + : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) { if (CAddonBase::m_interface->globalSingleInstance != nullptr) throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); @@ -341,8 +329,7 @@ namespace addon /// @warning Only use `instance` from the CreateInstance call /// explicit CInstanceVisualization(KODI_HANDLE instance) - : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), - m_presetLockedByUser(false) + : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) { if (CAddonBase::m_interface->globalSingleInstance != nullptr) throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); @@ -690,7 +677,7 @@ namespace addon { addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); } - + inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) { return addon->toAddon.addonInstance->IsDirty(); @@ -758,7 +745,7 @@ namespace addon return addon->toAddon.addonInstance->IsLocked(); } - bool m_presetLockedByUser; + bool m_presetLockedByUser = false; AddonInstance_Visualization* m_instanceData; }; -- cgit v1.2.3