Skip to content

Commit ac2ffcd

Browse files
committed
wip
1 parent 0ec0ab2 commit ac2ffcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1660
-1492
lines changed

src/CompKodiProps.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,38 @@ void ADP::KODI_PROPS::CCompKodiProps::ParseConfig(const std::string& data)
314314
{
315315
m_config.internalCookies = jDictVal.GetBool();
316316
}
317+
else if (configName == "check_hdcp" && jDictVal.IsString())
318+
{
319+
std::string_view value = jDictVal.GetString();
320+
321+
if (value.empty() || value == "default")
322+
m_config.hdcpCheck = HdcpCheckType::DEFAULT;
323+
else if (value == "license")
324+
m_config.hdcpCheck = HdcpCheckType::LICENSE;
325+
else
326+
LOG::LogF(LOGERROR, "Value \"%s\" isnt supported on \"%s\" config of \"%s\" property",
327+
value.data(), configName.c_str(), PROP_MANIFEST_CONFIG.data());
328+
}
329+
else if (configName == "resolution_limit" && jDictVal.IsString())
330+
{
331+
std::string_view value = jDictVal.GetString();
332+
if (!value.empty())
333+
{
334+
auto pos = value.find('x');
335+
if (pos != std::string_view::npos)
336+
{
337+
const int width = STRING::ToInt32(value.substr(0, pos));
338+
const int height = STRING::ToInt32(value.substr(pos + 1));
339+
m_config.resolutionLimit = width * height;
340+
}
341+
else
342+
{
343+
LOG::LogF(LOGERROR,
344+
"Invalid resolution format \"%s\" on \"%s\" config of \"%s\" property",
345+
value.data(), configName.c_str(), PROP_MANIFEST_CONFIG.data());
346+
}
347+
}
348+
}
317349
else
318350
{
319351
LOG::LogF(LOGERROR, "Unsupported \"%s\" config or wrong data type on \"%s\" property",

src/CompKodiProps.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ struct ChooserProps
3535
std::pair<int, int> m_resolutionSecureMax; // Res. limit for DRM protected videos (values 0 means auto)
3636
};
3737

38+
enum class HdcpCheckType
39+
{
40+
DEFAULT,
41+
LICENSE, // To check HDCP values from DRM license response
42+
};
43+
3844
// Generic add-on configuration
3945
struct Config
4046
{
@@ -43,6 +49,10 @@ struct Config
4349
bool curlSSLVerifyPeer{true};
4450
// Determines if cookies are internally handled by InputStream Adaptive add-on
4551
bool internalCookies{false};
52+
// Determines how HDCP should be checked
53+
HdcpCheckType hdcpCheck{HdcpCheckType::DEFAULT};
54+
// Force limit resolutions of manifest streams to the specified value included (value in px, height x width)
55+
int resolutionLimit{0};
4656
};
4757

4858
struct ManifestConfig

src/Iaes_decrypter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class IAESDecrypter
2626
size_t dstOffset,
2727
size_t& dataSize,
2828
bool lastChunk) = 0;
29-
virtual std::string convertIV(const std::string& input) = 0;
29+
virtual std::vector<uint8_t> convertIV(const std::string& input) = 0;
3030
virtual void ivFromSequence(uint8_t* buffer, uint64_t sid) = 0;
3131
// virtual const std::string& getLicenseKey() const = 0;
3232
// virtual bool RenewLicense(const std::string& pluginUrl) = 0;

0 commit comments

Comments
 (0)