Integration with moto secure keybox storage and add obfuscation of security-related symbols (3513413, 4083757). Also 3481645 - log spam and 3302187 - error handling

Change-Id: Ic11ed7ad57717e88b6f0f2991d8bbb9e1251d546
This commit is contained in:
Jeffrey Tinker
2011-03-11 13:33:13 -08:00
parent 007788f060
commit 3a1e0f3768
15 changed files with 72 additions and 55 deletions

View File

@@ -19,14 +19,23 @@
#include "WVMMediaSource.h"
#include "WVMFileSource.h"
#include "WVMExtractorImpl.h"
#include "media/stagefright/MediaErrors.h"
#include "media/stagefright/MediaDefs.h"
#include "media/stagefright/MediaDebug.h"
#include "AndroidHooks.h"
namespace android {
static void _cb(int code)
{
WVMMediaSource::sLastError = (status_t)code;
}
extern DrmManagerClient *gDrmManagerClient;
status_t WVMMediaSource::sLastError = NO_ERROR;
WVMMediaSource::WVMMediaSource(WVSession *session, WVEsSelector esSelector,
const sp<MetaData> &metaData)
: mSession(session),
@@ -37,6 +46,7 @@ WVMMediaSource::WVMMediaSource(WVSession *session, WVEsSelector esSelector,
mDts(0),
mPts(0)
{
_ah010(_cb);
}
// Since the WVMExtractor lifetime is short, we delegate ownership of some resources
@@ -80,6 +90,7 @@ status_t WVMMediaSource::start(MetaData *)
allocBufferGroup();
mStarted = true;
mLogOnce = true;
// Let video stream control play/pause
if (mESSelector == WV_EsSelector_Video) {
@@ -191,13 +202,21 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
if (result != WV_Status_Warning_Need_Key &&
result != WV_Status_Warning_Download_Stalled)
{
LOGE("WV_GetEsData returned ERROR %d in WVMMediaSource::read\n", result);
if (mLogOnce) {
LOGE("WV_GetEsData returned ERROR %d in WVMMediaSource::read\n", result);
mLogOnce = false;
}
mediaBuf->release();
return ERROR_IO;
} else
LOGW("WV_GetEsData returned WARNING %d in WVMMediaSource::read\n", result);
}
}
if (sLastError != NO_ERROR) {
mediaBuf->release();
status_t status = sLastError;
sLastError = NO_ERROR;
return status;
}
if (bytesRead == 0) {
// Didn't get anything, sleep a bit so we don't hog the CPU then