Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cleanup] Changed CRLF to LF #1380

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions src/decrypters/DrmFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
/*
* Copyright (C) 2023 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.
*/
#include "DrmFactory.h"
#include <kodi/addon-instance/inputstream/StreamCrypto.h>
#if ANDROID
#include "widevineandroid/WVDecrypter.h"
#else
#ifndef TARGET_DARWIN_EMBEDDED
#include "widevine/WVDecrypter.h"
#endif
#endif
using namespace DRM;
IDecrypter* CDrmFactory::GetDecrypter(STREAM_CRYPTO_KEY_SYSTEM keySystem)
{
if (keySystem == STREAM_CRYPTO_KEY_SYSTEM_WIDEVINE)
{
#if ANDROID
return new CWVDecrypterA();
#else
// Darwin embedded are apple platforms different than MacOS (e.g. IOS)
#ifndef TARGET_DARWIN_EMBEDDED
return new CWVDecrypter();
#endif
#endif
}
else if (keySystem == STREAM_CRYPTO_KEY_SYSTEM_PLAYREADY ||
keySystem == STREAM_CRYPTO_KEY_SYSTEM_WISEPLAY)
{
#if ANDROID
return new CWVDecrypterA();
#endif
}
return nullptr;
}
/*
* Copyright (C) 2023 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.
*/

#include "DrmFactory.h"

#include <kodi/addon-instance/inputstream/StreamCrypto.h>
#if ANDROID
#include "widevineandroid/WVDecrypter.h"
#else
#ifndef TARGET_DARWIN_EMBEDDED
#include "widevine/WVDecrypter.h"
#endif
#endif

using namespace DRM;

IDecrypter* CDrmFactory::GetDecrypter(STREAM_CRYPTO_KEY_SYSTEM keySystem)
{
if (keySystem == STREAM_CRYPTO_KEY_SYSTEM_WIDEVINE)
{
#if ANDROID
return new CWVDecrypterA();
#else
// Darwin embedded are apple platforms different than MacOS (e.g. IOS)
#ifndef TARGET_DARWIN_EMBEDDED
return new CWVDecrypter();
#endif
#endif
}
else if (keySystem == STREAM_CRYPTO_KEY_SYSTEM_PLAYREADY ||
keySystem == STREAM_CRYPTO_KEY_SYSTEM_WISEPLAY)
{
#if ANDROID
return new CWVDecrypterA();
#endif
}

return nullptr;
}
40 changes: 20 additions & 20 deletions src/decrypters/DrmFactory.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2023 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 "IDecrypter.h"
namespace DRM
{
class CDrmFactory
{
public:
IDecrypter* GetDecrypter(STREAM_CRYPTO_KEY_SYSTEM keySystem);
};
} // namespace DRM
/*
* Copyright (C) 2023 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 "IDecrypter.h"

namespace DRM
{
class CDrmFactory
{
public:
IDecrypter* GetDecrypter(STREAM_CRYPTO_KEY_SYSTEM keySystem);
};
} // namespace DRM
Loading