diff options
Diffstat (limited to 'media/libmediaplayerservice/nuplayer')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h | 9 | ||||
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h index 5f84a06..23c87ae 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h @@ -17,9 +17,13 @@ #ifndef NUPLAYER_DECODER_H_ #define NUPLAYER_DECODER_H_ -#include "NuPlayer.h" +#include <media/stagefright/foundation/AMessage.h> +#include "NuPlayer.h" #include "NuPlayerDecoderBase.h" +#include "NuPlayerSource.h" + +#include "mediaplayerservice/AVNuExtensions.h" namespace android { @@ -49,7 +53,8 @@ protected: virtual void onFlush(); virtual void onShutdown(bool notifyComplete); virtual bool doRequestBuffers(); - virtual void setPcmFormat(const sp<AMessage> & /*format*/) {} + virtual void setPcmFormat(const sp<AMessage> &format) { format->setInt32("pcm-format", + AVNuUtils::get()->getKeyPCMFormat(mSource->getFormatMeta(true))); } enum { kWhatCodecNotify = 'cdcN', diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.h b/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.h index fbc4087..cfd61da 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.h @@ -18,6 +18,8 @@ #define NUPLAYER_DECODER_PASS_THROUGH_H_ +#include <media/stagefright/foundation/AMessage.h> + #include "NuPlayer.h" #include "NuPlayerDecoderBase.h" @@ -43,7 +45,7 @@ protected: virtual void onFlush(); virtual void onShutdown(bool notifyComplete); virtual bool doRequestBuffers(); - virtual void setPcmFormat(const sp<AMessage> & /*format*/) {} + virtual void setPcmFormat(const sp<AMessage> &format) { format->setInt32("pcm-format", mPCMFormat); } virtual sp<ABuffer> aggregateBuffer(const sp<ABuffer> &accessUnit); enum { |