resolved conflicts for merge of 98c35aa4 to master
Change-Id: I32de004b575729f9b1852517ad5df71395e0ae69
This commit is contained in:
46
proprietary/wvm/include/ClientContext.h
Normal file
46
proprietary/wvm/include/ClientContext.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Google, Inc. All Rights Reserved
|
||||
*/
|
||||
|
||||
#ifndef CLIENTCONTEXT_H_
|
||||
#define CLIENTCONTEXT_H_
|
||||
|
||||
#include <utils/RefBase.h>
|
||||
#include <media/stagefright/foundation/ABase.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
class WVMMediaSource;
|
||||
|
||||
class ClientContext : public RefBase {
|
||||
public:
|
||||
ClientContext() : mUIDIsSet(false), mCryptoPluginMode(false) {}
|
||||
|
||||
void setUID(uid_t uid) { mUID = uid; mUIDIsSet = true; }
|
||||
uid_t getUID() const { return mUID; }
|
||||
bool haveUID() const { return mUIDIsSet; }
|
||||
|
||||
void setCryptoPluginMode(bool cryptoPluginMode) { mCryptoPluginMode = cryptoPluginMode; }
|
||||
bool getCryptoPluginMode() const { return mCryptoPluginMode; }
|
||||
|
||||
void setAudioSource(sp<WVMMediaSource> const &audioSource) { mAudioSource = audioSource; }
|
||||
void setVideoSource(sp<WVMMediaSource> const &videoSource) { mVideoSource = videoSource; }
|
||||
|
||||
sp<WVMMediaSource> getAudioSource() const { return mAudioSource.promote(); }
|
||||
sp<WVMMediaSource> getVideoSource() const { return mVideoSource.promote(); }
|
||||
|
||||
private:
|
||||
bool mUIDIsSet;;
|
||||
uid_t mUID;
|
||||
|
||||
bool mCryptoPluginMode;
|
||||
|
||||
wp<WVMMediaSource> mAudioSource;
|
||||
wp<WVMMediaSource> mVideoSource;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ClientContext);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,14 +38,16 @@ public:
|
||||
virtual void setAdaptiveStreamingMode(bool adaptive);
|
||||
bool getAdaptiveStreamingMode() const;
|
||||
|
||||
//
|
||||
// if in CryptoPlugin mode, the extractor doesn't decrypt,
|
||||
// it just accumulates the ranges of data requiring decryption
|
||||
// into the MediaBuffer's metadata, the decryption happens
|
||||
// later via the CryptoPlugin
|
||||
//
|
||||
virtual void setCryptoPluginMode(bool cryptoPluginMode);
|
||||
bool getCryptoPluginMode() const;
|
||||
|
||||
virtual void setUID(uid_t uid);
|
||||
|
||||
sp<WVMMediaSource> getAudioSource() const { return mAudioSource; }
|
||||
sp<WVMMediaSource> getVideoSource() const { return mVideoSource; }
|
||||
|
||||
static void SocketInfoCallback(int fd, int op, void *context);
|
||||
static void cleanup();
|
||||
|
||||
@@ -63,6 +65,7 @@ private:
|
||||
sp<WVMFileSource> mFileSource;
|
||||
sp<DataSource> mDataSource;
|
||||
sp<WVMInfoListener> mInfoListener;
|
||||
sp<ClientContext> mClientContext;
|
||||
|
||||
bool mHaveMetaData;
|
||||
bool mUseAdaptiveStreaming;
|
||||
@@ -73,17 +76,6 @@ private:
|
||||
|
||||
status_t mSetupStatus;
|
||||
|
||||
bool mUIDIsSet;
|
||||
uid_t mUID;
|
||||
|
||||
//
|
||||
// if in CryptoPlugin mode, the extractor doesn't decrypt,
|
||||
// it just accumulates the ranges of data requiring decryption
|
||||
// into the MediaBuffer's metadata, the decryption happens
|
||||
// later via the CryptoPlugin
|
||||
//
|
||||
bool mCryptoPluginMode;
|
||||
|
||||
status_t readMetaData();
|
||||
|
||||
const static size_t kStreamCacheSize = 10 * 1024 * 1024;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <media/stagefright/MetaData.h>
|
||||
#include <media/stagefright/MediaBufferGroup.h>
|
||||
#include <utils/RefBase.h>
|
||||
#include "ClientContext.h"
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
#include "OEMCrypto_L1.h"
|
||||
#endif
|
||||
@@ -29,6 +30,7 @@ public:
|
||||
|
||||
void delegateFileSource(sp<WVMFileSource> fileSource);
|
||||
void delegateDataSource(sp<DataSource> dataSource);
|
||||
void delegateClientContext(sp<ClientContext> context);
|
||||
|
||||
virtual status_t start(MetaData *params = NULL);
|
||||
virtual status_t stop();
|
||||
@@ -88,6 +90,7 @@ private:
|
||||
|
||||
sp<WVMFileSource> mFileSource;
|
||||
sp<DataSource> mDataSource;
|
||||
sp<ClientContext> mClientContext;
|
||||
|
||||
Vector<size_t> mEncryptedSizes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user