diff options
Diffstat (limited to 'media/libmediaplayerservice/MediaPlayerService.cpp')
| -rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 8f62ee4..123d07f 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -70,6 +70,8 @@ #include <OMX.h> +#include "Crypto.h" + namespace android { sp<MediaPlayerBase> createAAH_TXPlayer(); sp<MediaPlayerBase> createAAH_RXPlayer(); @@ -292,6 +294,16 @@ sp<IOMX> MediaPlayerService::getOMX() { return mOMX; } +sp<ICrypto> MediaPlayerService::makeCrypto() { + Mutex::Autolock autoLock(mLock); + + if (mCrypto == NULL) { + mCrypto = new Crypto; + } + + return mCrypto; +} + status_t MediaPlayerService::AudioCache::dump(int fd, const Vector<String16>& args) const { const size_t SIZE = 256; @@ -541,6 +553,12 @@ void MediaPlayerService::Client::disconnect() } static player_type getDefaultPlayerType() { + char value[PROPERTY_VALUE_MAX]; + if (property_get("media.stagefright.use-nuplayer", value, NULL) + && (!strcmp("1", value) || !strcasecmp("true", value))) { + return NU_PLAYER; + } + return STAGEFRIGHT_PLAYER; } @@ -1571,7 +1589,7 @@ status_t MediaPlayerService::AudioOutput::open( AUDIO_POLICY_OUTPUT_FLAG_NONE, CallbackWrapper, mCallbackData, - 0, + 0, // notification frames mSessionId); } else { t = new AudioTrack( |
