Loading media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "NuPlayerRenderer.h" #include "NuPlayerSource.h" #include <cutils/properties.h> #include <media/ICrypto.h> #include <media/stagefright/foundation/ABuffer.h> #include <media/stagefright/foundation/ADebug.h> Loading @@ -40,6 +41,10 @@ namespace android { static inline bool getAudioDeepBufferSetting() { return property_get_bool("media.stagefright.audio.deep", false /* default_value */); } NuPlayer::Decoder::Decoder( const sp<AMessage> ¬ify, const sp<Source> &source, Loading Loading @@ -539,9 +544,10 @@ void NuPlayer::Decoder::handleOutputFormatChange(const sp<AMessage> &format) { uint32_t flags; int64_t durationUs; bool hasVideo = (mSource->getFormat(false /* audio */) != NULL); if (!hasVideo && mSource->getDuration(&durationUs) == OK && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US) { if (getAudioDeepBufferSetting() // override regardless of source duration || (!hasVideo && mSource->getDuration(&durationUs) == OK && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) { flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER; } else { flags = AUDIO_OUTPUT_FLAG_NONE; Loading media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ namespace android { #Use audio callbacks for PCM data adb shell setprop media.stagefright.audio.cbk 1 #Use deep buffer for PCM data with video (it is generally enabled for audio-only) adb shell setprop media.stagefright.audio.deep 1 #Set size of buffers for pcm audio sink in msec (example: 1000 msec) adb shell setprop media.stagefright.audio.sink 1000 Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "NuPlayerRenderer.h" #include "NuPlayerSource.h" #include <cutils/properties.h> #include <media/ICrypto.h> #include <media/stagefright/foundation/ABuffer.h> #include <media/stagefright/foundation/ADebug.h> Loading @@ -40,6 +41,10 @@ namespace android { static inline bool getAudioDeepBufferSetting() { return property_get_bool("media.stagefright.audio.deep", false /* default_value */); } NuPlayer::Decoder::Decoder( const sp<AMessage> ¬ify, const sp<Source> &source, Loading Loading @@ -539,9 +544,10 @@ void NuPlayer::Decoder::handleOutputFormatChange(const sp<AMessage> &format) { uint32_t flags; int64_t durationUs; bool hasVideo = (mSource->getFormat(false /* audio */) != NULL); if (!hasVideo && mSource->getDuration(&durationUs) == OK && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US) { if (getAudioDeepBufferSetting() // override regardless of source duration || (!hasVideo && mSource->getDuration(&durationUs) == OK && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) { flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER; } else { flags = AUDIO_OUTPUT_FLAG_NONE; Loading
media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ namespace android { #Use audio callbacks for PCM data adb shell setprop media.stagefright.audio.cbk 1 #Use deep buffer for PCM data with video (it is generally enabled for audio-only) adb shell setprop media.stagefright.audio.deep 1 #Set size of buffers for pcm audio sink in msec (example: 1000 msec) adb shell setprop media.stagefright.audio.sink 1000 Loading