Skip to content

Commit

Permalink
Merge pull request #1672 from CastagnaIT/drm_config_impl
Browse files Browse the repository at this point in the history
New DRM Config property implementation rework
  • Loading branch information
CastagnaIT authored Oct 1, 2024
2 parents 2147f08 + ecce267 commit d94a317
Show file tree
Hide file tree
Showing 54 changed files with 1,582 additions and 1,865 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ msgstr ""
#empty string with id 30121

msgctxt "#30122"
msgid "Try avoiding the use of secure decoder"
msgid "Disable secure decoder"
msgstr ""

#. Description of setting with label #30122
msgctxt "#30123"
msgid "Some Android devices defined as Widevine L1, may not work properly, which may result in a black screen during playback. In this case try to enable it."
msgid "Some Android devices defined as Widevine L1, may not work properly, which may result in a black screen during playback. In this case try to enable it. This setting may be overridden by the video add-on used."
msgstr ""

#empty strings from id 30124 to 30155
Expand Down
4 changes: 2 additions & 2 deletions lib/jni/jni/src/MediaDrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ CJNIMediaDrmProvisionRequest CJNIMediaDrm::getProvisionRequest() const
"getProvisionRequest", "()Landroid/media/MediaDrm$ProvisionRequest;");
}

void CJNIMediaDrm::provideProvisionResponse(const std::vector<char> &response) const
void CJNIMediaDrm::provideProvisionResponse(const std::vector<uint8_t> &response) const
{
call_method<void>(m_object,
"provideProvisionResponse", "([B)V", jcast<jhbyteArray, std::vector<char> >(response));
"provideProvisionResponse", "([B)V", jcast<jhbyteArray, std::vector<uint8_t> >(response));
}

void CJNIMediaDrm::removeKeys(const std::vector<char> &sessionId) const
Expand Down
2 changes: 1 addition & 1 deletion lib/jni/jni/src/MediaDrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CJNIMediaDrm : public CJNIBase
std::vector<char> provideKeyResponse(const std::vector<char> &scope, const std::vector<char> &response) const;

CJNIMediaDrmProvisionRequest getProvisionRequest() const;
void provideProvisionResponse(const std::vector<char> &response) const;
void provideProvisionResponse(const std::vector<uint8_t> &response) const;

void removeKeys(const std::vector<char> &sessionId) const;

Expand Down
4 changes: 2 additions & 2 deletions lib/jni/jni/src/MediaDrmKeyRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ CJNIMediaDrmKeyRequest::CJNIMediaDrmKeyRequest()
m_object.setGlobal();
}

std::vector<char> CJNIMediaDrmKeyRequest::getData() const
std::vector<uint8_t> CJNIMediaDrmKeyRequest::getData() const
{
JNIEnv *env = xbmc_jnienv();
jhbyteArray array = call_method<jhbyteArray>(m_object,
"getData", "()[B");

jsize size = env->GetArrayLength(array.get());

std::vector<char> result;
std::vector<uint8_t> result;
result.resize(size);
env->GetByteArrayRegion(array.get(), 0, size, (jbyte*)result.data());

Expand Down
2 changes: 1 addition & 1 deletion lib/jni/jni/src/MediaDrmKeyRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CJNIMediaDrmKeyRequest : public CJNIBase
CJNIMediaDrmKeyRequest();
CJNIMediaDrmKeyRequest(const jni::jhobject &object) : CJNIBase(object) {};

std::vector<char> getData() const;
std::vector<uint8_t> getData() const;
int getRequestType() const;
};

Expand Down
4 changes: 2 additions & 2 deletions lib/jni/jni/src/MediaDrmProvisionRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ CJNIMediaDrmProvisionRequest::CJNIMediaDrmProvisionRequest()
m_object.setGlobal();
}

std::vector<char> CJNIMediaDrmProvisionRequest::getData() const
std::vector<uint8_t> CJNIMediaDrmProvisionRequest::getData() const
{
JNIEnv *env = xbmc_jnienv();
jhbyteArray array = call_method<jhbyteArray>(m_object,
"getData", "()[B");

jsize size = env->GetArrayLength(array.get());

std::vector<char> result;
std::vector<uint8_t> result;
result.resize(size);
env->GetByteArrayRegion(array.get(), 0, size, (jbyte*)result.data());

Expand Down
2 changes: 1 addition & 1 deletion lib/jni/jni/src/MediaDrmProvisionRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CJNIMediaDrmProvisionRequest : public CJNIBase
CJNIMediaDrmProvisionRequest();
CJNIMediaDrmProvisionRequest(const jni::jhobject &object) : CJNIBase(object) {};

std::vector<char> getData() const;
std::vector<uint8_t> getData() const;
std::string getDefaultUrl() const;
};

Expand Down
Loading

0 comments on commit d94a317

Please sign in to comment.