mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
cas: retrieve detailed error from descrambler
Retrieve detailed error and pass back to client. bug: 120301718 Change-Id: Iab4324c38318b7aaf73fc4072c6aeb12c3862e06
This commit is contained in:
@@ -23,10 +23,10 @@ cc_defaults {
|
||||
"libhidlmemory",
|
||||
"libhidltransport",
|
||||
"liblog",
|
||||
"libstagefright_foundation",
|
||||
"libutils",
|
||||
],
|
||||
header_libs: [
|
||||
"libstagefright_foundation_headers",
|
||||
"media_plugin_headers",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <hidlmemory/mapping.h>
|
||||
#include <media/cas/DescramblerAPI.h>
|
||||
#include <media/hardware/CryptoAPI.h>
|
||||
#include <media/stagefright/foundation/AString.h>
|
||||
#include <media/stagefright/foundation/AUtils.h>
|
||||
#include <utils/Log.h>
|
||||
|
||||
@@ -177,6 +178,7 @@ Return<void> DescramblerImpl::descramble(
|
||||
// Casting hidl SubSample to DescramblerPlugin::SubSample, but need
|
||||
// to ensure structs are actually idential
|
||||
|
||||
AString detailedError;
|
||||
int32_t result = holder->descramble(
|
||||
dstBuffer.type != BufferType::SHARED_MEMORY,
|
||||
(DescramblerPlugin::ScramblingControl)scramblingControl,
|
||||
@@ -186,10 +188,10 @@ Return<void> DescramblerImpl::descramble(
|
||||
srcOffset,
|
||||
dstPtr,
|
||||
dstOffset,
|
||||
NULL);
|
||||
&detailedError);
|
||||
|
||||
holder.reset();
|
||||
_hidl_cb(toStatus(result >= 0 ? OK : result), result, NULL);
|
||||
_hidl_cb(toStatus(result >= 0 ? OK : result), result, detailedError.c_str());
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user