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

* commit '3a1e0f3768f8c586700c00ac3b6a2a5f00cb32b5':
  Integration with moto secure keybox storage and add obfuscation of security-related symbols (3513413, 4083757).  Also 3481645 -  log spam and 3302187 - error handling
This commit is contained in:
Jeffrey Tinker
2011-03-14 17:45:50 -07:00
committed by Android Git Automerger
15 changed files with 71 additions and 55 deletions

View File

@@ -23,11 +23,19 @@
#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),
@@ -38,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
@@ -81,6 +90,7 @@ status_t WVMMediaSource::start(MetaData *)
allocBufferGroup();
mStarted = true;
mLogOnce = true;
// Let video stream control play/pause
if (mESSelector == WV_EsSelector_Video) {
@@ -192,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