Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Sep 2, 2024
1 parent bd4c20e commit 7ce6e3c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/decrypters/widevine/WVCencSingleSampleDecrypter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ CWVCencSingleSampleDecrypter::CWVCencSingleSampleDecrypter(
m_promiseId++, cdm::SessionType::kTemporary, cdm::InitDataType::kCenc, m_pssh.data(),
static_cast<uint32_t>(m_pssh.size()));

//! @todo: loop with thread sleep should be removed, use callbacks
int retrycount = 0;
while (m_strSession.empty() && ++retrycount < 100)
std::this_thread::sleep_for(std::chrono::milliseconds(10));
Expand Down
16 changes: 16 additions & 0 deletions src/decrypters/widevineandroid/WVCdmAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
using namespace DRM;
using namespace UTILS;

CMediaDrmOnEventListener::CMediaDrmOnEventListener(
CMediaDrmOnEventCallback* decrypterEventCallback,
std::shared_ptr<jni::CJNIClassLoader> classLoader)
: jni::CJNIMediaDrmOnEventListener(classLoader), m_decrypterEventCallback(decrypterEventCallback)
{
}

void CMediaDrmOnEventListener::onEvent(const jni::CJNIMediaDrm& mediaDrm,
const std::vector<char>& sessionId,
int event,
int extra,
const std::vector<char>& data)
{
m_decrypterEventCallback->OnMediaDrmEvent(mediaDrm, sessionId, event, extra, data);
}

CWVCdmAdapterA::CWVCdmAdapterA(std::string_view keySystem,
std::string_view licenseURL,
const std::vector<uint8_t>& serverCert,
Expand Down

0 comments on commit 7ce6e3c

Please sign in to comment.