From 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 30 Aug 2018 00:42:04 +0200 Subject: sync with upstream --- .../VideoPlayer/Interface/Addon/DemuxCrypto.h | 31 +++++++++----------- .../VideoPlayer/Interface/Addon/DemuxPacket.h | 24 ++++----------- .../VideoPlayer/Interface/Addon/TimingConstants.h | 34 +++++++--------------- 3 files changed, 30 insertions(+), 59 deletions(-) (limited to 'xbmc/cores/VideoPlayer/Interface') diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h index e38e247..b48ef34 100644 --- a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h +++ b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h @@ -1,22 +1,10 @@ /* -* Copyright (C) 2005-2016 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) 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 @@ -48,6 +36,13 @@ struct DemuxCryptoSession delete[] sessionId; } + bool operator == (const DemuxCryptoSession &other) const + { + return sessionIdSize == other.sessionIdSize && + keySystem == other.keySystem && + memcmp(sessionId, other.sessionId, sessionIdSize) == 0; + }; + // encryped stream infos char * sessionId; uint16_t sessionIdSize; diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h index b7404a3..5aed400 100644 --- a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h +++ b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h @@ -1,25 +1,13 @@ -#pragma once - /* - * Copyright (C) 2012-2013 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) 2012-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 "TimingConstants.h" #include #include diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h b/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h index 209897e..0672002 100644 --- a/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h +++ b/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h @@ -1,31 +1,19 @@ -#pragma once - /* -* 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 #define DVD_TIME_BASE 1000000 #define DVD_NOPTS_VALUE 0xFFF0000000000000 -#define DVD_TIME_TO_MSEC(x) ((int)((double)(x) * 1000 / DVD_TIME_BASE)) -#define DVD_SEC_TO_TIME(x) ((double)(x) * DVD_TIME_BASE) -#define DVD_MSEC_TO_TIME(x) ((double)(x) * DVD_TIME_BASE / 1000) +constexpr int DVD_TIME_TO_MSEC(double x) { return static_cast(x * 1000 / DVD_TIME_BASE); } +constexpr double DVD_SEC_TO_TIME(double x) { return x * DVD_TIME_BASE; } +constexpr double DVD_MSEC_TO_TIME(double x) { return x * DVD_TIME_BASE / 1000; } #define DVD_PLAYSPEED_PAUSE 0 // frame stepping #define DVD_PLAYSPEED_NORMAL 1000 -- cgit v1.2.3