summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-05-27 11:02:54 -0700
committerRonghua Wu <ronghuawu@google.com>2015-05-27 11:02:54 -0700
commit02cb98d726b97d8e6dbb9c6c60d32a3cedc7f82d (patch)
tree20eeb0b56c675dba4aef74860a4669da14dad4e7 /media/libmediaplayerservice/nuplayer/NuPlayer.cpp
parent6374077319a2d060eefe5f4bf425aed37f90c5d0 (diff)
downloadframeworks_av-02cb98d726b97d8e6dbb9c6c60d32a3cedc7f82d.zip
frameworks_av-02cb98d726b97d8e6dbb9c6c60d32a3cedc7f82d.tar.gz
frameworks_av-02cb98d726b97d8e6dbb9c6c60d32a3cedc7f82d.tar.bz2
libmediaplayerservice: get isStreaming info from source.
Bug: 19061436 Change-Id: I0fc0d6207b0d3297d64aadab3e81448e3f3fa1de
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index a79858c..8760cbb 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -834,7 +834,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
audio_stream_type_t streamType = mAudioSink->getAudioStreamType();
const bool hasVideo = (videoFormat != NULL);
const bool canOffload = canOffloadStream(
- audioMeta, hasVideo, true /* is_streaming */, streamType);
+ audioMeta, hasVideo, mSource->isStreaming(), streamType);
if (canOffload) {
if (!mOffloadAudio) {
mRenderer->signalEnableOffloadAudio();
@@ -1107,7 +1107,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
audio_stream_type_t streamType = mAudioSink->getAudioStreamType();
const bool hasVideo = (videoFormat != NULL);
const bool canOffload = canOffloadStream(
- audioMeta, hasVideo, true /* is_streaming */, streamType);
+ audioMeta, hasVideo, mSource->isStreaming(), streamType);
if (canOffload) {
mRenderer->signalEnableOffloadAudio();
sp<AMessage> format = mSource->getFormat(true /*audio*/);
@@ -1288,8 +1288,7 @@ void NuPlayer::onStart(int64_t startPositionUs) {
sp<AMessage> videoFormat = mSource->getFormat(false /* audio */);
mOffloadAudio =
- canOffloadStream(audioMeta, (videoFormat != NULL),
- true /* is_streaming */, streamType);
+ canOffloadStream(audioMeta, (videoFormat != NULL), mSource->isStreaming(), streamType);
if (mOffloadAudio) {
flags |= Renderer::FLAG_OFFLOAD_AUDIO;
}